{
  "openapi": "3.1.1",
  "info": {
    "title": "Ratho.Cockpit.Api | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.skhole.nl/"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": [
          "Ratho.Cockpit.Api"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/discover": {
      "get": {
        "tags": [
          "Ratho.Cockpit.Api"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/access-requests/pending": {
      "get": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "The approver queue — requests the caller may decide on.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AccessRequestStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/access-requests/mine": {
      "get": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "The caller's own requests.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AccessRequestStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/access-requests/scopes": {
      "get": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "The process scopes a requester can pick from on the entry-point screen.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/access-requests/roles": {
      "get": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "The organizational roles this approver may hand out here (#4246) — only those `Approve` would accept, so the\npicker never offers a role whose approval is then refused.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/access-requests": {
      "post": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "Creates an access request for the authenticated user. Asking for access is a Werk capability (#3712, Laurens 28-09):\na Start seat is Skhole over MCP only, so it can neither submit nor decide a request. The request and its\n`access_request.created` audit entry commit together (#4502): when the audit cannot be written the request is not\nmade and the caller gets a 500 — deliberately fail-closed, a request nobody can trace is worse than a retry.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccessRequestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccessRequestRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccessRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/access-requests/{id}/approve": {
      "post": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "Approves a request — applies the grant and notifies the requester. Werk and up (#3712).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveAccessRequestRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveAccessRequestRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveAccessRequestRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/access-requests/{id}/deny": {
      "post": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "Denies a request with a reason. Werk and up (#3712).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DenyAccessRequestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DenyAccessRequestRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DenyAccessRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/access-requests/{id}/cancel": {
      "post": {
        "tags": [
          "AccessRequests"
        ],
        "summary": "Withdraws a pending request the caller created. The withdrawal and its `access_request.withdrawn` audit entry\ncommit together (#4502): when the audit cannot be written the request stays pending and the caller gets a 500.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/actions/execute-agent": {
      "post": {
        "tags": [
          "Actions"
        ],
        "summary": "Executes an AI agent on a healthy registered SparkForge instance.\nFinds the best available instance, forwards the request, and returns the agent's response.",
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteAgentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteAgentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecuteAgentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/actions/query-rag": {
      "post": {
        "tags": [
          "Actions"
        ],
        "summary": "Queries a RAG collection on a healthy registered SparkForge instance.\nFinds the best available instance, forwards the query, and returns matching documents.",
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RagResult"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/{agentId}/config": {
      "put": {
        "tags": [
          "Agents"
        ],
        "summary": "Saves an assistant agent's tenant-wide configuration for the caller's own tenant (#4363): what the whole tenant\nsees in the agents workspace, so it needs `agents.manage`, like every other agent write here. Only the agents\nthe workspace knows (IReadOnlyList&lt;string&gt; AgentConfigDefaults.AgentIds), a bounded number of fields and toggles, and an\n`agent.config.updated` row before the change — no row, no change. The workspace is Denk's\n(`agent_workspace`, #4150), here as on its App pages.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgentConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgentConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgentConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/templates": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List all agent templates visible to the current tenant.\nReturns both system templates (shared) and tenant-specific templates.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "summary": "Create a new agent template for the current tenant. Needs `agents.manage`, like a deployment (#4138).",
        "requestBody": {
          "description": "Template creation request.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentTemplateApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentTemplateApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentTemplateApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/templates/{id}": {
      "delete": {
        "tags": [
          "Agents"
        ],
        "summary": "Delete an agent template. System templates cannot be deleted.\nOnly templates belonging to the current tenant can be deleted, and only with `agents.manage` (#4138).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Template unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/deployments": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List all deployment records for a given template.\nReturns per-instance deployment status for the specified agent template.",
        "parameters": [
          {
            "name": "templateId",
            "in": "query",
            "description": "Template unique identifier to query deployments for.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agents"
        ],
        "summary": "Deploy an agent template to one or more SparkForge instances.\nReturns one deployment record per instance with the current deployment status.",
        "requestBody": {
          "description": "Deployment request with template ID and target instance IDs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeploymentApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeploymentApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeploymentApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/deployments/{id}": {
      "delete": {
        "tags": [
          "Agents"
        ],
        "summary": "Remove a deployed agent from its SparkForge instance and mark the deployment as removed.\nOnly deployments belonging to the current tenant can be removed.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Deployment record unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreement-layers/platform": {
      "get": {
        "tags": [
          "AgreementLayers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AgreementLayers"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgreementLayerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgreementLayerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgreementLayerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AgreementLayers"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/agreement-layers/partners/{partnerId}": {
      "get": {
        "tags": [
          "AgreementLayers"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AgreementLayers"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgreementLayerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgreementLayerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAgreementLayerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AgreementLayers"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/agreement-layers/tenants/{tenantId}/switches": {
      "get": {
        "tags": [
          "AgreementLayers"
        ],
        "summary": "The tenant's two switches, and what there is above it to switch.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AgreementLayers"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantAgreementSwitchesDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantAgreementSwitchesDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantAgreementSwitchesDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/agreements": {
      "get": {
        "tags": [
          "Agreements"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agreements"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/effective": {
      "get": {
        "tags": [
          "Agreements"
        ],
        "summary": "The agreements that apply to the caller in one process step, read-only, as a run there gets them (#3682). The\nprocess must be the tenant's own; the reader needs `agreements.view` (or manage).",
        "parameters": [
          {
            "name": "processId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectiveAgreementsDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/{id}/preview": {
      "get": {
        "tags": [
          "Agreements"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/{id}/versions/{version}/content": {
      "get": {
        "tags": [
          "Agreements"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/{id}": {
      "get": {
        "tags": [
          "Agreements"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Agreements"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementWriteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementWriteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/{id}/versions": {
      "get": {
        "tags": [
          "Agreements"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/anchors": {
      "get": {
        "tags": [
          "Agreements"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/{id}/rollback/{version}": {
      "post": {
        "tags": [
          "Agreements"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/personal-data": {
      "post": {
        "tags": [
          "Agreements"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementWriteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementWriteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementWriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/agreements/assist": {
      "post": {
        "tags": [
          "Agreements"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementAssistRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementAssistRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AgreementAssistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/ai-budgets/tenants/{tenantId}": {
      "get": {
        "tags": [
          "AiBudgets"
        ],
        "summary": "The tenant's chain: each level's amount, the one that applies, and which levels the caller may change.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiBudgetChainDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AiBudgets"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AiBudgets"
        ],
        "summary": "Back to the partner's or the platform's value. 404 when the tenant had no own budget.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/ai-budgets/partners/{partnerId}": {
      "put": {
        "tags": [
          "AiBudgets"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AiBudgets"
        ],
        "summary": "Back to the platform's value for every tenant of the partner without its own. 404 when there was none.",
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/ai-budgets/platform": {
      "put": {
        "tags": [
          "AiBudgets"
        ],
        "summary": "The platform's starting value. It cannot be removed: without it the budget is zero.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetAiBudgetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PendingApprovalStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/history": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "summary": "What has already been decided, newest first (#3565 follow-up). A separate endpoint from the queue on\npurpose: the queue is a worklist and this is an archive — different order key, different page size, and the\nqueue reloads on every live approval event, which an archive has no business doing. Everything that is not\nPending is history, including the items nobody decided (expired, withdrawn); the row says which.",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "The `NextCursor` of the previous page, or nothing for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Page size; defaults to 25 and is capped at 100.",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/approve": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/reject": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RejectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/skip": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Decide that this round's prepared action does not go out for this held customer (#3458). Only a held\ncustomer action can be skipped, the reason is required, and nothing is written to any source. A second\ndecision on the same review loses the claim and gets a 409.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkipRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SkipRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SkipRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/send-anyway/preview": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "summary": "What this held customer would receive if the reminder goes out after all (#3461): the mail prepared again\nthrough the trial send's own preview path, narrowed to this one customer. Sends nothing and writes nothing.\nGated on the same authority as a decision, since it discloses the recipient address and invoice references.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/send-anyway": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Send this held customer's reminder after all (#3461) — the decision #3458 deliberately left out until it\nwas defined. The mail is prepared again and must still match string SendAnywayRequest.ExpectedContentHash,\nthe hash the reviewer was shown; then the action is released and leaves once, through the one route a held\ncustomer's mail takes. No rule, exception or agreement changes: this decides one action of one run.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendAnywayRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendAnywayRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendAnywayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/delegate-candidates": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "summary": "Candidates to delegate this approval to — people who hold its responsible role (they have the\n    mandate to decide it), minus the caller. Empty when the item has no responsible role or the role has no\n    other holders.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/delegate": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Delegate this approval to a specific person (#1459). Afterwards only that person (or an\n    `agents.manage` holder) may see and decide it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegateApprovalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegateApprovalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DelegateApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/{id}/modify": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Modify before deciding (#1459): supply `editedMutationsJson` for an inline edit (only for\n    reversible &amp; internal items, arguments-only) OR `changeRequestNote` to send it back to the agent.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModifyApprovalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ModifyApprovalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ModifyApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/batch": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Decide many approvals at once (#1459). Batch approve is reversible-only and never for\n    biometric-gated items — ineligible items are skipped, not force-approved.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchApprovalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchApprovalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BatchApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/approvals/process-edit": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Propose a process-definition edit during onboarding (#1107). Requires `agents.manage` and that\nleermodus is enabled for the scope — otherwise the codified process is the hardened baseline and the\nservice refuses (409).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposeProcessEditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposeProcessEditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProposeProcessEditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/agent/turn": {
      "post": {
        "tags": [
          "ArtifactAgent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/BuilderAgentTurnApiRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/BuilderAgentTurnApiRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/BuilderAgentTurnApiRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderAgentTurnResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/agent/execute-tool": {
      "post": {
        "tags": [
          "ArtifactAgent"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ExecuteToolApiRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ExecuteToolApiRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ExecuteToolApiRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuilderToolExecutionResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/copilot/suggestions": {
      "get": {
        "tags": [
          "ArtifactCoPilot"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoPilotSuggestionDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/copilot/scan": {
      "post": {
        "tags": [
          "ArtifactCoPilot"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoPilotScanResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/copilot/suggestions/{suggestionId}/apply": {
      "post": {
        "tags": [
          "ArtifactCoPilot"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "suggestionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/copilot/suggestions/{suggestionId}/dismiss": {
      "post": {
        "tags": [
          "ArtifactCoPilot"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "suggestionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}": {
      "get": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts": {
      "get": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ArtifactType"
            }
          },
          {
            "name": "publishedOnly",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ArtifactDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Artifacts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateArtifactRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateArtifactRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateArtifactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/duplicate": {
      "post": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/draft": {
      "put": {
        "tags": [
          "Artifacts"
        ],
        "summary": "The editors' autosave. A save the service refuses as a write conflict (ArtifactConcurrencyException)\nis left to `GlobalExceptionHandler`, which answers 409 with the refusal's code, so an editor can tell a save\nbuilt on a version no longer live (`artifact-stale-base`) from a draft that raced (#4437).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDraftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDraftRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaveDraftResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Artifacts"
        ],
        "summary": "The draft to write into, made from the live version when there is none. A write conflict is left to\n`GlobalExceptionHandler`, as on Task&lt;IActionResult&gt; ArtifactsController.SaveDraft(Guid id, SaveDraftRequest request, CancellationToken ct = default(CancellationToken)) and Task&lt;IActionResult&gt; ArtifactsController.Publish(Guid id, PublishArtifactRequest request, CancellationToken ct = default(CancellationToken)): one place shapes that 409.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactVersionDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/draft/reset": {
      "post": {
        "tags": [
          "Artifacts"
        ],
        "summary": "Puts the draft back on the live version (#4020): the editor's \"load the newest version\" after a save or publish was\nrefused because a newer version went live. The same gates as Task&lt;IActionResult&gt; ArtifactsController.EnsureDraft(Guid id, CancellationToken ct = default(CancellationToken)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactVersionDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/title": {
      "put": {
        "tags": [
          "Artifacts"
        ],
        "summary": "Renames the artifact: the title every list shows (#4338). It is not versioned, so it applies at once; the same\ngates as Task&lt;IActionResult&gt; ArtifactsController.SaveDraft(Guid id, SaveDraftRequest request, CancellationToken ct = default(CancellationToken)), and only the write-lock holder may rename.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameArtifactRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameArtifactRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RenameArtifactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenameArtifactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/publish": {
      "post": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishArtifactRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishArtifactRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublishArtifactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishArtifactResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/lock": {
      "post": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcquireLockResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/lock/takeover": {
      "post": {
        "tags": [
          "Artifacts"
        ],
        "summary": "Takes the write-lock over for this screen from another open screen of the same user (#4455): the user chose to\ncontinue here after the editor opened read-only. Another user's lock is never taken; the answer then names them.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcquireLockResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/versions": {
      "get": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ArtifactVersionDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{id}/versions/{version}": {
      "get": {
        "tags": [
          "Artifacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactVersionDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifact-templates": {
      "get": {
        "tags": [
          "ArtifactTemplates"
        ],
        "summary": "List all templates for the given artifact type.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ArtifactType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ArtifactTemplate"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/artifact-templates/{templateId}": {
      "get": {
        "tags": [
          "ArtifactTemplates"
        ],
        "summary": "Fetch the full content payload for one template by id.",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactTemplate"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/logs": {
      "get": {
        "tags": [
          "Audit"
        ],
        "summary": "Search aggregated audit logs for the current tenant with optional filters.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Include only entries at or after this timestamp (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Include only entries at or before this timestamp (UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "instanceId",
            "in": "query",
            "description": "Filter to a specific SparkForge instance.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Filter by user identifier (exact match).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "Filter by action category (e.g., \"chat\", \"agent\", \"admin\").",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Free-text search across Action, Details, and UserId columns.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (default 0, mapped to 1-based internally).",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Maximum number of results per page (default 50, max 200).",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/ingest/{instanceId}": {
      "post": {
        "tags": [
          "Audit"
        ],
        "summary": "Pull the latest audit logs from a specific SparkForge instance into Cockpit.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "description": "Source SparkForge instance identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/ingest": {
      "post": {
        "tags": [
          "Audit"
        ],
        "summary": "Pull audit logs from all online SparkForge instances for the current tenant.",
        "description": "The pull covers the caller's own instances plus every shared (global) forge, and without a tenant it runs under\nthe platform chain. So the same rule as the read decides: a caller without a tenant needs `audit.view` at the\nplatform (#4196). Before, a partner admin without a tenant passed the flat permission and started a pull of every\nshared forge under Guid Guid.Empty.",
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/integrity/verify": {
      "post": {
        "tags": [
          "AuditIntegrity"
        ],
        "summary": "Verifies the SHA-256 hash chain integrity for a tenant's audit log.\nReturns whether the chain is intact or where it first breaks.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "description": "Optional tenant ID. Defaults to the current user's tenant.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditChainVerificationResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/integrity/reseal": {
      "post": {
        "tags": [
          "AuditIntegrity"
        ],
        "summary": "Reseals a tenant's hash chain whose ordering was corrupted by the pre-#1608 concurrent-writer\nrace (duplicate sequence numbers / broken previous-hash linkage). Renumbers the hashed entries\ncontiguously and recomputes the hash links so Task&lt;IActionResult&gt; AuditIntegrityController.VerifyChain(Guid? tenantId = null, CancellationToken ct = default(CancellationToken)) passes again.",
        "description": "Platform super-admin only (bool CockpitIdentity.IsUnrestricted): resealing rewrites\nthe tamper-evident chain, so it is the most sensitive audit operation. It is fail-closed\nagainst genuine tampering — if any entry fails its self-hash check the reseal refuses and\nreports the offending entry instead of recomputing (which would bless tampered content).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "description": "Optional tenant ID. Defaults to the current user's tenant.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditChainResealResult"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditChainResealResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/integrity/stats": {
      "get": {
        "tags": [
          "AuditIntegrity"
        ],
        "summary": "Returns statistics about the audit hash chain for a tenant (total entries, hashed vs unhashed, etc.).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "description": "Optional tenant ID. Defaults to the current user's tenant.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditChainStats"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/integrity/entries": {
      "get": {
        "tags": [
          "AuditIntegrity"
        ],
        "summary": "Returns the most recent hash-chain entries for a tenant (newest first). Backs the\nsecurity-events timeline (#1381): it reads the SAME CentralizedAuditLogs chain — with the\nSAME tenant resolution — that Task&lt;IActionResult&gt; AuditIntegrityController.VerifyChain(Guid? tenantId = null, CancellationToken ct = default(CancellationToken))/Task&lt;IActionResult&gt; AuditIntegrityController.GetStats(Guid? tenantId = null, CancellationToken ct = default(CancellationToken)) use, so the\ntimeline and the verification seal can never disagree about which entries exist.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "description": "Optional tenant ID. Defaults to the current user's tenant.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "take",
            "in": "query",
            "description": "Maximum entries to return (1–200, default 50).",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuditLogDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/providers": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Returns all active login providers with their public configuration.\nNo secrets are exposed. Clients use this to dynamically build login buttons.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LoginProviderDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/provider-configs": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Returns full IDP configurations including client secrets.\nInternal endpoint — secured by shared API key, used by frontend apps to register OIDC schemes.",
        "parameters": [
          {
            "name": "X-Internal-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IdpConfigResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/discover": {
      "get": {
        "tags": [
          "AuthDiscovery"
        ],
        "summary": "Returns all matching identity providers for an email domain.\nLogin pages show one button per provider when multiple match.",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/autonomy": {
      "get": {
        "tags": [
          "Autonomy"
        ],
        "summary": "The effective (resolved, most-specific-wins) autonomy decision for a scope — whether autonomous\n    runs are authorised plus the rate/budget caps.",
        "parameters": [
          {
            "name": "processArtifactId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "agentDomain",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Autonomy"
        ],
        "summary": "Upsert an autonomy policy for an exact (tenant, process?, agentDomain?) scope. Requires\n    `agents.manage`. Turning a scope on is the deliberate \"autonomy aan\" switch for that scope.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/autonomy/policies": {
      "get": {
        "tags": [
          "Autonomy"
        ],
        "summary": "All configured autonomy-policy scope rows for the tenant (management view). Requires `agents.manage`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/capabilities": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "summary": "Returns server capabilities and the authenticated user's effective permissions: those of the resolved identity, so\nin scope for the active context and clamped by tier (#1763, #4504), the same set every gated endpoint reads.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerCapabilitiesDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/admin-mode": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "Returns sudo status only for the conversation's current tenant and owner.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatAdminModeDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Chat"
        ],
        "summary": "Changes sudo state for an owned conversation, never without its audit row: on the central database the change and the\nrow commit as one unit; with the tenant's own database the row commits first, and a change that does not land is\nrecorded as `…_failed` with the same correlation id (#4924).",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetChatAdminModeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetChatAdminModeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetChatAdminModeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatAdminModeDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/messages/{messageId}/feedback": {
      "put": {
        "tags": [
          "Chat"
        ],
        "summary": "Sets or clears the owner's reaction atomically, scoped to an assistant message in their conversation.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetChatMessageFeedbackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetChatMessageFeedbackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetChatMessageFeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/completions": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Non-streaming AI chat completion for a conversation.\nReturns 200 with ErrorType set on pipeline errors (the App renders Content as a message).",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationCompletionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationCompletionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationCompletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationCompletionResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/completions/stream": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Streaming AI chat completion for a conversation via Server-Sent Events.\nEach chunk is sent as an SSE data line; the stream ends with data: [DONE].",
        "description": "The feature gate runs inside the action body (after SSE headers) so a denial can emit\na `feature_denied` event instead of a bare 403; do NOT add `[RequireFeature]` here.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationCompletionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationCompletionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationCompletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/runs/active": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "The conversation's turn that is still going (#3806), so a client that restarted — the App, or a reloaded page —\nreattaches to it instead of losing it. 204 when no turn is going.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveChatRunDto"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/runs/{runId}/events": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "Follows a turn's event log as SSE (#3806), from after `Last-Event-ID` — or after — to its\nend, in the frames the stream route writes. A client whose connection broke continues where it was.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/runs/active/cancel": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "The stop button (#3806): ends the conversation's turn that is going. A lost connection no longer does — the turn\nruns on — so stopping is this explicit call. 404 when no turn is going.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveChatRunDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/models": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "    Returns available AI models for the current tenant's connected forges. Includes forges marked\n    unhealthy (e.g. demo instances with fake endpoints) so their seeded models still show; failures\n    surface for real only once a chat is actually attempted.\n    Each model carries the window its source knows (#3646): a chain entry the budget its operator set\n(ContextWindowBudgetTokens, #3689), clamped on the engine's ceiling; a forge the max_model_len it reported. Only\nwithout either does the catalog answer — an Azure deployment name says nothing about the model behind it.\n    Chain entries come first, most specific level first (User → Tenant → ServiceProvider → Platform, as the resolver\nranks them), and a forge only adds the models no entry already named. A forge's own model carries only its\nceiling; the chain entry pointing at it carries the budget the turn really counts with, so the entry must win.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/conversations/available-intents": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "Which chat intents this tenant can actually run — the composer only offers modes that have a\nprovider configured (#1480), via a dry-run per intent (Task&lt;RoutingTrace&gt; IAiPipelineService.DiagnoseAsync(AiPipelineRequest request, DiagnoseSurface surface = DiagnoseSurface.Chat, CancellationToken ct = default(CancellationToken))).\nOnly mode names and reason codes are returned (safe for any user, unlike the admin-gated\nrouting/diagnose). Fails CLOSED (#3447): an intent whose dry-run did not verify a provider chain is\nreported as unavailable with a reason, never offered.\nThe composer offers CHAT modes, so the probe models the chat path — named here rather than left to\nthe default, because the publish gate asks the same service about the agent path (#3725).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableIntentsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/coaching/sessions": {
      "get": {
        "tags": [
          "Coaching"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoachingSessionSummaryDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/coaching/sessions/{id}": {
      "get": {
        "tags": [
          "Coaching"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoachingSessionDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/coaching/sessions/{id}/create-process-scan": {
      "post": {
        "tags": [
          "Coaching"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProcessScanSessionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/compliance/audit-log/export": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Exports audit log entries for a tenant and date range as CSV or JSON.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "description": "Tenant to export. When omitted the current user's tenant is used.\nPlatform admins may pass any tenant ID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the date range (inclusive, UTC). Defaults to 30 days ago.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the date range (inclusive, UTC). Defaults to now.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Export format: `csv` (default) or `json`.",
            "schema": {
              "type": "string",
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/compliance/dsar/export": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Exports all audit log entries for a specific user — GDPR Art. 15 Data Subject Access Request (DSAR).",
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "The user identifier to export data for. Required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "description": "Tenant to search in (defaults to caller's tenant).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the date range. Defaults to 1 year ago.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the date range. Defaults to now.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Export format: `csv` (default) or `json`.",
            "schema": {
              "type": "string",
              "default": "csv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/compliance/dsar/erase": {
      "post": {
        "tags": [
          "Compliance"
        ],
        "summary": "Crypto-shreds the audit-trail PII ABOUT a data subject — GDPR Art. 17 (right to erasure), #2331 Phase 2 Unit E.\nDestroys the subject's per-subject record-pointer DEK(s) so \"what was accessed about them\" becomes permanently\nundecryptable, while the tamper-evident rows stay as tombstones. The caller/operator identity is RETAINED under\nArt. 17(3) (the trail must still prove WHO accessed data). Distinct from `POST /api/dsar/erasure-requests`,\nwhich erases the subject in a SOURCE system via a connector write.",
        "description": "Destructive + compliance-critical, so it is gated on the strongest appropriate permission: super-admin\n(`IsUnrestricted`) OR string CockpitPermissions.GovernanceManage — the same gate the DSAR\nconnector-write erasure (`DsarController.RequestErasure`) already uses. The viewer-tier\nstring CockpitPermissions.ComplianceView (which merely runs the Art. 15 export) is too weak for a\ndestructive erase.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarAuditErasureRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarAuditErasureRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DsarAuditErasureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DsarAuditErasureResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarAuditErasureResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarAuditErasureResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/compliance/voice/dsar/locate": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Art.15 <b>locate</b> for the voice subsystem (#2706 V-E): which recorded calls/meetings a data subject (by\ne-mail) participated in. Read-only, no decrypted transcripts — the presence-and-metadata step before an export.",
        "description": "Gated on the voice-PII read authority: super-admin (`IsUnrestricted`) OR\nstring CockpitPermissions.VoiceViewAll — the voice compliance/governance override that already governs\nreading calls across owners (W5 #1226), i.e. the voice analogue of string CockpitPermissions.AuditViewPii\nfor the audit-trail DSAR. A foreign `tenantId` requires that permission resolved FOR THAT tenant.",
        "parameters": [
          {
            "name": "subject",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDsarExportDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDsarExportDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDsarExportDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/compliance/voice/dsar/erase": {
      "post": {
        "tags": [
          "Compliance"
        ],
        "summary": "Crypto-shreds a data subject's encrypted voice PII — GDPR Art.17, #2706 V-E. Destroys the subject's per-subject\ne-mail DEK(s) so their encrypted participant e-mail becomes permanently undecryptable, while the participant rows\nstay as keyless tombstones. Call transcripts (Epoch-scope, multi-subject) are NOT per-subject erased here —\nretention handles them. Distinct from `dsar/erase` (audit trail) and `POST /api/dsar/erasure-requests`\n(source-system connector write).",
        "description": "Destructive + compliance-critical, so it is gated on the strongest DSAR-erasure authority: super-admin\n(`IsUnrestricted`) OR string CockpitPermissions.GovernanceManage — the SAME gate the audit-trail\nArt.17 erase (Task&lt;IActionResult&gt; ComplianceController.EraseDsar(DsarAuditErasureRequest request, Guid? tenantId = null, CancellationToken ct = default(CancellationToken))) and the connector-write DSAR erasure use, kept consistent across all three\nirreversible erasure surfaces. Strictly stronger than the viewer/voice read gate above. A foreign `tenantId`\nrequires `governance.manage` resolved FOR THAT tenant (partner-admins can't reach an unrelated victim tenant).\nThe operator `reason` is required for discipline + an ephemeral log breadcrumb but is NEVER persisted durably.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceDsarErasureRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceDsarErasureRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceDsarErasureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDsarErasureResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDsarErasureResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDsarErasureResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries": {
      "get": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "List all saved definitions for the (resolved) tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompositeQueryDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Create (first use) or publish a new version of a saved definition. A `score-plan` is validated on save.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertCompositeQueryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertCompositeQueryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertCompositeQueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompositeQueryDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/visible": {
      "get": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "The saved plans the CALLER may view in the App (#2249) — the tenant's published report-/score-/bundle-plans\nfiltered to those an Allow grant resolves for the caller (deny-by-default; super-admin sees every plan it is not\nexplicitly denied, #4159). Unlike the\nmanage endpoints this needs no `entity-types.manage`: any authenticated tenant member may call it and\nthe per-plan grant does the authorising. Returns slim AppPlanDtos (no plan Spec).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AppPlanDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/{name}/view": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Run a saved plan for the App lens (#2249) and return its result — gated by the per-plan visibility grant\n(Task&lt;bool&gt; ICompositeQueryAccessService.CanViewPlanAsync(AccessSubject subject, Guid tenantId, Guid artifactId, CancellationToken ct)), NOT by manage. A viewer without a grant gets\n403; deny-by-default. A bundle (360-overzicht) needs the root entity id; report/score\nplans ignore it.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/{name}/app-visibility": {
      "put": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Publish a saved plan tenant-wide to the App, or hide it again (#2249). The builder toggle — manage-gated\n(this changes who can see the plan). Writes/removes the single tenant-everyone Allow grant.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAppVisibilityRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAppVisibilityRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetAppVisibilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppVisibilityDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "The current tenant-wide App-visibility state of a saved plan (#2249) — the builder toggle state.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppVisibilityDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/{name}": {
      "get": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Get one saved definition by name.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompositeQueryDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Permanently delete a saved definition by name (and its backing artifact + versions).",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/{name}/run": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Run a saved definition by name and return its result (preview/test from the admin UI). Reuses the same validated run path as the copilot tool.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/{name}/render": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "     VIEWER-tier run of a saved report/score-plan for DASHBOARD RENDERING (#2245): a plan-dashboard widget renders\n     this live. Gated on string CockpitPermissions.ReportsView (not the manage rights the builder/preview\n     surface needs), tenant-pinned to the caller (no plan-id IDOR), and routed through the SAME validated\n     `RunSavedPlanAsync` path. Per-source data-access authz genuinely applies here since #2585: the caller's\n     subject is established on the ambient accessor first, so the plan reads with the rights of whoever OPENS the\n     dashboard — not with the rights of whoever configured the plan. A viewer who may see the plan but not its\n     source now gets an authz denial (surfaced with a reason + access request) instead of somebody else's data.\n     A bundle definition isn't renderable as a single-tile widget (it needs a root id) → the engine returns an\n     error envelope the widget surfaces honestly.\n\n     On top of the viewer permission the render path ALSO honours the per-plan App-visibility grant (#2257,\nclosing the curation gap of #2252): a widget may only render a plan that is published to the App for the\ncaller (Task&lt;bool&gt; ICompositeQueryAccessService.CanViewPlanAsync(AccessSubject subject, Guid tenantId, Guid artifactId, CancellationToken ct)). An UNPUBLISHED plan is 403 even to a\nviewer that has the data access to run it — deny-by-default; super-admin needs no grant, but a Deny still binds\nit (#4159). This mirrors the\nApp-lens {name}/view endpoint so both viewer surfaces agree on exactly which plans are visible.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/compose": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "AI-mode (#969 F1): compose a DRAFT plan from a natural-language intent for the operator to review + save. Composes + validates, does NOT run or save.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeDraftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeDraftRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/compose-bundle": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "AI-mode for bundles (#976 B5): compose a DRAFT bundle from a natural-language intent for the operator to review + save. Composes + validates, does NOT run or save.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeDraftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeDraftRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ComposeDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/preview": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Preview an UNSAVED plan (the editor's run button before saving): validates + runs the supplied plan JSON.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewPlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewPlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/preview-report": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Preview an UNSAVED report-plan (#967, warm Query-studio #1347): validates + runs the supplied\n    report-plan JSON and returns `{ columns, rows, markdown, scannedRows, capped, asOf }` (or `{ error }`).\n    Reuses the same validated, deterministic report engine the copilot/scheduler run.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewPlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewPlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/shapes": {
      "get": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Builder palette (#969 F2): the tenant's entity types with their canonical fields + relationships, so the\nvisual builder offers real, catalog-backed options instead of free-text. Backed by the same registry the\ncomposer uses (active bindings) → the builder and the AI see the same ground truth.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EntityShapeDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/inspect": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Statically inspect a plan (#969 F3 — governance + coverage map): per source, is its entity type in the\ncatalog allow-list and what data-access policy (large/freshness/cache-only) applies — without running it.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InspectPlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InspectPlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InspectPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/preview-bundle": {
      "post": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Preview an UNSAVED bundle (#976): validates + runs the supplied bundle JSON for the given root entity id.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewBundleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewBundleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewBundleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          }
        }
      }
    },
    "/api/composite-queries/derive-bundle": {
      "get": {
        "tags": [
          "CompositeQueries"
        ],
        "summary": "Derive a starter bundle spec from an entity type's ProfileLayout (#976 B2) — the builder's \"derive\" button.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "rootEntityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BundleSpec"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conductor/plan": {
      "post": {
        "tags": [
          "Conductor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConductRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConductRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/ticket-conductor/plan": {
      "post": {
        "tags": [
          "Conductor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConductRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConductRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/connector-switches": {
      "get": {
        "tags": [
          "ConnectorSwitches"
        ],
        "summary": "Both layers of every switchable connector for tenantId (default: the caller's own tenant). A\nplatform administrator without a tenant gets the platform layer only.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorSwitchOverviewDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorSwitchOverviewDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorSwitchOverviewDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/connector-switches/changes": {
      "post": {
        "tags": [
          "ConnectorSwitches"
        ],
        "summary": "Previews (bool ConnectorSwitchChangeRequestDto.Apply false) or applies one change.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorSwitchChangeRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorSwitchChangeRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorSwitchChangeRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorSwitchChangeResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorSwitchChangeResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorSwitchChangeResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/connector-write-approvals": {
      "get": {
        "tags": [
          "ConnectorWriteApprovals"
        ],
        "summary": "The pending (still-valid) connector-write approval queue for the caller's tenant. Pass\noriginRecordId to get only the approvals a single Cockpit record minted — the\nDSAR case detail asks that way, so one case can never show another subject's erasure (#3144).",
        "parameters": [
          {
            "name": "originRecordId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/connector-write-approvals/history": {
      "get": {
        "tags": [
          "ConnectorWriteApprovals"
        ],
        "summary": "The readable approval history for this caller (WP-30): decided, expired and still-open rows together, newest\nrequest first. A row leaves the pending queue the moment somebody decides it, so without this endpoint the\nonly trace was the raw audit log in another app.",
        "description": "Read-only by construction: it reaches IConnectorWriteApprovalHistory, which has no method that\ncould approve, extend or revive an approval, so the two-phase binding cannot be touched from this route.\nScope defaults to the caller's own rows and needs nothing beyond a tenant context — those are writes they\nasked for or decided themselves, which they already saw once. ANY wider scope is refused unless the caller\nholds the exact right the pending queue requires (string CockpitPermissions.DataWrite), and a scope\nvalue that is no member of the enum is refused outright; the refusal is explicit rather than a silent\nnarrowing, so a screen never shows a tenant view that is secretly personal. Tenant and user always come from\nthe authenticated identity (IDOR-safe).",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "default": 0,
              "$ref": "#/components/schemas/ConnectorWriteApprovalHistoryScope"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ConnectorWriteApprovalOutcome"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/connector-write-approvals/awaiting-execution": {
      "get": {
        "tags": [
          "ConnectorWriteApprovals"
        ],
        "summary": "The writes this tenant signed that were never carried out (#3657): approved, not consumed, not expired.\nA separate route rather than a widened `List`, because the pending queue has a second caller (the DSAR\ncase detail) that means \"waiting for a person\" — handing it rows that wait for the assistant instead would\nchange what that page shows without anyone asking for it.",
        "parameters": [
          {
            "name": "mine",
            "in": "query",
            "description": "True to see only the writes the calling identity requested.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/connector-write-approvals/{id}/approve": {
      "post": {
        "tags": [
          "ConnectorWriteApprovals"
        ],
        "summary": "Approve a pending write, in the queue originRecordId names (the write queue without it).\nThe write still executes only if the AI presents the SAME write.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "originRecordId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/connector-write-approvals/{id}/reject": {
      "post": {
        "tags": [
          "ConnectorWriteApprovals"
        ],
        "summary": "Reject a pending write, in the queue originRecordId names.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "originRecordId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RejectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/live": {
      "get": {
        "tags": [
          "ConversationMonitor"
        ],
        "summary": "Lists the live (streaming / controlled / recently-active) conversations in the caller's tenant.",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LiveConversationDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/monitor": {
      "get": {
        "tags": [
          "ConversationMonitor"
        ],
        "summary": "Returns the live state of a single conversation, or 404 when it is not currently live.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveConversationDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/takeover": {
      "post": {
        "tags": [
          "ConversationMonitor"
        ],
        "summary": "Takes over a live conversation: halts the in-flight assistant turn and flips the session to\nhuman-controlled. 200 when taken, 404 when not live, 409 when another supervisor already controls it.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationTakeoverResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationTakeoverResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationTakeoverResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{conversationId}/release": {
      "post": {
        "tags": [
          "ConversationMonitor"
        ],
        "summary": "Releases human control of a conversation so the assistant may resume. 200 when released, 404 when\nthe conversation was not under human control.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mobile/conversations": {
      "post": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Creates a new (empty) conversation owned by the current user.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateMobileConversationRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateMobileConversationRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateMobileConversationRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileConversationDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Paginated, optionally-searched history for the current user.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileConversationListResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}": {
      "get": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "A single conversation with its full message history (for re-opening from history).",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileConversationDetailDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Permanently deletes a conversation and all its messages.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/messages": {
      "get": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Just the messages of a conversation, oldest-first.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MobileChatMessageDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/title": {
      "patch": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Renames a conversation.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameMobileConversationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameMobileConversationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RenameMobileConversationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/archive": {
      "post": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Archives a conversation (hides it from the default history without deleting it).",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/stream": {
      "post": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Streams one AI turn for a conversation over Server-Sent Events, persisting both sides. Emits (in\norder): a `trace` provenance event once routing resolves (#1309), then token events, then\n`[DONE]`. On a pipeline failure emits a single `{error,message}` event. The feature gate\n(BasicChat) is checked after the SSE headers so the client sees a clean `feature_denied` event\ninstead of a bare 403 the SSE reader would surface as a generic network error.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileChatStreamRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileChatStreamRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MobileChatStreamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { },
              "text/event-stream": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/regenerate": {
      "post": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Re-runs the last turn (\"Opnieuw\"/regenerate, #1458): drops the previous assistant answer and streams a\nfresh one against the same trailing user message — without duplicating that message. Same SSE contract\nas Task ConversationsMobileController.Stream(Guid conversationId, MobileChatStreamRequest request, CancellationToken ct).",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "intent",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { },
              "text/event-stream": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/runs/active": {
      "get": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "The conversation's turn that is still going (#3806); the phone reattaches to it. 204 when none is.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveChatRunDto"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/runs/{runId}/events": {
      "get": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "Follows a turn's event log as SSE (#3806), from after `Last-Event-ID` — or after — to its\nend, with error texts in Dutch as the stream route writes them.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { },
              "text/event-stream": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/mobile/conversations/{conversationId}/runs/active/cancel": {
      "post": {
        "tags": [
          "ConversationsMobile"
        ],
        "summary": "The stop button (#3806): ends the conversation's turn that is going. 404 when none is.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveChatRunDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/customer-data-jobs": {
      "get": {
        "tags": [
          "CustomerDataJobs"
        ],
        "summary": "The open jobs of every tenant and kind, oldest first.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerDataJobDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/customer-data-jobs/{jobId}/retry": {
      "post": {
        "tags": [
          "CustomerDataJobs"
        ],
        "summary": "An attempt now for an open job, with a fresh attempt budget when it had run out; audited. 404 when the job is not open,\nruns right now, or was never tried and is scheduled for later (a database drop in its grace period).",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/customer-data-placements": {
      "get": {
        "tags": [
          "CustomerDataPlacements"
        ],
        "summary": "Every placement, partners first, oldest first.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerDataPlacementDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/customer-data-placements/{placementId}/retry": {
      "post": {
        "tags": [
          "CustomerDataPlacements"
        ],
        "summary": "A fresh attempt for a placement whose provisioning or migration failed. 204 when queued or nothing was needed, 404 when\nthe placement is gone, 409 when it is not the platform's to retry (a customer's own database, or a retired one).",
        "parameters": [
          {
            "name": "placementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/customer-data-placements/{placementId}/drop-now": {
      "post": {
        "tags": [
          "CustomerDataPlacements"
        ],
        "summary": "Drops the database of a retired placement now, inside its grace period (F6, #4924). Irreversible, so it asks for a fresh\nsign-in and for the first eight characters of the placement id as confirmation, and keeps the reason in the audit. 204\nwhen dropped, 400 when the confirmation or reason is wrong, 404 when the placement is gone, 409 when it is not retired.",
        "parameters": [
          {
            "name": "placementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DropCustomerDataPlacementRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DropCustomerDataPlacementRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DropCustomerDataPlacementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dashboards/{id}/chat-context": {
      "get": {
        "tags": [
          "DashboardChatContext"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChatContextDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChatContextDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChatContextDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-classification/policies": {
      "get": {
        "tags": [
          "DataClassification"
        ],
        "summary": "Get the classification policy for a specific ownership scope.",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataClassificationPolicyDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataClassification"
        ],
        "summary": "Create or update a classification policy for the specified scope.\nLower levels may only make policies stricter.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertClassificationPolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertClassificationPolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertClassificationPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataClassificationPolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-classification/policies/in-scope": {
      "get": {
        "tags": [
          "DataClassification"
        ],
        "summary": "Get all policies in scope (cascade: Platform → SP → Tenant).",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataClassificationPolicyDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-classification/policies/{policyId}": {
      "delete": {
        "tags": [
          "DataClassification"
        ],
        "summary": "Delete a classification policy by ID.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-classification/effective-default": {
      "get": {
        "tags": [
          "DataClassification"
        ],
        "summary": "Get the effective default classification level for a scope (after cascade merge).",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectiveClassificationDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-classification/sync-allowed": {
      "get": {
        "tags": [
          "DataClassification"
        ],
        "summary": "Check if a document with the given classification level may be synced to the target scope.",
        "parameters": [
          {
            "name": "documentLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetOwnerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetOwnerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/grants": {
      "get": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "List the grants on a data source.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataSourceGrantDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Create or update (by subject+access scope) a grant on a data source.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSourceGrantDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/grant-subjects": {
      "get": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "The subjects this caller may name in a grant on this source. One endpoint, gated on the same\npermission as making the grant — the dialog used to assemble this from the roles and users endpoints,\nwhich are gated on `roles.manage` and `users.manage`: rights a tenant admin does not hold,\nso the role list failed for exactly the people this screen is for (#3068).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/grants/{grantId}": {
      "delete": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Revoke (delete) a grant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/access-mode/audit": {
      "get": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Platform-admin compliance check (#1314): list every live (active) tenant NOT on the secure\n`Strict` data-source access mode — the pre-#1157 stragglers that still let the connector-type\ngrant auto-allow sources. `allStrict=true` with an empty list ⇒ the whole fleet is hardened.\nPlatform-admins only (this surveys all tenants); remediate a flagged tenant via\n`PUT /api/data-sources/access-mode?tenantId=…`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSourceModeAuditResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/access-mode": {
      "get": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Get the tenant's current data-source access mode (Strict/Open).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Toggle the tenant's data-source access mode (Strict deny-by-default / Open connector-grant suffices).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourceAccessModeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourceAccessModeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourceAccessModeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/live-overrides": {
      "get": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "List the live-read exceptions on a data source.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataSourceGrantDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Grant (or deny) a subject the live-read exception on a data source.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSourceGrantDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/live-overrides/{grantId}": {
      "delete": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Revoke a live-read exception.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/m365-surfaces/grants": {
      "get": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "List the per-part Microsoft 365 grants of the tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/M365SurfaceGrantDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/m365-surfaces/grant-subjects": {
      "get": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "The users, roles and groups a Microsoft 365 part grant may name: the same scoped directory as the per-source list,\nbehind the same gate as making the part grant, so the admin screen offers exactly what the endpoint below accepts.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantSubjectOptionsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/m365-surfaces/{part}/grants": {
      "post": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Allow or deny a subject one part of Microsoft 365 (create, or update by subject+access scope).",
        "parameters": [
          {
            "name": "part",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365SurfaceGrantDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/m365-surfaces/grants/{grantId}": {
      "delete": {
        "tags": [
          "DataSourceGrants"
        ],
        "summary": "Revoke a per-part Microsoft 365 grant; a grant of any other resource is not found here.",
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources": {
      "get": {
        "tags": [
          "DataSources"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataSourceDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DataSources"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataSourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSourceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/connectors": {
      "get": {
        "tags": [
          "DataSources"
        ],
        "summary": "Every connector a source can be created for (#4699): the registered IEntitySources with their built-in\nstandard entity-type set, the passthrough-only connectors (no entity data, reached through the passthrough only), and the\nsources without a connection of their own (PersonalConnectionSources, #4379), listed with their one rights\nbinding as the standard set and no credential field. Each carries its credential fields and the setup form the connector's\nown credential schema declares, so Management draws the form without knowing the connector assemblies.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorDescriptorDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}": {
      "get": {
        "tags": [
          "DataSources"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSourceDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataSources"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataSourceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataSourceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataSourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSourceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DataSources"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/test": {
      "post": {
        "tags": [
          "DataSources"
        ],
        "summary": "On-demand, read-only connection probe for a configured data source (#1345). Dispatches the\nconnector's own Task&lt;ConnectionTestResult&gt; IEntitySource.TestConnectionAsync(ResolvedBinding binding, CancellationToken ct) (via the admin service, which\nresolves the binding) against the source's first <i>active</i> entity binding. No active binding →\nreported as not-probeable rather than dispatched (an inactive binding would throw). Non-throwing: a bad\ncredential / unreachable host comes back as `Success=false` with an operator-facing reason,\nnever a 5xx. The Studio \"Bronnen\" detail calls this only on user action — never per-row at list\nload (external connectors can be slow). No mutation: this is a probe, not a sync.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginTestResultDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/private-network-approval": {
      "put": {
        "tags": [
          "DataSources"
        ],
        "summary": "Grants or revokes the security-sensitive approval for a source that targets a private/on-prem network.\nThis is deliberately not part of normal source configuration: a tenant administrator can edit connection\nJSON, but only a platform operator can alter the SSRF pin-bypass precondition. A grant is bound to the\nsource's canonical effective origin and to the address ranges that origin may resolve to (#2846); TLS trust is\nindependent.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourcePrivateNetworkApprovalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourcePrivateNetworkApprovalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourcePrivateNetworkApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSourceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/secret": {
      "put": {
        "tags": [
          "DataSources"
        ],
        "summary": "Sets or rotates the source secret. Empty plaintext clears it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourceSecretRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourceSecretRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetDataSourceSecretRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/entities": {
      "post": {
        "tags": [
          "DataSources"
        ],
        "summary": "Attach a canonical entity type to the source: creates/activates a binding under it and makes it the\nwrite-primary. Other sources already serving that type stay ACTIVE and keep serving reads (multi-source\nfederation #1963) — they are only demoted to non-primary; a same-connector binding is retired.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddEntityRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddEntityRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddEntityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityBindingDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/entities/{bindingId}": {
      "delete": {
        "tags": [
          "DataSources"
        ],
        "summary": "Detach an entity binding from the source (hard delete — the type is no longer served via this source). The rights\nbinding of a source without a connection of its own is refused (PersonalConnectionSources).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bindingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/snapshots": {
      "get": {
        "tags": [
          "DataSources"
        ],
        "summary": "List the structured-snapshot configs (+ last-sync state) for a source.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SnapshotConfigDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataSources"
        ],
        "summary": "Upsert the structured-snapshot config for a (source, entity type). Enabling it opts the tenant\ninto a local as-of copy of that entity's data — default off, deliberate choice. Does not sync;\ntrigger a run via the sync endpoint or wait for the scheduled interval. The one exception: an enabled\nsnapshot whose mask (#2099) is not yet applied gets a full sync queued, and its mirror is not read meanwhile.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSnapshotConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSnapshotConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSnapshotConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotConfigDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/snapshots/{entityType}": {
      "delete": {
        "tags": [
          "DataSources"
        ],
        "summary": "Disable + PURGE a snapshot (drops the local copy — federation-principle: purgeable on demand).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/snapshots/{entityType}/sync": {
      "post": {
        "tags": [
          "DataSources"
        ],
        "summary": "Trigger an out-of-band \"sync now\" for an enabled snapshot. Enqueues the scope; the background\nservice runs it (potentially minutes for a large source) and updates last-sync state — poll\nTask&lt;IActionResult&gt; DataSourcesController.ListSnapshots(Guid id, CancellationToken ct). Returns 202 Accepted.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotSyncTriggerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/rag-projections": {
      "get": {
        "tags": [
          "DataSources"
        ],
        "summary": "List the RAG-projection configs (+ consent + last-sync state) for a source.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RagProjectionConfigDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataSources"
        ],
        "summary": "Upsert the RAG-projection config for a (source, entity type). Enabling it is an explicit, stricter\nopt-in to a local embedded copy of that entity's free-text — the server captures who consented + when.\nDISABLING immediately scrubs the index (scrub-on-revoke). Does not sync; trigger a run via the sync\nendpoint or wait for the scheduled interval.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRagProjectionConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRagProjectionConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRagProjectionConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagProjectionConfigDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/rag-projections/{entityType}": {
      "delete": {
        "tags": [
          "DataSources"
        ],
        "summary": "Disable + PURGE a RAG projection (drops the config AND the index — federation-principle: purgeable on demand).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/rag-projections/{entityType}/sync": {
      "post": {
        "tags": [
          "DataSources"
        ],
        "summary": "Trigger an out-of-band \"project now\" for an enabled RAG projection. Enqueues the scope; poll Task&lt;IActionResult&gt; DataSourcesController.ListRagProjections(Guid id, IRagProjectionMoveService moves, CancellationToken ct).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotSyncTriggerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/rag-projections/{entityType}/move": {
      "post": {
        "tags": [
          "DataSources"
        ],
        "summary": "Moves a RAG projection's index to another vector store of the source's environment (#4758): the one explicit way it\nchanges store. The projection is pinned to the target and rebuilt there from the source; its old index is removed\nonce the new one is complete, by the reindex worker. Gated like every RAG projection change on the data-source manage\nright; the move service decides whether the target and the projection allow it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveRagProjectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveRagProjectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MoveRagProjectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MoveRagProjectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "DataSources"
        ],
        "summary": "Where a RAG projection's index lives, the vector stores it can move to, its move in progress and its last move that did\nnot complete (#4758), for the move screen. Gated like the move itself; reads only.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagProjectionMoveStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DataSources"
        ],
        "summary": "Cancels a move that is still rebuilding (#4758): the projection goes back to the vector store it left, whose index was\nnever touched. What the rebuild wrote in the new store is removed later by the leftover sweep. A move whose new index is\ncomplete is no longer cancelled. Gated like the move itself.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MoveRagProjectionResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/rag-projections/{entityType}/preview": {
      "post": {
        "tags": [
          "DataSources"
        ],
        "summary": "#1644: the text and label ONE sample row would get for the field choice in the body, saved or not. Embeds and\nstores nothing; the read is audited without the text.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewRagProjectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewRagProjectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewRagProjectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagProjectionPreviewDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/{id}/knowledge-index": {
      "get": {
        "tags": [
          "DataSources"
        ],
        "summary": "The knowledge index of a data source (#4080): whether it is on, and per preset type how it is doing.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeIndexStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataSources"
        ],
        "summary": "Switch a data source's knowledge index on or off (#4080). On: one projection per preset type that is attached to\nthe source, reading the source directly (nothing is copied into Cockpit), with the preset's text, HTML and filter\nfields and the caller's consent recorded. Off: those projections are disabled and their indexes scrubbed, the same\nway a single projection's disable does. Types the preset names but the source has not attached are left out.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetKnowledgeIndexRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetKnowledgeIndexRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetKnowledgeIndexRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeIndexStatusDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/policies": {
      "get": {
        "tags": [
          "DataSources"
        ],
        "summary": "List the data-access policies for a tenant (large-dataset threshold / freshness budget /\n    cache-only ceiling per source?/entity-type? scope).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataAccessPolicyDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataSources"
        ],
        "summary": "Upsert a data-access policy. The (tenant, source?, entity-type?) scope is the key; re-sending\n    the same scope updates that row.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertDataAccessPolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertDataAccessPolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertDataAccessPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataAccessPolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/data-sources/policies/{policyId}": {
      "delete": {
        "tags": [
          "DataSources"
        ],
        "summary": "Delete a data-access policy row (reverts that scope to the broader row / platform defaults).",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/app-registrations/platform": {
      "get": {
        "tags": [
          "DelegatedAppRegistrations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/app-registrations/platform/{provider}": {
      "put": {
        "tags": [
          "DelegatedAppRegistrations"
        ],
        "summary": "Changes the platform's registration; the service audits every change and never logs or returns the secret.",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/app-registrations/partners/{partnerId}": {
      "get": {
        "tags": [
          "DelegatedAppRegistrations"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/app-registrations/partners/{partnerId}/{provider}": {
      "put": {
        "tags": [
          "DelegatedAppRegistrations"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/app-registrations/tenants/{tenantId}": {
      "get": {
        "tags": [
          "DelegatedAppRegistrations"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/app-registrations/tenants/{tenantId}/{provider}": {
      "put": {
        "tags": [
          "DelegatedAppRegistrations"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AppRegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/demo/skhole": {
      "get": {
        "tags": [
          "DemoReset"
        ],
        "summary": "Whether the demo runs in this environment, its four tenants, and where the demo worlds within the caller's reach\nstand. Always 200 for someone who may operate the demo — \"the demo is off here\" is the status, not a failure to\nreport one. Not audited: it only reads.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkholeDemoStatus"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/demo/skhole/readiness": {
      "get": {
        "tags": [
          "DemoReset"
        ],
        "summary": "    Whether there is room to start another demo scene (#3705): the verdict, the measured cost of one scene, the\n    room per demo tenant, and what this check cannot see. Read-only — it previews the quota, reserves nothing and\n    calls no provider, so it is safe to press between every scene and, like the status, not audited.\n    This one stays on platform.manage alone, where the commands around it were widened to the partner\ntier by #3626. The reason is the answer itself: it reports the daily cap and the remaining budget of all\nfour demo tenants unfiltered, and a service-provider admin reaches only its own. Widening the gate here\nwould mean filtering the answer per reach first, which is a different question from these three blockers.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkholeDemoReadiness"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/demo/skhole/state/{state}": {
      "post": {
        "tags": [
          "DemoReset"
        ],
        "summary": "Puts every demo tenant's scene on the anchor moment state (#4931): `D1` to `D4`, where D3\nand D4 are the time jump with the scene's routine ready. Any other value is refused before anything moves. Like the reset, the switch is for every demo tenant at\nonce, and so it asks the same thing: that the caller manages every demo tenant (#3626).",
        "parameters": [
          {
            "name": "state",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkholeDemoSwitchReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/demo/skhole/reset": {
      "post": {
        "tags": [
          "DemoReset"
        ],
        "summary": "Clears the demo tenants' routines, runs, reviews and routine tiles, the artifacts and chat threads the\nrehearsal itself produced, and starts every demo tenant's scene again. Seeded content stays, including the\nsaved plans D1 opens on — `SkholeDemoResetPlan` holds the full ledger.\nWithout tenantId every demo tenant is reset; with one, it must be a demo tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkholeDemoResetReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/demo/world": {
      "get": {
        "tags": [
          "DemoWorld"
        ],
        "summary": "The demo tenants the operator reaches, with their world state. Empty when the demo is off here.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DemoWorldTenantState"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/demo/world/{tenantId}/reset": {
      "post": {
        "tags": [
          "DemoWorld"
        ],
        "summary": "Drops what the tenant wrote into its demo world and applies the optional anchor or seed.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DemoWorldReset"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DemoWorldReset"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DemoWorldReset"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoWorldReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/dictation/transcribe": {
      "post": {
        "tags": [
          "Dictation"
        ],
        "summary": "Transcribeert een opgenomen dicteer-clip. De ruwe audio is de request-body (octet-stream/audio-*);\n`?intent=private` dwingt on-prem STT af, `?language=` geeft een taal-hint (NL-default aan de\nclient-kant). 413 als de opname te groot is; 503 als er geen (bij Privé: geen on-prem) provider bereikbaar was.",
        "parameters": [
          {
            "name": "intent",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/docstore/scope": {
      "get": {
        "tags": [
          "DocStore"
        ],
        "summary": "What the caller can open in the active context: the platform, the partner and the tenant, with the rights held at each.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocStoreScopeDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/docstore/chain": {
      "get": {
        "tags": [
          "DocStore"
        ],
        "summary": "Everything the tenant sees, newest first: its own documents plus the templates of its partner and the platform, each with its level.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocStoreListDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/docstore/documents": {
      "get": {
        "tags": [
          "DocStore"
        ],
        "summary": "The documents of exactly one level, for whoever manages it.",
        "parameters": [
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocStoreListDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/docstore/document": {
      "get": {
        "tags": [
          "DocStore"
        ],
        "summary": "One document, read through the chain of a tenant (`tenantId`) or on exactly one level (`level` and `ownerId`); an earlier version with `version`.",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocStoreDocumentDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DocStore"
        ],
        "summary": "Previews (bool DocStoreSaveRequest.Apply false) or saves a document at one level. The right is asked at that\nlevel; a document of a level above the caller's own is refused there, not silently written below. A save without the\nstamp of a shown version creates: it is refused with a conflict when the path already holds a document, so a new\ndocument never replaces one unseen. A save with a stamp only overwrites.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocStoreSaveRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocStoreSaveRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocStoreSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocStoreSaveResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/docstore/history": {
      "get": {
        "tags": [
          "DocStore"
        ],
        "summary": "The earlier versions of a document, newest first; the same read scopes as Task&lt;IActionResult&gt; DocStoreController.Document(string path, Guid? tenantId, string? level, Guid? ownerId, int? version, CancellationToken ct).",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocStoreHistoryDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/docstore/document/delete": {
      "post": {
        "tags": [
          "DocStore"
        ],
        "summary": "Previews or deletes a document with all its earlier versions, tied to the version the screen showed. A POST, because the\npath holds slashes and belongs in the body.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocStoreDeleteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DocStoreDeleteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DocStoreDeleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocStoreDeleteResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/forges/{forgeId}/documents/{documentId}/versions": {
      "get": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Get version history for a document on a specific Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/forges/{forgeId}/documents/{documentId}/versions/restore": {
      "post": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Restore a document to a previous version on a specific Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreVersionProxyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreVersionProxyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreVersionProxyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/forges/{forgeId}/retention/expiring": {
      "get": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Get documents expiring within a given number of days on a specific Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "daysAhead",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/forges/{forgeId}/retention/execute": {
      "post": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Execute retention enforcement on a specific Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/retention/overview": {
      "get": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Get retention status across the healthy Forges the caller may govern.",
        "parameters": [
          {
            "name": "daysAhead",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/forges/{forgeId}/approvals/pending": {
      "get": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Get pending document approvals on a specific Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/forges/{forgeId}/approvals/{approvalId}/approve": {
      "post": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Approve a document classification change on a specific Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "approvalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApprovalProxyRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApprovalProxyRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApprovalProxyRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/forges/{forgeId}/approvals/{approvalId}/reject": {
      "post": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Reject a document classification change on a specific Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "approvalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RejectProxyRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RejectProxyRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RejectProxyRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/lifecycle/approvals/overview": {
      "get": {
        "tags": [
          "DocumentLifecycle"
        ],
        "summary": "Get pending approvals across the healthy Forges the caller may govern.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/domain-agent-presets/platform": {
      "get": {
        "tags": [
          "DomainAgentPresets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/domain-agent-presets/platform/{domain}": {
      "put": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/domain-agent-presets/partners/{partnerId}": {
      "get": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/domain-agent-presets/partners/{partnerId}/{domain}": {
      "put": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/domain-agent-presets/tenants/{tenantId}": {
      "get": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/domain-agent-presets/tenants/{tenantId}/effective": {
      "get": {
        "tags": [
          "DomainAgentPresets"
        ],
        "summary": "What applies to the tenant after resolution, with the level that won per domain.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/domain-agent-presets/tenants/{tenantId}/{domain}": {
      "put": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDomainAgentPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DomainAgentPresets"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/domain-agents/{domain}/ask": {
      "post": {
        "tags": [
          "DomainAgents"
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAgentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AskAgentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AskAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/dsar/requests": {
      "get": {
        "tags": [
          "Dsar"
        ],
        "summary": "List the tenant's DSAR cases (metadata only).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DsarRequestDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Dsar"
        ],
        "summary": "Intake: create a new DSAR case. The subject reference is the locator key (metadata only).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DsarCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarRequestDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/open-erasures": {
      "get": {
        "tags": [
          "Dsar"
        ],
        "summary": "The erasures of deleted people in this tenant that are not finished yet (#4755): their content keys or the tenant's own\ndatabase were not reached yet. Read-only; the jobs retry by themselves. Names no person.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpenErasureDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/dsar/open-erasures/{jobId}/retry": {
      "post": {
        "tags": [
          "Dsar"
        ],
        "summary": "Puts an open erasure of this tenant back in the queue for an attempt now (#4755), with a fresh attempt budget when it had\nrun out. Audited. 404 when the job is not an open erasure of this tenant, or is running right now.",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/dsar/requests/{id}": {
      "get": {
        "tags": [
          "Dsar"
        ],
        "summary": "Get one DSAR case.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarRequestDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/requests/{id}/status": {
      "post": {
        "tags": [
          "Dsar"
        ],
        "summary": "Advance the lifecycle stepper.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarStatusUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarStatusUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DsarStatusUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarRequestDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/requests/{id}/verify-identity": {
      "post": {
        "tags": [
          "Dsar"
        ],
        "summary": "Mark the subject's identity verified (e.g. iDIN) before the locator runs.",
        "description": "For an external subject named by a phone number (#4923), \"verified\" must mean the handler has shown that the number\nbelongs to the requester: a call back to that number, or a code sent to it by SMS and read back. A caller-ID is\nspoofable and proves nothing about who owns the line; the voice export releases every call recorded under that number,\nso this is the step that decides whose recordings leave. Nothing here can check it: the handler records the method.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarVerifyIdentityRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarVerifyIdentityRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DsarVerifyIdentityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarRequestDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/requests/{id}/locate": {
      "post": {
        "tags": [
          "Dsar"
        ],
        "summary": "Run the federated locator for a case: searches the subject, records the run, advances to Locator.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarLocateResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/requests/{id}/conversations-export": {
      "get": {
        "tags": [
          "Dsar"
        ],
        "summary": "Art. 15: the case subject's conversations and coaching sessions as a JSON download (#4765). Only for a request for\naccess whose identity is verified, in the caller's own tenant, whose subject is exactly one member of it; content\nunder a destroyed key comes out marked erased. The right is asked live in the case's tenant (#4804 review): neither\nthe claim nor bool CockpitIdentity.IsUnrestricted alone releases it. Rate-limited per user, never cached.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileContentResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/requests/{id}/voice-export": {
      "get": {
        "tags": [
          "Dsar"
        ],
        "summary": "Art. 15: the case subject's voice data as a JSON download (#4861): the calls they were in with transcripts and the\nrecording, and their voiceprints with the reference clip. The gate of the conversation export (#4804): only a request\nfor access with a verified identity, in the caller's own tenant, whose subject is exactly one member of it, and\n`compliance.manage` asked live in that tenant. Rate-limited per user, never cached. Recordings and clips over the\nceilings of VoiceDsarExportLimits are left out and marked; a recording carries the voices of other\nparticipants (art. 15(4)), which the handler reviews before sending. The file is streamed, not indented (#4861 review\nL2), and string DsarController.OmittedTooLargeHeader tells the client how many items were left out for their size without it\nhaving to read the file.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileContentResult"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/locate": {
      "post": {
        "tags": [
          "Dsar"
        ],
        "summary": "Locate a subject across the tenant's active bindings (presence + provenance only).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarLocateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarLocateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DsarLocateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarLocateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/dsar/erasure-requests": {
      "post": {
        "tags": [
          "Dsar"
        ],
        "summary": "Request erasure of a subject in one source — mints a pending connector-write approval (gate 2).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarErasureRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DsarErasureRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DsarErasureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DsarErasureResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/enroll/device-code": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Forge requests a device code to start enrollment.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCodeApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCodeApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCodeApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/verify": {
      "get": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Redirects the admin to the Cockpit Management enrollment approval page.\nThis is the URL shown on the forge's enrollment screen (QR code / deep link).\nFuture: route to the correct SP Management instance based on the device code's tenant.",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/poll": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Forge polls for approval status.",
        "description": "Its own policy (#3623): a forge waiting for approval polls ~32 times per quarter of an hour, and the\nenrollment write envelope is five per quarter of an hour. Sharing it would fail every enrollment about\n90 seconds in — which nobody saw, because the blanket policy overrode both.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PollApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PollApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PollApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/lookup": {
      "get": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Look up pending enrollment request by user code.",
        "parameters": [
          {
            "name": "userCode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/probe": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Probes the API endpoint a pending enrollment advertises, for the reachability badge on the approval page\n(#3927). The endpoint is the one stored on the pending request — this call cannot name another — and\nIForgeEndpointProbe refuses anything but https to a public address, so the anonymous forge that\nwrote it cannot aim the server at an internal one. A refusal is a 200 with `outcome = Refused`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProbeApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProbeApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProbeApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/approve": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Admin approves a pending enrollment request.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/pending-count": {
      "get": {
        "tags": [
          "Enrollment"
        ],
        "summary": "How many enrollment requests are waiting for a decision (#1631). Platform tier only, count only.",
        "description": "    Same tier requirement, and the same reason, as Reject below: the queue is not scoped to any tenant or\n    partner, so nobody below platform scope can be shown to be entitled to see it.\n    Deliberately a number and not a list. A list would publish the hostnames and source IPs of forges that may\nend up belonging to another owner entirely, and it would remove the user-code capability that is today the\nonly way to reach an individual pending row (Task&lt;IActionResult&gt; EnrollmentController.Lookup(string userCode, CancellationToken ct)). The queue-depth chip this exists for\nneeds a number; anything more is a separate decision with a different blast radius.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/reject": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Admin rejects a pending enrollment request (#1633). Platform tier only.",
        "description": "    Not run through Task&lt;bool&gt; EnrollmentController.IsOwnerScopeAuthorizedAsync(InstanceOwnerLevel ownerLevel, Guid? ownerId, Guid? tenantId, Guid? serviceProviderId, CancellationToken ct), unlike Approve and CreateToken, because there\nis nothing for it to constrain: those two take a self-asserted target owner out of the request body (what\n#1954's gate exists for), while a rejection asserts no owner and an EnrollmentRequestEntity carries\nno owner columns at all — the owner is chosen at approval time.\n    That absence is the reason for the tier requirement rather than an excuse to skip one. A partner- or\ntenant-scoped forges.manage holder can be shown to be entitled to approve within their own scope;\nnobody below platform scope can be shown to be entitled to decide a row that has no scope. So this\nendpoint additionally requires string CockpitPermissions.PlatformManage — a member of\nCockpitPermissions.PlatformTier, held only by platform-admin and the unrestricted super-admin and\ndisjoint from every partner- and tenant-scoped built-in role.\n    Possession of the user code is deliberately NOT treated as authorization. It is a capability that gets the\nadmin to the right row (as it does for Lookup); it says nothing about whether that actor may decide it.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RejectApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/create-token": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Admin pre-creates an enrollment token.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTokenApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTokenApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTokenApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forges/enroll/redeem": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Forge redeems a pre-created enrollment token.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RedeemApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/entity-types": {
      "get": {
        "tags": [
          "EntityTypes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "post": {
        "tags": [
          "EntityTypes"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveEntityTypeProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveEntityTypeProfileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveEntityTypeProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/entity-types/{id}": {
      "get": {
        "tags": [
          "EntityTypes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "EntityTypes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/entity-types/{entityType}/connector-schema": {
      "get": {
        "tags": [
          "EntityTypes"
        ],
        "summary": "Live connector schema probe — what the source system actually serves for the given\nentityType on the current tenant. Returns ConnectorKey + Fields (null = connector\ndoesn't expose schema; editor falls back to configured field list).",
        "parameters": [
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/entity-types/pii-suggestions": {
      "post": {
        "tags": [
          "EntityTypes"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PiiSuggestionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PiiSuggestionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PiiSuggestionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/me/exact/connection": {
      "get": {
        "tags": [
          "ExactConnection"
        ],
        "summary": "The caller's own connection, never a token.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExactConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExactConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExactConnectionStatus"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ExactConnection"
        ],
        "summary": "Removes the caller's own connection; the very next read on their behalf fails.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExactDisconnectResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExactDisconnectResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExactDisconnectResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/exact/connections/admin-disconnect": {
      "post": {
        "tags": [
          "ExactConnection"
        ],
        "summary": "A tenant admin removes a colleague's connection in the admin's active tenant; without `Confirmed` only the plan.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExactAdminDisconnectRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExactAdminDisconnectRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExactAdminDisconnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExactAdminDisconnectResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExactAdminDisconnectResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExactAdminDisconnectResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/{instanceId}/federation/config": {
      "get": {
        "tags": [
          "FederationRead"
        ],
        "summary": "Returns the calling node's inherited, redacted federation config as a single snapshot. Authenticated by the\ninstance token; supports conditional GET via `If-None-Match` (ETag) → 304.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationReadResponse"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/feedback": {
      "post": {
        "tags": [
          "Feedback"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitFeedbackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitFeedbackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitFeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Feedback"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "processArtifactId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dashboardId",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FeedbackResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/feedback/{id}": {
      "get": {
        "tags": [
          "Feedback"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/feedback/summary": {
      "get": {
        "tags": [
          "Feedback"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackSummary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/feedback/{id}/acknowledge": {
      "post": {
        "tags": [
          "Feedback"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/feedback/{id}/resolve": {
      "post": {
        "tags": [
          "Feedback"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveFeedbackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveFeedbackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveFeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/fleet": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/can-manage": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}": {
      "delete": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Unregisters a forge through IForgeUnregistrationService, the method the Forges endpoint and the MCP\ntool call too, so this route now writes `forge.unregistered` as well (#1719). A forge that is still a\ntenant's dedicated forge is refused with 409.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/topology": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/nodes": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models/available": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/containers": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/gpu": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models/deploy": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelDeployRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelDeployRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelDeployRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models/switch": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelSwitchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelSwitchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelSwitchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models/stop": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelStopRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelStopRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeModelStopRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models/pause": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models/resume": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/models/cache": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/batch-deploy": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchDeployRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchDeployRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BatchDeployRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/model-library": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CentralModelUpsertRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CentralModelUpsertRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CentralModelUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/model-library/deployable": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/model-library/{id}": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CentralModelUpsertRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CentralModelUpsertRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CentralModelUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/containers/{containerId}/stop": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "containerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/containers/{containerId}/restart": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "containerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/containers/{containerId}/logs": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "containerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tailLines",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/maintenance/backup": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/maintenance/cleanup": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/maintenance/disk-usage": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/diagnostics/health-check": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/training/jobs": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeStartTrainingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeStartTrainingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeStartTrainingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/training/jobs/{jobId}": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/training/jobs/{jobId}/cancel": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/training/datasets": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/training/adapters": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/metrics": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/metrics/history": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "hours",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/fleet-analytics": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/ssl/status": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Get SSL status for a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/ssl/upload": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Upload SSL certificate to a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SslUploadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SslUploadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SslUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/ssl/renew": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Renew SSL certificate on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SslRenewRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SslRenewRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SslRenewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/nginx/sites": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Get Nginx sites on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Create a new Nginx site on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NginxSiteCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NginxSiteCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NginxSiteCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/nginx/sites/{name}": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Get a specific Nginx site on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Update an Nginx site on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NginxSiteUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NginxSiteUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NginxSiteUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Delete an Nginx site on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/mcp-servers/{serverId}": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Get a specific MCP server on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Update an MCP server on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Delete an MCP server on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/mcp-servers": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Create a new MCP server on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/config/categories": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Get configuration categories on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/config/{key}": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Get a specific config value on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Update a config value on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/api-keys": {
      "get": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Get API keys on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Create a new API key on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/api-keys/{keyId}": {
      "delete": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Delete an API key on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forge-management/{forgeId}/api-keys/{keyId}/rotate": {
      "post": {
        "tags": [
          "ForgeManagement"
        ],
        "summary": "Rotate an API key on a Forge.",
        "parameters": [
          {
            "name": "forgeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/register": {
      "post": {
        "tags": [
          "Forges"
        ],
        "summary": "Register a SparkForge instance with Cockpit. Idempotent — updates if hostname already registered.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterForgeApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterForgeApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterForgeApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/{id}/heartbeat": {
      "post": {
        "tags": [
          "Forges"
        ],
        "summary": "Update last heartbeat timestamp for a registered SparkForge instance.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/{id}": {
      "delete": {
        "tags": [
          "Forges"
        ],
        "summary": "Unregister and permanently remove a SparkForge instance from Cockpit. Requires forges.manage AND a\nmanagement relation to this specific forge: platform admins on any forge, a partner-admin only on a forge\nowned by one of their partners or by a tenant one of their partners owns (#3156, #4221). The removal and its\n`forge.unregistered` event run in IForgeUnregistrationService, shared with the MCP tool\n(#1719); a forge that is still a tenant's dedicated forge is refused with 409.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "Get a specific SparkForge instance by its ID.\nPlatform admins see any instance; tenant users only see instances assigned to their tenant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Instance unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Forges"
        ],
        "summary": "Update metadata for a registered SparkForge instance, or transfer its ownership. Who may do that is decided in layer 2\n(Task&lt;ForgeUpdateOutcome&gt; IForgeUpdateService.UpdateAsync(CockpitIdentity actor, Guid forgeId, ForgeOwnershipRequest ownership, ForgeMetadataPatch metadata, CancellationToken ct = default(CancellationToken)), #4543): forges.manage, a management relation to this specific forge\n(platform admins on any forge, a partner-admin only on a forge owned by one of their partners or by a tenant one of\ntheir partners owns), and for a transfer also the right to own a forge at the REQUESTED level/owner, so a partner\ncannot push their own forge up to Platform or across to a stranger (#3156). This action maps the outcome onto HTTP.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Instance unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateForgeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateForgeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateForgeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges": {
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "List all registered SparkForge instances with their current status. Platform admins only.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/admin": {
      "post": {
        "tags": [
          "Forges"
        ],
        "summary": "Administratively create and register a SparkForge instance (bypasses the normal Register flow).\nUseful for pre-seeding instances that have not called /register yet. Platform admins only.",
        "requestBody": {
          "description": "Instance details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateForgeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateForgeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateForgeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/test-connection": {
      "post": {
        "tags": [
          "Forges"
        ],
        "summary": "Test connectivity to a SparkForge instance before registration: `GET {endpoint}/health` through\nIForgeEndpointProbe, the one path by which Cockpit calls a forge it has not approved (#3927).\nAn endpoint the probe refuses to call (not https, credentials in the URL, a non-public address) is a 400 with\nthe refusal code; everything the probe did call is a 200 describing what it found.",
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestConnectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TestConnectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TestConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/targets": {
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "The forges a Studio page may offer as a target (#4682): for an agent deployment or a routing rule. Open to whoever\nmay make those (`agents.manage` or `routing.manage`), not only to the fleet managers of `/active` and\n`/healthy`, and filtered by ForgeTargets, the rule the deployment and the routing rule accept a\ntarget by. Returns what a picker shows and nothing else.",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "`healthy` for the healthy forges, otherwise the active ones.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/active": {
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "List the active SparkForge instances (IsActive = true) this caller may read (#3171, #4224).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/healthy": {
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "List the healthy SparkForge instances (IsHealthy = true) this caller may read (#3171, #4224).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/stale": {
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "List SparkForge instances that have not sent a heartbeat within the stale threshold.\nDefaults to a 2-minute window. Only the forges this caller may read (#3171, #4224).",
        "parameters": [
          {
            "name": "thresholdMinutes",
            "in": "query",
            "description": "Number of minutes without heartbeat to be considered stale (default 2).",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/{id}/usage": {
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "Get daily usage summary for a specific SparkForge instance.\nReturns one InstanceUsageSummaryDto per day that had at least one request.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Instance unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Number of days to look back (default 7).",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 7
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/{id}/config": {
      "get": {
        "tags": [
          "Forges"
        ],
        "summary": "Get the configuration push history for a SparkForge instance (most recent first). Requires forges.manage\nAND a management relation to this specific forge (#3166).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Instance unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Forges"
        ],
        "summary": "Push a new desired configuration to a SparkForge instance. Requires forges.manage AND a management\nrelation to this specific forge: this is the desired STATE the instance then applies, so whoever may\nwrite it drives the forge (#3166).\nCreates a new desired state entry and attempts to apply it immediately via the Management API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Instance unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Configuration payload containing a JSON string of key/value settings.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushConfigApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PushConfigApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PushConfigApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/{id}/config/rollback/{stateId}": {
      "post": {
        "tags": [
          "Forges"
        ],
        "summary": "Roll back a SparkForge instance's configuration to a specific previous desired state. Requires\nforges.manage AND a management relation to this specific forge (#3166).\nCreates a new desired state entry from the old config and pushes it immediately.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Instance unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stateId",
            "in": "path",
            "description": "ID of the DesiredStateEntity to roll back to.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/forges/{instanceId}/usage": {
      "post": {
        "tags": [
          "Forges"
        ],
        "summary": "Ingest a batch of usage events reported directly by a SparkForge instance.\nUsed when requests bypass the Cockpit Proxy (direct API access).\nAuthenticates via the `X-Cockpit-Instance-Token` header which must match\nthe instance's stored AuthToken.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "description": "ID of the reporting instance.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Batch of usage events to ingest.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CockpitUsageEventBatch"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CockpitUsageEventBatch"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CockpitUsageEventBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/glance/tiles/stream": {
      "get": {
        "tags": [
          "Glance"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/GlanceTileDto"
                }
              },
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/glance/tiles": {
      "get": {
        "tags": [
          "Glance"
        ],
        "summary": "The caller's active-tenant glance board — the live KPI tiles that resolve for the tenant. Returns an\nempty board when the caller has no active tenant context (unprovisioned / platform-only).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlanceBoardDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/glance/tiles/{metricKey}": {
      "get": {
        "tags": [
          "Glance"
        ],
        "summary": "The KPI-360 drill-down for one tile of the caller's active tenant: the live hero value plus its\nbreakdown and trend series where the catalog declares them. 404 when the metric key isn't glance-presented.",
        "parameters": [
          {
            "name": "metricKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlanceTileDetailDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/glance/entities/{type}": {
      "get": {
        "tags": [
          "Glance"
        ],
        "summary": "    The multi-source entity-list drill-down (#1963) for one focal type of the caller's active tenant: the\n    type's instances federated LIVE across all the tenant's active sources into one list with per-row\n    provenance + honest per-source degradation (a down source shows its last-known rows beside a live one).\n    Tenant scope comes from the authenticated identity, never the input — a caller can only ever list their\n    own tenant's entities. Optional search narrows the list; `facet` (repeated,\n    `key:value`) filters; `sort` (`field` or `field:desc`) orders; `page` pages.\n    Shapes: 200 with a roll-up status (ok | partial | unavailable); 404\nwhen the type has no active binding for this tenant (unknown/unbound); 400 for a blank type;\n401 for an unknown caller. A degraded source is reflected in the 200 body, never a 5xx.",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "facet",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlanceEntityListDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/governance-policies": {
      "get": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "List governance policies for a specific ownership scope, optionally filtered by type.",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "policyType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GovernancePolicyDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "Create a new governance policy.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGovernancePolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGovernancePolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGovernancePolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GovernancePolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/governance-policies/owners": {
      "get": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "The owners at a scope this caller may manage governance policy for — the same set the write and read\ngates accept, so a picker built on it can never offer an owner the API will refuse (#3105, #3106).",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GovernanceOwnerDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/governance-policies/campaign-approver-roles": {
      "get": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "The approver roles a campaign-mail policy at this scope may name: the set a save of that policy accepts (#4176).\nGated like writing a policy of the same owner: the list serves the editor, and at platform level it spans every tenant of every partner, which a reader of the platform policy may not see.",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CampaignApproverRoleDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/governance-policies/{policyId}": {
      "get": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "Get a specific governance policy by ID.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GovernancePolicyDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "Update an existing governance policy.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGovernancePolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGovernancePolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGovernancePolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GovernancePolicyDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "Delete a governance policy.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/governance-policies/effective": {
      "get": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "Get the effective (cascade-merged) policy for a specific type and scope.",
        "parameters": [
          {
            "name": "policyType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectiveGovernancePolicyDto"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/governance-policies/validate": {
      "post": {
        "tags": [
          "GovernancePolicies"
        ],
        "summary": "Validate an operation against the effective governance policies.\nReturns whether the operation is allowed and the blocking policy if not.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateOperationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateOperationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateOperationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyValidationResultDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/groups": {
      "get": {
        "tags": [
          "Groups"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Groups"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCockpitGroupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCockpitGroupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCockpitGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/groups/{id}": {
      "get": {
        "tags": [
          "Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCockpitGroupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCockpitGroupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCockpitGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/groups/{id}/members": {
      "get": {
        "tags": [
          "Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddGroupMemberRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddGroupMemberRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddGroupMemberRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/groups/{id}/members/{userId}": {
      "delete": {
        "tags": [
          "Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/identity-providers": {
      "get": {
        "tags": [
          "IdentityProviders"
        ],
        "summary": "List all active identity providers.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "IdentityProviders"
        ],
        "summary": "Create a new identity provider.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIdentityProviderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIdentityProviderRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIdentityProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProviderDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/identity-providers/{id}": {
      "get": {
        "tags": [
          "IdentityProviders"
        ],
        "summary": "Get a single identity provider by ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProviderDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "IdentityProviders"
        ],
        "summary": "Update an existing identity provider (partial update).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIdentityProviderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIdentityProviderRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIdentityProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProviderDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "IdentityProviders"
        ],
        "summary": "Soft-delete an identity provider (sets IsActive = false).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/identity-providers/discover-metadata": {
      "post": {
        "tags": [
          "IdentityProviders"
        ],
        "summary": "Fetch OIDC discovery metadata from an authority URL.\nUsed by the onboarding wizard to auto-fill and validate configuration.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OidcDiscoveryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OidcDiscoveryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OidcDiscoveryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OidcDiscoveryResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/immersive/compose": {
      "post": {
        "tags": [
          "ImmersiveComposer"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ImmersiveComposeApiRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ImmersiveComposeApiRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ImmersiveComposeApiRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImmersiveComposeApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/implementation-tasks": {
      "get": {
        "tags": [
          "ImplementationTasks"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ImplementationTaskDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ImplementationTasks"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateImplementationTaskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateImplementationTaskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateImplementationTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImplementationTaskDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/implementation-tasks/{taskId}": {
      "put": {
        "tags": [
          "ImplementationTasks"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateImplementationTaskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateImplementationTaskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateImplementationTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImplementationTaskDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ImplementationTasks"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/implementation-tasks/owners": {
      "get": {
        "tags": [
          "ImplementationTasks"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ImplementationTaskOwnerOption"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/info": {
      "get": {
        "tags": [
          "Info"
        ],
        "summary": "Returns server type and authentication configuration.\nUsed by mobile apps to auto-detect the backend type (SparkForge vs Cockpit).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CockpitInfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/insights/analytics": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Analytics payload for a fleet scope (all forges, or one) and month (default current).",
        "parameters": [
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageAnalyticsDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/insights/forges": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Active forges for the fleet-scope selector.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ForgeOptionDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/overview": {
      "get": {
        "tags": [
          "InstanceBilling"
        ],
        "summary": "Billing overview for a fleet scope (all forges, or one).",
        "parameters": [
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingOverviewDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/credits": {
      "post": {
        "tags": [
          "InstanceBilling"
        ],
        "summary": "Tops up prepaid credits for an instance. Requires platform-manage.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddCreditsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddCreditsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddCreditsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/export/csv": {
      "get": {
        "tags": [
          "InstanceBilling"
        ],
        "summary": "Exports a period as CSV (kosten per model + optional credits-mutaties + verbruik per groep).",
        "parameters": [
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "models",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "mutations",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "groups",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/export/pdf": {
      "get": {
        "tags": [
          "InstanceBilling"
        ],
        "summary": "Exports a period as a PDF invoice (kosten per model + totaal).",
        "parameters": [
          {
            "name": "instanceId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/invoices": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Every invoice the caller may see, newest-issued first. Platform-wide, or SP-clamped to its own partners.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvoiceDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Issues the invoice for a settled period. Idempotent — a re-issue returns the existing document. Requires platform-manage.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueInvoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueInvoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IssueInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/invoices/{id}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "One invoice by id, if the caller may read it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/invoices/{id}/status": {
      "put": {
        "tags": [
          "Invoices"
        ],
        "summary": "Moves an invoice's payment status (Open ↔ Disputed ↔ Paid, validated). Requires platform-manage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetInvoicePaymentStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetInvoicePaymentStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetInvoicePaymentStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/invoices/{id}/export/pdf": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Downloads the invoice as a PDF, rendered from its frozen legs.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/billing/invoices/{id}/export/csv": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Downloads the invoice as a CSV, rendered from its frozen legs.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/analytics/overview": {
      "get": {
        "tags": [
          "KnowledgeAnalytics"
        ],
        "summary": "Get cross-forge knowledge overview (totals, breakdown, compliance).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/analytics/compliance": {
      "get": {
        "tags": [
          "KnowledgeAnalytics"
        ],
        "summary": "Get compliance score per Forge.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/federation/search": {
      "post": {
        "tags": [
          "KnowledgeFederation"
        ],
        "summary": "Execute a federated search across all authorized Forges.\nResults are merged, deduplicated, and re-ranked by relevance score.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedSearchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedSearchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/federation/topology": {
      "get": {
        "tags": [
          "KnowledgeFederation"
        ],
        "summary": "Get the federation topology — which Forges participate and their readiness status.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/learning-mode": {
      "get": {
        "tags": [
          "LearningMode"
        ],
        "summary": "The effective (resolved, most-specific-wins) leermodus for a scope.",
        "parameters": [
          {
            "name": "processArtifactId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roleId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "LearningMode"
        ],
        "summary": "Upsert leermodus for an exact (tenant, process?, role?) scope. Requires `agents.manage`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/learning-mode/scopes": {
      "get": {
        "tags": [
          "LearningMode"
        ],
        "summary": "All configured leermodus scope rows for the tenant (management view).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/m365/admin-consent": {
      "get": {
        "tags": [
          "M365AdminConsent"
        ],
        "summary": "The consent on record for the active tenant and the administrator's own Microsoft organisation.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/M365AdminConsentStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365AdminConsentStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365AdminConsentStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/m365/connection": {
      "get": {
        "tags": [
          "M365Connection"
        ],
        "summary": "The caller's own connection per surface, never a token.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/M365ConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365ConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365ConnectionStatus"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "M365Connection"
        ],
        "summary": "Removes the caller's own connection; the very next read on their behalf fails.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/M365DisconnectResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365DisconnectResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365DisconnectResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/m365/connections/admin-disconnect": {
      "post": {
        "tags": [
          "M365Connection"
        ],
        "summary": "A tenant admin removes a colleague's connection in the admin's active tenant; without `Confirmed` only the plan.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/M365AdminDisconnectRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/M365AdminDisconnectRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/M365AdminDisconnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/M365AdminDisconnectResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365AdminDisconnectResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/M365AdminDisconnectResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp-app/decisions": {
      "post": {
        "tags": [
          "McpAppDecisions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpAppDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpAppDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpAppDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections": {
      "get": {
        "tags": [
          "McpConnections"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpConnectionDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpConnectionDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpConnectionDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "McpConnections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpConnectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpConnectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections/{id}": {
      "get": {
        "tags": [
          "McpConnections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "McpConnections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpConnectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpConnectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "McpConnections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/mcp-connections/ownership": {
      "get": {
        "tags": [
          "McpConnections"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionOwnershipDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionOwnershipDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionOwnershipDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections/policy": {
      "put": {
        "tags": [
          "McpConnections"
        ],
        "summary": "The organisation's choice whether colleagues may add personal sources next to the library; managers only.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpSourcePolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpSourcePolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpSourcePolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/mcp-connections/sign-in-counts": {
      "get": {
        "tags": [
          "McpConnections"
        ],
        "summary": "How many users are signed in per organisation-wide connection, for the library view; managers only.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "type": [
                      "integer",
                      "string"
                    ],
                    "format": "int32"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "type": [
                      "integer",
                      "string"
                    ],
                    "format": "int32"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "pattern": "^-?(?:0|[1-9]\\d*)$",
                    "type": [
                      "integer",
                      "string"
                    ],
                    "format": "int32"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections/{id}/tools": {
      "post": {
        "tags": [
          "McpConnections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections/{id}/call": {
      "post": {
        "tags": [
          "McpConnections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolCallRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolCallRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolCallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-dashboard-bindings/artifacts/{artifactId}/nodes/{nodeId}": {
      "get": {
        "tags": [
          "McpDashboardBindings"
        ],
        "parameters": [
          {
            "name": "artifactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingSelection"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingSelection"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingSelection"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "McpDashboardBindings"
        ],
        "parameters": [
          {
            "name": "artifactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpDashboardBindingSelection"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpDashboardBindingSelection"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpDashboardBindingSelection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingSelection"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingSelection"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingSelection"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "McpDashboardBindings"
        ],
        "parameters": [
          {
            "name": "artifactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/mcp-dashboard-bindings/artifacts/{artifactId}/nodes/{nodeId}/read": {
      "post": {
        "tags": [
          "McpDashboardBindings"
        ],
        "summary": "The read asks the one pipeline after the dashboard's own node and RACI checks. Whatever the pipeline refuses\n(sign in first, paused, gone, changed since the review) travels as its state, so the widget says the right\nword instead of guessing from a status code; only the dashboard's own checks and a race during the read\nanswer with a status.",
        "parameters": [
          {
            "name": "artifactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingReadResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingReadResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDashboardBindingReadResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections/oauth/discover": {
      "post": {
        "tags": [
          "McpOAuthConnections"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthDiscoveryProbeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthDiscoveryProbeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthDiscoveryProbeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthDiscoveryResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthDiscoveryResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthDiscoveryResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections/oauth/{id}/status": {
      "get": {
        "tags": [
          "McpOAuthConnections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthConnectionStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthConnectionStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthConnectionStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-connections/oauth/{id}/disconnect": {
      "post": {
        "tags": [
          "McpOAuthConnections"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthStartRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthStartRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthAuthorizationState"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthAuthorizationState"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthAuthorizationState"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp/oauth/register": {
      "post": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Registers an OAuth client (RFC 7591). Anonymous by design — the MCP spec requires open dynamic\nregistration so clients like claude.ai can onboard without manual setup. The security boundary is\nNOT registration: it is the redirect-URI allowlist enforced here, PKCE, and the user signing in +\nholding the connector-operator role before any token is minted.\n\nRate limited per ADDRESS by its own policy, not by the forge's \"registration\" policy: that one\npartitions on X-Cockpit-Instance-Token, a header this route never checks, so a caller varying it got a\nfresh bucket per request (#3751).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRegistrationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRegistrationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp/oauth/code": {
      "post": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Creates a single-use authorization code for the SIGNED-IN user (the bearer this request carries).\nInternal to the platform: only the Cockpit.App `/mcp/authorize` bridge calls this, after the user\nauthenticated interactively. Expected failures come back as OAuth error codes in the body (200),\nso the bridge can relay them to the client per RFC 6749 §4.1.2.1.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpAuthorizationCodeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpAuthorizationCodeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpAuthorizationCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpAuthorizationCodeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp/oauth/token": {
      "post": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "The public OAuth token endpoint. `authorization_code` redeems a code (+ PKCE verifier) for an\nOption-C access token + rotating refresh token; `refresh_token` rotates. Permissions re-resolve\nfrom the user's CURRENT roles on every grant, so revoking connector-operator takes effect at the\nnext refresh. Accepts form encoding per RFC 6749 §4.1.3.",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string"
                  },
                  "refresh_token": {
                    "type": "string"
                  },
                  "resource": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/mcp/oauth/consents": {
      "get": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Lists the MCP clients the signed-in user has authorized — the read behind the account \"Verbonden\napplicaties\" surface (#1666). Each entry carries when it was granted, when it was last used (token\nissuance granularity), and the environments (tenants) it has operated in. Scoped to the caller; a\nuser never sees another user's grants.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpConnectedAppDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp/oauth/consents/{clientId}": {
      "delete": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Revokes the signed-in user's authorization for an MCP client (#1666). Deletes the consent row, which\nstops silent re-authorization AND fails the client's refresh chain closed — access ends within the\naccess-token lifetime (stateless access tokens already minted are NOT killed mid-flight). Audit-logged.",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp/token": {
      "post": {
        "tags": [
          "McpToken"
        ],
        "summary": "Mints an MCP access token for the current user + their active tenant. Returns 403 when the user holds\nno connector permissions (assign them the `connector-operator` role first), and 503 when minting\nis not configured on this instance.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpTokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/me/mcp-bindings": {
      "get": {
        "tags": [
          "McpToolBindings"
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpToolBindingDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpToolBindingDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpToolBindingDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "McpToolBindings"
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-bindings/{id}": {
      "get": {
        "tags": [
          "McpToolBindings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "McpToolBindings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "McpToolBindings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/mcp-bindings/propose": {
      "post": {
        "tags": [
          "McpToolBindings"
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolMappingProposalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolMappingProposalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolMappingProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolMappingProposalResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolMappingProposalResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolMappingProposalResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-bindings/{id}/call": {
      "post": {
        "tags": [
          "McpToolBindings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingCallRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingCallRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingCallRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolBindingResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/mcp-bindings/{id}/read": {
      "post": {
        "tags": [
          "McpToolBindings"
        ],
        "summary": "The manual read asks the one pipeline and answers with its state as data, like the dashboard read: Today and\nthe rules panel say \"sign in\", \"changed\", \"paused\" or \"gone\" instead of guessing from a status code. Only a\ncaller without an identity is refused with a status.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingReadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingReadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolBindingReadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpReviewedReadResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReviewedReadResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpReviewedReadResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/workday/connection": {
      "get": {
        "tags": [
          "McpWorkday"
        ],
        "summary": "The connection Today works with, and the reader's own time zone so the screen shows moments as the person lives\nthem. The order (chosen binding, own Microsoft 365, Bifrost pilot, own demo source) is the service's; only the pilot\nis decided here, because binding it to the caller needs the browser session's claims.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayConnection"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayConnection"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayConnection"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/workday/connections/{connectionId}/read": {
      "post": {
        "tags": [
          "McpWorkday"
        ],
        "summary": "Reads through the caller's own workday connection. The id is only a name: the connection is resolved again here\nand the rule decides again. A chosen binding and a bound pilot both win, as they do on the connection answer.",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdaySnapshot"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdaySnapshot"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdaySnapshot"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/workday/binding": {
      "put": {
        "tags": [
          "McpWorkday"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpWorkdayBindingSelection"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpWorkdayBindingSelection"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpWorkdayBindingSelection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayBindingSelection"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayBindingSelection"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayBindingSelection"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "McpWorkday"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/me/workday/read": {
      "post": {
        "tags": [
          "McpWorkday"
        ],
        "summary": "The Today read: natively through the reader's own Microsoft 365 connection when there is one (no Bifrost token\nneeded), otherwise through the Bifrost pilot with the reader's bound Bifrost token. A chosen binding is read by the\nreviewed-read pipeline, never here.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdaySnapshot"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdaySnapshot"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdaySnapshot"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/workday/enable": {
      "post": {
        "tags": [
          "McpWorkday"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpWorkdayOptInRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/McpWorkdayOptInRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/McpWorkdayOptInRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayToolResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayToolResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpWorkdayToolResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Returns the current user's Cockpit identity including all SP/tenant assignments.\nReturns IsKnown=false when the AAD user has no Cockpit record yet (first login or not provisioned).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CockpitMeDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/sovereignty": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Returns the data-/model-sovereignty status for the current user's active tenant (#1310).\nDrives the calm day-mode signal in Cockpit.App and the governance surface in Management.\nResolves the <em>effective</em> provider posture (self-hosted SparkForge vs external cloud,\nand whether the instance is healthy), so the signal reflects reality rather than a constant.\nReturns an \"unknown\" status (no day-mode signal) when there is no active tenant context.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SovereigntyStatusDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/sources": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "    Returns the per-source live status for the current user's active tenant (#1995), driving the mobile\n    Profiel-soevereiniteit card's per-bron dots + \"N van M live\" rollup. Real connector metadata + coarse\n    health from the federation layer (IConnectedSourcesService) — three-state (live / offline /\n    niet-verbonden) + last-connected, never a hardcoded \"all live\".\n    Tenant scope comes from the middleware-resolved identity, NEVER from input, so a caller can only ever\nread their own tenant's sources. No active tenant ⇒ an honest empty list (the card's empty state), not\nan error — matching Task&lt;IActionResult&gt; MeController.GetSovereignty(CancellationToken ct)'s no-tenant shape. Federation-safe: connection\nmetadata + health only, never the customer data behind a source.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileSourcesDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/context": {
      "put": {
        "tags": [
          "Me"
        ],
        "summary": "Switches the active (default) context. Useful when the user manages multiple SPs or tenants.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchContextRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchContextRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchContextRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CockpitMeDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/contexts": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Scalable, role-scoped context directory for the hierarchical context-switcher (#1358):\nplatform → partner → tenant, with server-side search + paging so a tenant population in the\nhundreds is never materialised client-side. Three modes (see ContextDirectoryQuery):\nno params = top-level partner groups; `partnerId` = that partner's tenants (lazy drill-down);\n`search` = a flat, paged name-match across the user's whole reachable scope.\nThe tenant/partner boundary is enforced in IContextDirectoryService from the caller's\nown assignments — a partner-admin can never page into another partner's tenants.",
        "parameters": [
          {
            "name": "Search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PartnerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "IncludeSelfTenants",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContextDirectoryDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/preferences": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Returns the current user's preferences (notifications, AI, dashboard), with the source selections of the active\ntenant only. Returns an empty object with defaults when no preferences have been saved yet.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferencesDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Me"
        ],
        "summary": "Saves the current user's preferences: overwrites every preference the user owns, while the server-owned fields —\nthe source selections, the chosen voice and the onboarding mark, each with its own endpoint — stay as stored\n(Task&lt;JsonObject?&gt; IUserPreferenceService.ReplaceAsync(Guid userId, Guid? activeTenantId, JsonObject preferences, CancellationToken ct = default(CancellationToken))). A value outside its bounds (an undefined enum value, an hour\noutside 0–23, a text or map that is too long) is a 400 and nothing is written.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPreferencesDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPreferencesDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserPreferencesDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferencesDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/onboarding/complete": {
      "post": {
        "tags": [
          "Me"
        ],
        "summary": "Marks the guided first-run onboarding (`/onboarding`) done for the current user, with the server's clock. The\nonboarding mark is server-owned, so the preferences save never sets it; this is its one door. Idempotent: the\nfirst completion stands.",
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/source-identities": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Who the caller is in each data source of their active tenant (#3011): every active source, with the\ncaller's id in it or the fact that there is none. This is what a workbench resolves `$me.&lt;bron&gt;`\nagainst, and what the Voorkeuren page lets the caller fill in. Tenant and user come from the resolved\nidentity, never from input.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewerSourceIdentitiesDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/source-identities/{dataSourceId}/discover": {
      "post": {
        "tags": [
          "Me"
        ],
        "summary": "Asks the source's connector for the person with the caller's e-mail address and stores the answer as\nthe link. Always 200 with a result the screen can show — \"not found\" and \"cannot\" are outcomes, not errors.",
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewerDiscoveryResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/meeting-auto-join": {
      "get": {
        "tags": [
          "MeetingAutoJoin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "MeetingAutoJoin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeetingAutoJoinPreferenceDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MeetingAutoJoinPreferenceDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MeetingAutoJoinPreferenceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/meetings": {
      "get": {
        "tags": [
          "MeetingBot"
        ],
        "summary": "List the caller's active meeting-bot sessions. Owner-scoped (W5 #1226): a bare tenant user\n    sees only sessions they initiated; a `voice.view-all` (admin/compliance) caller sees the whole\n    tenant. Never cross-tenant.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/meetings/join": {
      "post": {
        "tags": [
          "MeetingBot"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JoinMeetingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/JoinMeetingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/JoinMeetingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/meetings/health": {
      "get": {
        "tags": [
          "MeetingBot"
        ],
        "summary": "Cockpit-side routing health for a tenant's Vexa connection (#1420) — a live control probe over the\nconnection's transport (direct for Cloud, the reverse forge-tunnel for co-located). Defaults to the\ncaller's own tenant; an explicit tenantId that differs requires\nstring CockpitPermissions.VoiceAdminDispatch (same posture as join). The Management Voice-AI\nsurface consumes this to replace the \"tunnel-health nog niet meetbaar\" placeholder (follow-up after tab 10).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/meetings/{sessionId}": {
      "delete": {
        "tags": [
          "MeetingBot"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/meeting-stt/v1/audio/transcriptions": {
      "post": {
        "tags": [
          "MeetingSttReceiver"
        ],
        "summary": "Receive one per-speaker WAV clip and bridge its PCM into the session's STT stream.",
        "description": "A clip is a few seconds of 16 kHz mono 16-bit audio (~1 MB for a 30 s window), so a generous\n    50 MB body cap rejects egregiously oversized POSTs without ever clipping a real meeting frame.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/notifications": {
      "get": {
        "tags": [
          "MeNotifications"
        ],
        "summary": "Returns the current user's recent notifications (newest first) plus the unread count.\nPass unreadOnly to restrict the list to unread items; the unread\ncount is always the full unread total regardless of the filter.",
        "parameters": [
          {
            "name": "unreadOnly",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationListDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/notifications/{id}": {
      "get": {
        "tags": [
          "MeNotifications"
        ],
        "summary": "One of the current user's notifications, whole: the page a notification links to (#4126). Ownership-guarded like\nTask&lt;IActionResult&gt; MeNotificationsController.MarkRead(Guid id, CancellationToken ct): 404 when the id does not exist or does not belong to the caller.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/notifications/{id}/read": {
      "post": {
        "tags": [
          "MeNotifications"
        ],
        "summary": "Marks a single notification as read. Ownership-guarded: returns 404 when the id does\nnot exist or does not belong to the caller (never reveals another user's notification).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/notifications/read-all": {
      "post": {
        "tags": [
          "MeNotifications"
        ],
        "summary": "Marks every unread notification for the current user (and tenant broadcasts) as read.",
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/push-installations/status": {
      "get": {
        "tags": [
          "MePushInstallations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushRegistrationStatusDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/push-installations/{installationId}": {
      "put": {
        "tags": [
          "MePushInstallations"
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushInstallationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PushInstallationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PushInstallationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "MePushInstallations"
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Push-Device-Proof",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Push-Device-Generation",
            "in": "header",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/platform/model-cost-policies": {
      "get": {
        "tags": [
          "ModelCostPolicies"
        ],
        "summary": "All active model cost policies (catch-all \"*\" first, then per-model). Requires platform-monitor.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModelCostPolicyDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ModelCostPolicies"
        ],
        "summary": "Creates a new per-model policy (honest-state enforced server-side). Requires platform-manage.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelCostPolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelCostPolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelCostPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelCostPolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/model-cost-policies/{id}": {
      "delete": {
        "tags": [
          "ModelCostPolicies"
        ],
        "summary": "Deletes one policy. Requires platform-manage. The catch-all \"*\" fallback cannot be deleted.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ModelCostPolicies"
        ],
        "summary": "Updates one policy's mutable fields (honest-state enforced server-side). Requires platform-manage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelCostPolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelCostPolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelCostPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelCostPolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/monitoring/targets": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "summary": "Prometheus HTTP Service Discovery endpoint.\nRetourneert actieve SparkForge-instances in Prometheus HTTP SD JSON-formaat,\nzodat Grafana Alloy of Prometheus deze dynamisch kan scrapen.\nAuthenticates via X-Prometheus-Token header (if configured) or requires platform admin.",
        "description": "Formaat: https://prometheus.io/docs/prometheus/latest/http_sd/\nGebruik in Grafana Alloy config:\n  prometheus.http_sd \"sparkforge\" {\n    url = \"http://cockpit-api/api/monitoring/targets\"\n    refresh_interval = \"30s\"\n    authorization {\n      type = \"Bearer\"\n      credentials = \"your-prometheus-token\"\n    }\n  }",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/native/code": {
      "post": {
        "tags": [
          "NativeOAuth"
        ],
        "summary": "Creates a single-use authorization code for the SIGNED-IN user (the bearer this request carries).\nInternal to the platform: only the Cockpit.App `/oauth/native/authorize` bridge calls this, after\nthe user authenticated interactively. Expected failures come back as OAuth error codes in the body\n(200) so the bridge can relay them per RFC 6749 §4.1.2.1; an untrusted client/redirect is flagged so\nthe bridge renders the error instead of redirecting to it.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NativeAuthorizationCodeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NativeAuthorizationCodeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NativeAuthorizationCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NativeAuthorizationCodeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/native/consents": {
      "get": {
        "tags": [
          "NativeOAuth"
        ],
        "summary": "Lists the signed-in user's authorized native clients (newest activity first). Self-scoped: the caller\nonly ever sees their own grants. Powers the \"Verbonden applicaties\" surface alongside the MCP grants.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NativeConnectedAppDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/native/consents/{clientId}": {
      "delete": {
        "tags": [
          "NativeOAuth"
        ],
        "summary": "Revokes the signed-in user's authorization for a native client (#1785). Deletes the consent row, which\nstops silent re-authorization AND fails the client's refresh chain closed — access ends within the\naccess-token lifetime (stateless access tokens already minted are NOT killed mid-flight). Audit-logged.",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/oauth/native/token": {
      "post": {
        "tags": [
          "NativeOAuth"
        ],
        "summary": "The public OAuth token endpoint. `authorization_code` redeems a code (+ PKCE verifier) for the\nuniform Cockpit JWT + a rotating refresh token; `refresh_token` rotates. Accepts form encoding per\nRFC 6749 §4.1.3. No client secret — public client.",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string"
                  },
                  "refresh_token": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/navigation": {
      "get": {
        "tags": [
          "Navigation"
        ],
        "summary": "Returns every navigation item owned by the caller's active tenant (the editable set), ordered by\nint NavigationItemEntity.SortOrder. Platform-default template items (the rows without an owning\ntenant) are inherited at render time and are not part of this editable list.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NavigationItemResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Navigation"
        ],
        "summary": "Creates a navigation item in the caller's active tenant.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNavigationItemRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNavigationItemRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNavigationItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationItemResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/navigation/menu": {
      "get": {
        "tags": [
          "Navigation"
        ],
        "summary": "Returns the effective navigation tree for the caller (tenant items + inherited platform defaults),\nfiltered by the caller's roles and seat level (#4150) — a preview of what actually renders in the sidebar.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NavigationItemDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/navigation/{id}": {
      "put": {
        "tags": [
          "Navigation"
        ],
        "summary": "Updates a navigation item owned by the caller's active tenant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNavigationItemRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNavigationItemRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNavigationItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationItemResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Navigation"
        ],
        "summary": "Deletes a navigation item owned by the caller's active tenant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/notifications/actions/{cardAction}": {
      "post": {
        "tags": [
          "NotificationActions"
        ],
        "parameters": [
          {
            "name": "cardAction",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "410": {
            "description": "Gone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/oauth/{provider}/start": {
      "post": {
        "tags": [
          "OAuthCallback"
        ],
        "summary": "Starts a round of provider bound to the browser; returns the provider's sign-in address or why there is none.",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthStartRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthStartRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthStartResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthStartResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthStartResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/oauth/complete": {
      "post": {
        "tags": [
          "OAuthCallback"
        ],
        "summary": "Completes the caller's own round with what the provider sent to the App's callback and the browser's nonce.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthCompleteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthCompleteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthCompleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthCompleteResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthCompleteResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthCompleteResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/one-time-secrets/{id}/reveal": {
      "post": {
        "tags": [
          "OneTimeSecrets"
        ],
        "summary": "Takes the secret for the caller in their active environment, once.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OneTimeSecretRevealDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/assignable-roles": {
      "get": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Organizational roles available for task routing in the active tenant.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrchestrationRoleOptionDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks": {
      "get": {
        "tags": [
          "Orchestration"
        ],
        "summary": "List tasks for the current tenant with optional filters.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrchestrationTaskDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Create a new orchestration task.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrchestrationTaskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrchestrationTaskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrchestrationTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchestrationTaskDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/{id}": {
      "get": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Get a single task by id (tenant-scoped).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchestrationTaskDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/my": {
      "get": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Tasks claimed by the current user.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrchestrationTaskDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/my/open": {
      "get": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Pending work for the current user's roles plus tasks claimed by the current user.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrchestrationTaskDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/role/{role}": {
      "get": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Tasks assigned to a role within the current tenant.",
        "parameters": [
          {
            "name": "role",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrchestrationTaskDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/{id}/claim": {
      "post": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Claim a pending task for the current user. A task of a step that runs a routine is the routine's (#3840) and is\nrefused: a person holding it could neither finish it nor hand it back to the run.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchestrationTaskDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/{id}/complete": {
      "post": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Complete a task. Optional ResultJson drives conditional branching via __next_task_type. A task of a step that runs\na routine is refused (#3840): that step moves when its run settles, and completing it here would move it on a\nresult the routine never produced.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CompleteOrchestrationTaskRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CompleteOrchestrationTaskRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CompleteOrchestrationTaskRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchestrationTaskDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/{id}/skip": {
      "post": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Skip a task with an optional reason.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SkipOrchestrationTaskRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SkipOrchestrationTaskRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SkipOrchestrationTaskRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchestrationTaskDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/{id}/escalate": {
      "post": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Escalate a task to the responsible manager.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/EscalateOrchestrationTaskRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/EscalateOrchestrationTaskRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/EscalateOrchestrationTaskRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchestrationTaskDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/orchestration/tasks/{id}/reassign": {
      "post": {
        "tags": [
          "Orchestration"
        ],
        "summary": "Reassign a Claimed task to another user.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReassignOrchestrationTaskRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReassignOrchestrationTaskRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReassignOrchestrationTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchestrationTaskDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/organizational-roles": {
      "get": {
        "tags": [
          "OrganizationalRoles"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "OrganizationalRoles"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationalRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationalRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationalRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/organizational-roles/effective": {
      "get": {
        "tags": [
          "OrganizationalRoles"
        ],
        "summary": "The roles as they hold in the active tenant: one per slug, the most specific level wins (#4396). For screens that\nstore a role by its slug, such as the process builder; Task&lt;IActionResult&gt; OrganizationalRolesController.GetAll(CancellationToken ct) lists every level for management.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/organizational-roles/{id}": {
      "get": {
        "tags": [
          "OrganizationalRoles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "OrganizationalRoles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationalRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationalRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationalRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "OrganizationalRoles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/organizational-roles/{id}/users": {
      "get": {
        "tags": [
          "OrganizationalRoles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "OrganizationalRoles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignOrganizationalRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignOrganizationalRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignOrganizationalRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/organizational-roles/{id}/users/{userId}": {
      "delete": {
        "tags": [
          "OrganizationalRoles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/organizational-roles/users/{userId}": {
      "get": {
        "tags": [
          "OrganizationalRoles"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/partners/{partnerId}/identity-policy/managed-transition/preview": {
      "get": {
        "tags": [
          "PartnerIdentityPolicy"
        ],
        "summary": "Non-mutating impact preview of moving the SP to Managed/EMU mode: how many cross-SP guest memberships\nwould lapse and how many extra IdPs/emails would be unlinked, plus the per-member breakdown. Platform-tier\ngated (same authority as Task&lt;IActionResult&gt; PartnerIdentityPolicyController.Apply(Guid partnerId, CancellationToken ct)) — the preview already names affected members.",
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTransitionPreview"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/partners/{partnerId}/identity-policy/managed-transition/apply": {
      "post": {
        "tags": [
          "PartnerIdentityPolicy"
        ],
        "summary": "Applies the Managed transition: flips the mode and reconciles the SP's pre-existing out-of-wall state.\nOne-way and mass-revoking — platform-tier gated. The audit actor is the authenticated caller, never a\nclient-supplied value. Idempotent (a second call is a no-op).",
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagedTransitionResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{partnerId}/pricing": {
      "get": {
        "tags": [
          "PartnerPricing"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PartnerPricingDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PartnerPricing"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerPricingUpsertRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerPricingUpsertRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerPricingUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerPricingDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{partnerId}/pricing/{id}": {
      "put": {
        "tags": [
          "PartnerPricing"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerPricingUpsertRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerPricingUpsertRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerPricingUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerPricingDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PartnerPricing"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{partnerId}/revenue": {
      "get": {
        "tags": [
          "PartnerRevenue"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerRevenueDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/partners/{partnerId}/usage-statement": {
      "get": {
        "tags": [
          "PartnerUsageStatement"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/partners/{partnerId}/usage-statement/export": {
      "get": {
        "tags": [
          "PartnerUsageStatement"
        ],
        "summary": "The statement to invoice from: `format=csv` (default) or `format=json`, same figures, no persons.",
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/learnings": {
      "get": {
        "tags": [
          "PendingLearnings"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PendingLearningStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/learnings/{id}/accept": {
      "post": {
        "tags": [
          "PendingLearnings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/learnings/review-queue": {
      "get": {
        "tags": [
          "PendingLearnings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/learnings/{id}/dismiss": {
      "post": {
        "tags": [
          "PendingLearnings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/personal-conversations": {
      "get": {
        "tags": [
          "PersonalConversations"
        ],
        "parameters": [
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalConversationListResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalConversationListResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalConversationListResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/personal-conversations/voice/{callId}": {
      "get": {
        "tags": [
          "PersonalConversations"
        ],
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalVoiceDetailDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalVoiceDetailDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonalVoiceDetailDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/licenses": {
      "get": {
        "tags": [
          "PlatformLicenses"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlatformLicenses"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateLicenseDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateLicenseDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateLicenseDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/licenses/partner/{partnerId}": {
      "get": {
        "tags": [
          "PlatformLicenses"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/licenses/validate": {
      "post": {
        "tags": [
          "PlatformLicenses"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateLicenseRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateLicenseRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateLicenseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/licenses/{id}": {
      "delete": {
        "tags": [
          "PlatformLicenses"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners": {
      "get": {
        "tags": [
          "PlatformPartners"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlatformPartners"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{id}": {
      "get": {
        "tags": [
          "PlatformPartners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "PlatformPartners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePartnerDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePartnerDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePartnerDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PlatformPartners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": { }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{id}/tenants": {
      "get": {
        "tags": [
          "PlatformPartners"
        ],
        "summary": "The tenants this partner owns (`Tenants.ServiceProviderId`), read-only: a tenant has exactly one partner, set on\nthe tenant itself, so there is nothing to link or unlink here (#4221).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{id}/azure-tenant": {
      "put": {
        "tags": [
          "PlatformPartners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAzureAdTenantDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAzureAdTenantDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetAzureAdTenantDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{id}/consent-url": {
      "get": {
        "tags": [
          "PlatformPartners"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customerTenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/azure-ad-callback": {
      "get": {
        "tags": [
          "PlatformPartners"
        ],
        "summary": "Azure AD admin consent callback (#4418). Called by Azure after admin grants/denies consent, at one fixed\naddress for every partner (string IPartnerService.ConsentCallbackPath). Anonymous by necessity, so the\nonly proof is `state`: the single-use, expiring nonce Task&lt;IActionResult&gt; PlatformPartnersController.GetConsentUrl(Guid id, string customerTenantId) minted for that link,\nlooked up by its hash and consumed here. A partner id, a guessed value or a replayed nonce changes nothing.\nAfterwards the browser goes back to the partner page in Management.",
        "parameters": [
          {
            "name": "admin_consent",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Found",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{id}/verify-consent": {
      "post": {
        "tags": [
          "PlatformPartners"
        ],
        "summary": "On-demand re-check of consent status via Graph API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/partners/{id}/mark-consented": {
      "post": {
        "tags": [
          "PlatformPartners"
        ],
        "summary": "Manual override: mark a partner as consented without Graph API check.\nUsed when admin consent was granted outside the automated flow.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/pricing": {
      "get": {
        "tags": [
          "PlatformPricing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformPricingConfigDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/pricing/floor": {
      "get": {
        "tags": [
          "PlatformPricing"
        ],
        "parameters": [
          {
            "name": "tier",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformPricingConfigDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/pricing/floors": {
      "get": {
        "tags": [
          "PlatformPricing"
        ],
        "summary": "Returns all currently active floor-price rows. Accessible to any authenticated user so\nthat tenant-facing pages (e.g. the demo tier page) can display list prices without\nrequiring partner-admin or platform-admin permissions. Floor prices are list prices\n(minimum monthly price per tier) and are not commercially sensitive.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformPricingConfigDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/releases": {
      "get": {
        "tags": [
          "PlatformReleases"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlatformReleases"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReleaseRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReleaseRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReleaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/widgets": {
      "get": {
        "tags": [
          "PlatformWidgets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PlatformWidgets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterWidgetDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterWidgetDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterWidgetDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/widgets/{id}": {
      "delete": {
        "tags": [
          "PlatformWidgets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Lists all available plugins in the catalog.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PluginSummaryDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/{pluginId}": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Gets a specific plugin by ID.",
        "parameters": [
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Gets all active plugins for a tenant. Config secrets are masked in the response.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantPluginDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/activate/{pluginId}": {
      "post": {
        "tags": [
          "Plugin"
        ],
        "summary": "Activates a plugin for a tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ActivatePluginRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ActivatePluginRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ActivatePluginRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/deactivate/{pluginId}": {
      "post": {
        "tags": [
          "Plugin"
        ],
        "summary": "Deactivates a plugin for a tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/config/{pluginId}": {
      "put": {
        "tags": [
          "Plugin"
        ],
        "summary": "Updates configuration for an active plugin-tenant pair.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePluginConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePluginConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePluginConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/{pluginId}/webhook-secret": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Gets the webhook secret for a tenant-plugin pair.\nUsed by external systems to calculate X-Cockpit-Signature for inbound webhooks.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/{pluginId}/webhook-secret/rotate": {
      "post": {
        "tags": [
          "Plugin"
        ],
        "summary": "Rotates the webhook secret for a tenant-plugin pair (#2602). The replaced secret keeps being accepted\nfor a short overlap window so the sender can be reconfigured without dropping deliveries; pass\n`overlapHours = 0` for an immediate cut-over (suspected compromise).",
        "description": "This is the ONLY way a webhook secret changes. Activation used to rotate it silently on every\nenable/disable, which broke live senders with no signal anywhere — that side effect is gone.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "overlapHours",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/events/{tenantId}": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Gets recent plugin events for a tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxCount",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PluginEventDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/health": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Gets health status for all plugins, combining registry data with runtime health tracking.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PluginHealthDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/test/{pluginId}": {
      "post": {
        "tags": [
          "Plugin"
        ],
        "summary": "Probe a plugin's configured connection for the given tenant. Returns\n`NotSupported=true` when the plugin does not implement\nIPluginConnectionTester; otherwise reports the probe result.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginTestResultDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/writeback-actions/{pluginId}": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Lists the write-back actions a plugin supports (for UI + permission configuration). Tenant-scoped\n(#420 F2) so an arbitrary member of another tenant can't enumerate a plugin's action surface; the\ninternal compensating-only actions are not exposed.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WriteBackActionDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/writeback-config/{pluginId}": {
      "put": {
        "tags": [
          "Plugin"
        ],
        "summary": "Sets a tenant's write-back permissions (master opt-in + allowed actions) for a plugin.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetWriteBackPermissionsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetWriteBackPermissionsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetWriteBackPermissionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/writeback/{pluginId}/{actionType}": {
      "post": {
        "tags": [
          "Plugin"
        ],
        "summary": "Executes a write-back action against the external system (gated, audited, idempotent).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actionType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteWriteBackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteWriteBackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExecuteWriteBackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteBackOutcomeDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/writeback/rollback/{logId}": {
      "post": {
        "tags": [
          "Plugin"
        ],
        "summary": "Rolls back a previous write-back via its compensating action (within the window).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteBackOutcomeDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/tenant/{tenantId}/writeback/log": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Lists a tenant's recent write-backs for the audit/rollback UI.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxCount",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WriteBackLogDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/plugins/webhook/{pluginId}/{tenantId}": {
      "post": {
        "tags": [
          "PluginWebhook"
        ],
        "summary": "Receives a webhook payload from an external system and routes it to the plugin's event handler.\nRequires the headers described by PluginWebhookSignature:\n`X-Cockpit-Signature`, `X-Webhook-Timestamp` and `X-Webhook-Nonce` — all three\nrequired, all three covered by the signature. The one exception is Graph's subscription handshake.",
        "parameters": [
          {
            "name": "pluginId",
            "in": "path",
            "description": "Target plugin ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "path",
            "description": "Target tenant ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/power-automate/agents/{agentId}/execute": {
      "post": {
        "tags": [
          "PowerAutomateActions"
        ],
        "summary": "Executes an AI agent on the SparkForge instance it is deployed to (#4420). The agent is resolved through its\nAgentDeploymentEntity — (InstanceId, RemoteAgentId) on a healthy, trusted instance — and only a\ndeployment owned by the caller's tenant may run, unless the caller holds platform.manage. A deployment whose\nowner is unknown (`TenantId == null`) fails closed. Running an agent is using AI, not designing it, so the\ngate is chat.use (the viewer-tier right the chat surface asks), not the builder-tier agents.manage.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "description": "The agent id as SparkForge knows it (the deployment's RemoteAgentId).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaExecuteAgentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PaExecuteAgentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PaExecuteAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaExecuteAgentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/power-automate/rag/collections/{collectionId}/query": {
      "post": {
        "tags": [
          "PowerAutomateActions"
        ],
        "summary": "Queries a central RAG collection by finding an active instance that has it synced,\nthen proxying the search request to that instance.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "The central RAG collection identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaQueryRagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PaQueryRagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PaQueryRagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaQueryRagResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/power-automate/webhook": {
      "post": {
        "tags": [
          "PowerAutomate"
        ],
        "summary": "Subscribes to a Cockpit event via webhook.",
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeWebhookRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeWebhookRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeWebhookResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeWebhookResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/power-automate/webhook/{id}": {
      "delete": {
        "tags": [
          "PowerAutomate"
        ],
        "summary": "Unsubscribes from a Cockpit webhook.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Subscription identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/preview-features/tenants/{tenantId}": {
      "get": {
        "tags": [
          "PreviewFeatures"
        ],
        "summary": "Every preview feature of tenantId: each level's explicit value and the effective one.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewFeatureOverviewDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/preview-features/policies": {
      "put": {
        "tags": [
          "PreviewFeatures"
        ],
        "summary": "Sets, withdraws or clears (back to inherit) one level of one preview feature.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewFeatureChangeRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewFeatureChangeRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewFeatureChangeRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewFeatureChangeResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes": {
      "get": {
        "tags": [
          "ProcessDefinitions"
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessDefinitionDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ProcessDefinitions"
        ],
        "summary": "Creates a process definition in the caller's environment through the layer-2 door the MCP tool shares (#1722). A\ndefinition that breaks a rule answers 400 with `{ error, problems }` and writes nothing.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessDefinitionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/{id}": {
      "get": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessDefinitionDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ProcessDefinitions"
        ],
        "summary": "Edits a definition's metadata only, through the layer-2 door the MCP tool shares (#1722): the steps — their keys and\norder included — the department and the diagram stay as they are (#3573). A process of another environment is not\nfound; a definition that breaks a rule answers 400 with `{ error, problems }`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessDefinitionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/{id}/steps": {
      "get": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessStepDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessStepDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/{id}/steps/{stepKey}": {
      "put": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessStepDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/{id}/steps/{stepKey}/transitions": {
      "put": {
        "tags": [
          "ProcessDefinitions"
        ],
        "summary": "Sets the complete list of branches of a step (#1468); an empty list clears them. Their own endpoint, so an edit of\nthe step's other fields never touches them and a half-typed condition is never sent. A branch to a step the process\ndoes not have, or an incomplete condition, is refused by the definition rules with a sentence per problem (400).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetStepTransitionsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetStepTransitionsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetStepTransitionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessStepDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/{id}/simulate-flow": {
      "post": {
        "tags": [
          "ProcessDefinitions"
        ],
        "summary": "The designer's test run (#1468): the route a run would take through the process with the given data, from its first\nstep, decided by the same resolver the runtime asks. Reads only; a route that returns to a step is reported as a loop.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateProcessFlowRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateProcessFlowRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateProcessFlowRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessFlowSimulationDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/{id}/steps/reorder": {
      "post": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderStepsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderStepsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderStepsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/processes/{id}/links": {
      "get": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessLinkDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ProcessDefinitions"
        ],
        "summary": "Links this process to another. Both ends must be processes of the caller's environment (layer 2 checks it): otherwise\na link could name another environment's process and leak it through the outgoing links.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessLinkDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/links/{linkId}": {
      "delete": {
        "tags": [
          "ProcessDefinitions"
        ],
        "parameters": [
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/processes/{id}/generate-dashboard": {
      "post": {
        "tags": [
          "ProcessDefinitions"
        ],
        "summary": "Generates the process's dashboard, or publishes a new version of it, recorded for the caller. Designing a\ndashboard is Stuur (`dashboards` on the caller's seat, #4150), as in the artifact endpoints. Refused with a\n409 that names the holder while another user edits the dashboard in Studio, so that edit is never overwritten.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratedDashboardDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/processes/{id}/steps/{stepKey}/agent-template": {
      "get": {
        "tags": [
          "ProcessSteps"
        ],
        "summary": "Returns the current AgentTemplate assignment for a process step.\nUsed by the Process Designer to pre-select the dropdown on step open.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessStepAgentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ProcessSteps"
        ],
        "summary": "Assigns or clears the AgentTemplate linked to a process step. Pass\n`AgentTemplateId = null` to clear. Returns the updated assignment.\nChanging a step is designing the process, so it asks `process.design` (#4138).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetStepAgentTemplateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetStepAgentTemplateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetStepAgentTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessStepAgentDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/prompt-overlays": {
      "get": {
        "tags": [
          "PromptOverlays"
        ],
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromptOverlayDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PromptOverlays"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavePromptOverlayRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SavePromptOverlayRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SavePromptOverlayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOverlayDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/prompt-overlays/{id}": {
      "put": {
        "tags": [
          "PromptOverlays"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavePromptOverlayRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SavePromptOverlayRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SavePromptOverlayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOverlayDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PromptOverlays"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/proposal": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/proposal/pdf": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/proposal/accept": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposalAcceptRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposalAcceptRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProposalAcceptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalAcceptResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/proposal/send": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposalSendFollowUpRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposalSendFollowUpRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProposalSendFollowUpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": { }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/provider-chain-entries": {
      "get": {
        "tags": [
          "ProviderChainEntries"
        ],
        "summary": "Lists provider-chain entries visible to the caller. Optional filter by ownership level\n+ owner id. Without filters, returns every entry the caller is authorised to read.",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/InstanceOwnerLevel"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderChainEntryDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ProviderChainEntries"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProviderChainEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProviderChainEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProviderChainEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderChainEntryDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/provider-chain-entries/chain": {
      "get": {
        "tags": [
          "ProviderChainEntries"
        ],
        "summary": "     Read-only \"inherited chain\" view for the calling persona: the Platform floor (always visible), plus the\n     caller's own ServiceProvider / Tenant / User entries. Powers the Studio (workspace) and App (personal/BYOK)\n     lenses of the unified AI-providers UI (#1286), which render each row's provenance (\"inherited from Platform /\n     overridden at tier X\"). Only non-secret metadata crosses the wire — the encrypted key is never projected\n     (bool ProviderChainEntryDto.HasKey is the only signal). All mutation stays on the tier-gated CRUD\n     endpoints, so seeing the floor never grants editing it.\n\n     This action carries only the controller-level [Authorize] (no per-tier policy) — the relaxed read-only\nvisibility of the inherited chain is deliberate (TARGET-IA ①: Studio/App see the Platform tier read-only as\ncontext). To keep that conservative, Task&lt;IReadOnlyList&lt;ProviderChainEntryEntity&gt;&gt; IProviderChainAdminService.ListInheritedChainAsync(ProviderChainCaller caller, CancellationToken ct = default(CancellationToken)) redacts\nApiEndpoint + ProviderSpecificConfigJson on rows the caller cannot write, so internal infra\ndetails (private endpoints, Azure deployment names) are not exposed to non-owning callers.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderChainEntryDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/provider-chain-entries/{id}": {
      "get": {
        "tags": [
          "ProviderChainEntries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderChainEntryDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ProviderChainEntries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProviderChainEntryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProviderChainEntryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProviderChainEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderChainEntryDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ProviderChainEntries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/provider-chain-entries/{id}/key": {
      "put": {
        "tags": [
          "ProviderChainEntries"
        ],
        "summary": "Sets or rotates the API key. Sending an empty string clears the key — the entry stays\nin the table but is effectively disabled until a key is set (and IsActive may need\nflipping too).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetProviderChainEntryKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetProviderChainEntryKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetProviderChainEntryKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/provider-chain-entries/{id}/test-connection": {
      "post": {
        "tags": [
          "ProviderChainEntries"
        ],
        "summary": "Live reachability probe for a single entry (#2026). Authorised exactly like Task&lt;IActionResult&gt; ProviderChainEntriesController.Get(Guid id, CancellationToken ct) (the caller\nmust be able to read the entry). Self-hosted SparkForge entries are health-checked transport-aware; cloud\nentries return ProviderReachabilityStatus.Unknown (not probed). The probe never throws — a\ndead endpoint resolves to ProviderReachabilityStatus.Unreachable.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderReachabilityDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotas/check": {
      "get": {
        "tags": [
          "Quotas"
        ],
        "summary": "Check the current quota status for the authenticated tenant.\nReturns remaining tokens, remaining requests, and the next quota reset time.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotas/{tenantId}/check": {
      "get": {
        "tags": [
          "Quotas"
        ],
        "summary": "Check the quota status for a specific tenant (admin use).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "estimatedTokens",
            "in": "query",
            "description": "Estimated tokens for the next request (used to determine if the request would be allowed).",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotas/exceeded": {
      "get": {
        "tags": [
          "Quotas"
        ],
        "summary": "Get all tenants whose quota usage exceeds the given threshold (default 80%).",
        "parameters": [
          {
            "name": "threshold",
            "in": "query",
            "description": "Usage fraction threshold (0.0–1.0, default 0.8 = 80%).",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double",
              "default": 0.8
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotas/{tenantId}/usage": {
      "post": {
        "tags": [
          "Quotas"
        ],
        "summary": "Manually record usage against a tenant's quota (platform-admin integrations that bypass the proxy).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Usage to record.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordQuotaUsageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordQuotaUsageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordQuotaUsageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotas/{tenantId}/config": {
      "get": {
        "tags": [
          "Quotas"
        ],
        "summary": "Read a tenant's quota configuration (daily + optional monthly caps + enabled flag) — SP/platform admin.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantQuotaConfig"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Quotas"
        ],
        "summary": "Set a tenant's quota configuration (daily + optional monthly token/request caps; G4 #1668) — SP/platform\nadmin. Monthly caps are optional (null = no monthly cap). Takes effect on the next quota check.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantQuotaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantQuotaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantQuotaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantQuotaConfig"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotas/suggestions/{tenantId}": {
      "get": {
        "tags": [
          "Quotas"
        ],
        "summary": "Get GPU-based quota tier suggestions for a tenant.\nReturns 4 tiers with a recommended one based on the tenant's linked forge GPU capacity.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QuotaSuggestion"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "List all process definitions visible to the caller.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessDefinitionDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Raci"
        ],
        "summary": "Creates a process definition in the caller's environment. The same door as the process designer's\n`POST /api/processes` and the assistant's `process_create` (#1722): `process.design`, and the layer-2\nservice that holds the definition rules and writes `process.definition.created`. It used to accept\n`governance.manage` as well, a second way in with another gate.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessDefinitionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{id}": {
      "put": {
        "tags": [
          "Raci"
        ],
        "summary": "Edits a process definition's metadata; its steps, department and diagram stay as they are (#3573). The designer's\ndoor (review W2): `process.design` and the layer-2 service, which writes `process.definition.updated` — and,\nas before, Accountable on the process.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessDefinitionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Raci"
        ],
        "summary": "Deletes a process definition. The designer's door (review W2): `process.design` and the layer-2 service, which\nwrites `process.definition.deleted` — and, as before, Accountable on the process. A process a routine still pins\nanswers 409.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{processId}/assignments": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "Get all role assignments for a process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessRoleAssignmentDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Raci"
        ],
        "summary": "Add a role assignment to a process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddProcessRoleAssignmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddProcessRoleAssignmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddProcessRoleAssignmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessRoleAssignmentDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/assignments/{id}": {
      "delete": {
        "tags": [
          "Raci"
        ],
        "summary": "Remove a role assignment.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{processId}/steps": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "Get all steps for a process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessStepDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Raci"
        ],
        "summary": "Create a step for a process: `process.design` through the layer-2 service, and Accountable on the process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessStepDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{processId}/steps/{stepKey}": {
      "put": {
        "tags": [
          "Raci"
        ],
        "summary": "Update a process step: `process.design` through the layer-2 service, and Accountable on the process. What the\nrequest has no place for — the step's branches, its agent — and a routine or method it leaves out stay as they are.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessStepDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Raci"
        ],
        "summary": "Delete a process step: `process.design` through the layer-2 service, and Accountable on the process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{processId}/links": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "Get all links for a process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessLinkDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Raci"
        ],
        "summary": "Link this process to another of the same environment: `process.design` through the layer-2 service, and\nAccountable on the process the link starts from.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessLinkDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/links/{id}": {
      "delete": {
        "tags": [
          "Raci"
        ],
        "summary": "Delete a process link: `process.design` through the layer-2 service, and Accountable on the process the link\nstarts from.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{processId}/triggers": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "Get all triggers for a process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessTriggerDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Raci"
        ],
        "summary": "Create a trigger for a process.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessTriggerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessTriggerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessTriggerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessTriggerDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{processId}/triggers/{triggerId}": {
      "put": {
        "tags": [
          "Raci"
        ],
        "summary": "Update a process trigger.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessTriggerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessTriggerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveProcessTriggerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessTriggerDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Raci"
        ],
        "summary": "Delete a process trigger.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/processes/{processId}/instances": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "Get all instances for a process: for whoever manages processes — who may start them, and so must see them — and\nfor anyone with a RACI part (Informed or more), the same rule as a run's history.",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessInstanceDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/instances": {
      "post": {
        "tags": [
          "Raci"
        ],
        "summary": "Create a process instance.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProcessInstanceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProcessInstanceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProcessInstanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstanceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/instances/{instanceId}": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "Get a single process instance.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstanceDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/instances/{instanceId}/status": {
      "patch": {
        "tags": [
          "Raci"
        ],
        "summary": "Update a process instance status.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProcessInstanceStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProcessInstanceStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProcessInstanceStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstanceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/instances/{instanceId}/steps/{stepKey}/complete": {
      "post": {
        "tags": [
          "Raci"
        ],
        "summary": "Completes the run's current step for the caller and moves the run on. Allowed for whoever manages processes,\nis Responsible (RACI) for the process or the step, or holds the step's responsible role\n(<see cref=\"!:ProcessStepAuthorityRule\" />). A step that is not the run's current one answers 409, and so does a\nstep that runs a routine while a run of it is under way (#3840). Once that run failed, was partly done or never\ncame, a person finishes the step here, and the audit says it was a routine step finished by hand.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstanceDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/instances/{instanceId}/history": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "Every recorded step moment of a run, oldest first, with the actor's display name.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessStepTransitionDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/raci/instances/{instanceId}/journey": {
      "get": {
        "tags": [
          "Raci"
        ],
        "summary": "What the routine steps of a run did (#3840): per step that runs a routine, the routine and its pinned skill\nversion, the runs the step asked for, the reviews they hold open and where the step's task stands. Ids, statuses\nand counts only. The same gate as the run's history: the caller's tenant scope, then managing processes or a RACI\npart (Informed or more); only the run's own tenant is read.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessJourneyDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag/collections": {
      "get": {
        "tags": [
          "Rag"
        ],
        "summary": "List all central RAG collections for the current tenant.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Rag"
        ],
        "summary": "Create a new central RAG collection for the current tenant.",
        "requestBody": {
          "description": "Collection creation request.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagCollectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagCollectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagCollectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag/collections/{collectionId}": {
      "delete": {
        "tags": [
          "Rag"
        ],
        "summary": "Delete a central RAG collection (and its local documents + sync-status rows) for the current tenant.\nRemote copies already synced to SparkForge instances are not removed.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Collection unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag/sync-statuses/{collectionId}": {
      "get": {
        "tags": [
          "Rag"
        ],
        "summary": "Get sync status for all instances that a specific collection has been synced to.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Collection unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag/collections/{collectionId}/sync": {
      "post": {
        "tags": [
          "Rag"
        ],
        "summary": "Sync a central RAG collection to one or more SparkForge instances.\nPushes documents and creates the remote collection on each target instance.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Collection unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Sync request with target instance IDs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncRagToInstancesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncRagToInstancesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SyncRagToInstancesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag/collections/{collectionId}/sync/{instanceId}/force": {
      "post": {
        "tags": [
          "Rag"
        ],
        "summary": "Force a full re-sync of a collection to a specific instance, ignoring the last-synced timestamp.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Collection unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "instanceId",
            "in": "path",
            "description": "Target SparkForge instance identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag/collections/{collectionId}/documents": {
      "post": {
        "tags": [
          "Rag"
        ],
        "summary": "Upload a document to an existing central RAG collection.\nAccepts multipart/form-data with the file content.",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "description": "Collection unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The document file to upload.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-embedding-configs": {
      "get": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "summary": "Lists configs visible to the caller, optionally filtered by ownership level + owner id.",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/InstanceOwnerLevel"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RagEmbeddingConfigDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagEmbeddingConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagEmbeddingConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagEmbeddingConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagEmbeddingConfigDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-embedding-configs/{id}": {
      "get": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagEmbeddingConfigDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRagEmbeddingConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRagEmbeddingConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRagEmbeddingConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagEmbeddingConfigDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-embedding-configs/{id}/key": {
      "put": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "summary": "Sets or rotates the auth token. Sending an empty string clears the key — the row stays in the table\nbut is deactivated until a key is set again.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagEmbeddingConfigKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagEmbeddingConfigKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagEmbeddingConfigKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-embedding-configs/{id}/probe": {
      "post": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "summary": "Probe the embedder for this config: resolve it, embed a stable sentinel, read the returned vector's\nlength, stamp it onto int RagEmbeddingConfigEntity.Dimensions, and return the probed value\n(Phase 4 §6.3). Works for both `openai-compatible` and `sparkforge-node` configs. A\nnot-configured embedder or a probe failure is a clean 4xx (never a 500) — the Phase-5 UI calls this\nafter the key is set.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagEmbeddingProbeResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-embedding-configs/forge-embedders": {
      "get": {
        "tags": [
          "RagEmbeddingConfig"
        ],
        "summary": "Lists the registered SparkForge instances that are embeddings-capable (their `Capabilities` csv\ncontains `embeddings`, or `EmbeddingModelsJson` is non-empty) with their advertised\nembeddings model ids — the read-only data feed for the Phase-5 embedder picker. Visibility mirrors the\ncaller's identity (unrestricted/platform-manage sees all; otherwise only instances they own).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ForgeEmbedderOptionDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-vector-store-configs": {
      "get": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "summary": "Lists configs visible to the caller, optionally filtered by ownership level + owner id.",
        "parameters": [
          {
            "name": "ownerLevel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/InstanceOwnerLevel"
            }
          },
          {
            "name": "ownerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RagVectorStoreConfigDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagVectorStoreConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagVectorStoreConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRagVectorStoreConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagVectorStoreConfigDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-vector-store-configs/{id}": {
      "get": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagVectorStoreConfigDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRagVectorStoreConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRagVectorStoreConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRagVectorStoreConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagVectorStoreConfigDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-vector-store-configs/{id}/key": {
      "put": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "summary": "Sets or rotates the API key. Sending an empty string clears the key — the row stays in the table but\nis deactivated until a key is set again.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagVectorStoreConfigKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagVectorStoreConfigKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagVectorStoreConfigKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-vector-store-configs/{id}/probe": {
      "post": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "summary": "Probe the store for this config (#4758, the onboarding probe): reach it, read its version, and write, read back and\nremove a temporary probe collection, through the same client and SSRF pin its real traffic takes. A provider without\nthat probe is checked for reachability only. A not-configured store or a probe failure is a clean 4xx (never a 500).\nGated on write authz (a probe reaches a live endpoint with the stored key).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagVectorStoreProbeResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-vector-store-configs/{id}/private-network-approval": {
      "put": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "summary": "Grants or revokes the private-network approval of a partner- or tenant-owned vector store (#4646): the same\nplatform-operator grant a data source gets (#2845). Without it such a store is pinned to public addresses. The\napproval binds to the store's current endpoint origin and to the address ranges that origin may resolve to; a\nlater endpoint change voids it. Only a platform operator may call this, and the change is audited with it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagVectorStorePrivateNetworkApprovalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagVectorStorePrivateNetworkApprovalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetRagVectorStorePrivateNetworkApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagVectorStoreConfigDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/rag-vector-store-configs/shared-cleanup": {
      "get": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "summary": "What the shared-store cleanup would remove right now (#4758): tenant collections left in a platform vector store from\nbefore #4646, for tenants whose projections now use a store of their own. Removes nothing. Platform operators only.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagSharedStoreCleanupPlanDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "RagVectorStoreConfig"
        ],
        "summary": "Removes the selected items of a shared-store cleanup (#4758). The plan is computed again first, so only a collection\nthat is still stray is removed; each removal is audited under the tenant it belonged to. Platform operators only.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RagSharedStoreCleanupApplyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RagSharedStoreCleanupApplyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RagSharedStoreCleanupApplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagSharedStoreCleanupResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/rate-agreements": {
      "get": {
        "tags": [
          "RateAgreements"
        ],
        "summary": "All rate agreements, newest-effective first within each key. Requires platform-monitor.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RateAgreementDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "RateAgreements"
        ],
        "summary": "Creates a rate (validation + Blended/directional guard server-side). Requires platform-manage.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRateAgreementRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRateAgreementRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRateAgreementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateAgreementDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/rate-agreements/coverage-gaps": {
      "get": {
        "tags": [
          "RateAgreements"
        ],
        "summary": "Models served on the active Platform chain without their own Sell rate, each with what it is billed at instead\n— the coverage guard's findings. Empty = healthy. Requires platform-monitor.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RateCoverageGapDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/rate-agreements/{id}": {
      "put": {
        "tags": [
          "RateAgreements"
        ],
        "summary": "Updates one rate's mutable fields (amount, provenance, review, active). Requires platform-manage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRateAgreementRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRateAgreementRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRateAgreementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateAgreementDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "RateAgreements"
        ],
        "summary": "Deletes one rate. Requires platform-manage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/time-zone": {
      "get": {
        "tags": [
          "ReaderTimeZone"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReaderTimeZoneDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/reports/monthly": {
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/reports/monthly/{id}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/reports/monthly/{id}/pdf": {
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/reports/monthly/{id}/csv": {
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/reports/monthly/generate": {
      "post": {
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateMonthlyReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateMonthlyReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateMonthlyReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/reports/qbr": {
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/reports/qbr/html": {
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/roles/{id}": {
      "get": {
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/routing/diagnose": {
      "get": {
        "tags": [
          "RoutingDiagnostic"
        ],
        "summary": "Diagnoses the routing pipeline for a given tenant/user/model combination.\nReturns a RoutingTrace showing what would happen without actually calling a provider.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "description": "Optional tenant ID to resolve routing for.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Optional user ID for user-level chain entries: the caller's own, or someone assigned to the\n    tenant being diagnosed; anyone else, known or not, is a 403 (#4227).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "model",
            "in": "query",
            "description": "Optional model name to include in routing context.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "image",
            "in": "query",
            "description": "When true, the dry-run probe carries an image attachment so the trace\n    shows whether a vision-capable provider would be selected (capability-aware routing, #1384).",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "intent",
            "in": "query",
            "description": "Optional chat intent to probe — fast / smart / private (case-insensitive). Omit for\n    Automatisch (no intent filter). \"private\" is the case that must land on a self-hosted provider (#2660).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "Which real execution path to model: \"chat\" (default) or \"agent\". They apply different\n    chain filters, so the trace must match whichever path the request will actually take (#2660).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/routing-rules": {
      "get": {
        "tags": [
          "RoutingRules"
        ],
        "summary": "Gets all routing rules for the current tenant. Reading asks `routing.manage`, the same right as the writes\nbelow and the MCP `routing_rule_list` tool (#4138).",
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "RoutingRules"
        ],
        "summary": "Creates a new routing rule.",
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoutingRuleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoutingRuleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoutingRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/routing-rules/{id}": {
      "get": {
        "tags": [
          "RoutingRules"
        ],
        "summary": "Gets a single routing rule by ID. Asks `routing.manage`, like the list (#4138).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Rule identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "RoutingRules"
        ],
        "summary": "Updates an existing routing rule.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Rule identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoutingRuleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoutingRuleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoutingRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "RoutingRules"
        ],
        "summary": "Deletes a routing rule.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Rule identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/routing-rules/{id}/priority": {
      "put": {
        "tags": [
          "RoutingRules"
        ],
        "summary": "Updates the priority of a routing rule.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Rule identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePriorityRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePriorityRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePriorityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/routing-rules/{id}/test": {
      "post": {
        "tags": [
          "RoutingRules"
        ],
        "summary": "Tests if a routing rule would match the given context. The answer carries the whole rule, so this is a read of\nthat rule and asks `routing.manage` like the other routing endpoints (#4138).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Rule identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Cancellation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestRuleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TestRuleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TestRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs": {
      "get": {
        "tags": [
          "ScheduledJobs"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduledJobDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ScheduledJobs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduledJobDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduledJobDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduledJobDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/missed": {
      "get": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "The tenant's routines that owed a run over the last hours and have none (#3579): what should\nhave run and did not, with the reason. Same gate as the list it belongs above — a cross-routine read is a\nmanager's read, not an owner's.",
        "description": "Routed before `{id:guid}` in source order and unreachable by a guid anyway, so it cannot shadow a routine.",
        "parameters": [
          {
            "name": "hours",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MissedRunDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}": {
      "get": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "One routine of the tenant. Open to the wider read circle of bool ScheduledJobsController.MayRead(CockpitIdentity identity, ScheduledJobEntity? job), so the owner who opens a run\nfrom a card can walk back to the routine the run belongs to (#3451).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ScheduledJobs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduledJobDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduledJobDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduledJobDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ScheduledJobs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/run": {
      "post": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "Queues a manual run and answers at once with it (202), the way `job_run_now` does; the scheduler host\nstarts it within a tick and the run page follows it (#3862). The run is never executed inside this request:\na caller that timed out cancelled it half-way, and its retry started it again, so a routine could mail the\nsame customers twice. The claim the queue takes refuses a second request — a retry or a double click — while\nthe run is queued or running, so one request is one run.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobRunDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureDenialResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/runs": {
      "get": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "The run history of one routine, newest first. Open to the same read circle as the routine itself, which is what\nlets the routine's tile on a non-manager owner's dashboard show her own runs (#3453).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduledJobRunDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/runs/{runId}": {
      "get": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "One run of a routine, with its steps, the agreements it ran under and a row per customer (#3451, #3454).",
        "description": "Read access is wider than the rest of this controller on purpose: the person who answers for the routine and\nthe person who decides its held customers may open their own run without string CockpitPermissions.ScheduledJobsManage,\nwhich is what lets the link travel in a Teams card or a chat answer. It is not wider than the tenant: a run of\nanother tenant is a 404, indistinguishable from one that does not exist.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobRunDetailDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/runs/{runId}/mail": {
      "get": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "One customer's mail of that run, rebuilt and weighed against the hash her action stored (#3451).",
        "description": "Cockpit stores no mail body, so this rebuilds it with the skill's own renderer and reports whether the rebuild\nhashes to what went out. The rebuild is never the evidence — string ScheduledJobRunMailDto.Verdict is —\nand a customer this run has no action for is a 404, not an empty mail. Read access is the run's own gate: the\nroutine's owner and reviewer read their run's mail without string CockpitPermissions.ScheduledJobsManage,\nand nobody outside the tenant reads it at all.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customerRef",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobRunMailDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/runs/{runId}/steps/{stepKey}/diagnoses": {
      "post": {
        "tags": [
          "ScheduledJobs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRunStepDiagnosisDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRunStepDiagnosisDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AskRunStepDiagnosisDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunStepDiagnosisDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/runs/{runId}/steps/{stepKey}/diagnoses/{conversationId}": {
      "get": {
        "tags": [
          "ScheduledJobs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunStepDiagnosisDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/runs/{runId}/steps/{stepKey}/diagnoses/{conversationId}/messages": {
      "post": {
        "tags": [
          "ScheduledJobs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRunStepDiagnosisDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRunStepDiagnosisDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AskRunStepDiagnosisDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunStepDiagnosisDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/runs/{runId}/steps/{stepKey}/diagnoses/{conversationId}/improvement": {
      "post": {
        "tags": [
          "ScheduledJobs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "stepKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmRunStepImprovementDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmRunStepImprovementDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmRunStepImprovementDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/scheduled-jobs/{id}/docstore-target": {
      "put": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "Sets the archive target. Only the routine's OWNER may, and only holding `docstore.manage` in this tenant: the\nroutine writes with the owner's rights, so the owner is the one who agrees to it, and somebody who manages routines\nbut is not the owner cannot fill in a colleague's name and use their rights. A document that already exists at the\npath is taken over only when the owner says so.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetScheduledJobDocStoreTargetDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetScheduledJobDocStoreTargetDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetScheduledJobDocStoreTargetDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ScheduledJobs"
        ],
        "summary": "Takes the archive target off a routine. Anybody who manages routines may, whoever the owner is: that makes the routine\nharmless, for instance when its owner left.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledJobDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/available": {
      "get": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "List all sector packs available for tenant onboarding. Visible to anyone\nwho can manage tenants or forges — i.e. anyone who could reach the\nOnboardingHub page in the first place.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/catalog": {
      "get": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "Full sector-pack catalog for the Management UI (#1052): every instantiable pack the registry\nresolves — built-in code packs ∪ operator-uploaded packs (#1051) — enriched with per-pack content\ncounts and an `IsUploaded` flag. Platform-admin only.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/tenant/{tenantId}/active": {
      "get": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "List the sector packs currently active for a tenant (#1050). Platform-admin only.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/tenant/{tenantId}/activate": {
      "post": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "Activate a sector pack on a tenant (#1050): instantiates the pack's content into the tenant\n(idempotent) and records the activation row. Platform-admin only. Returns 404 when the pack is not\nregistered, 200 with the activation snapshot + instantiation summary on success.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSectorPackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSectorPackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSectorPackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/tenant/{tenantId}/deactivate": {
      "post": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "Deactivate a sector pack on a tenant (#1050) — soft-flips the activation row off; already-instantiated\ntenant content is left intact. Platform-admin only. Returns 200 with whether a row was flipped.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSectorPackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSectorPackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSectorPackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/uploaded": {
      "get": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "List operator-uploaded sector packs (catalog). Platform-admin only. Pass\n`includeSuperseded=true` to include retained prior versions.",
        "parameters": [
          {
            "name": "includeSuperseded",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "Upload a sector pack `.zip`: validate, store (superseding any prior version), and refresh the\nregistry so the pack is immediately activatable per tenant. Platform-admin only. Returns 200 with the\nstored pack on success, 422 with validation errors when the pack is rejected.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/uploaded/validate": {
      "post": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "Dry-run validation of a pack archive — loads + validates WITHOUT storing. Platform-admin only.\nLets the upload UI surface problems before committing.",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/sector-packs/uploaded/{packId}": {
      "delete": {
        "tags": [
          "SectorPacks"
        ],
        "summary": "Delete an uploaded pack — all versions, or a single version when `version` is supplied.\nPlatform-admin only. Already-instantiated tenant content is left intact (it is live tenant data).",
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/security/encryption-status": {
      "get": {
        "tags": [
          "Security"
        ],
        "summary": "Returns the current encryption status (active provider, prefix).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills": {
      "get": {
        "tags": [
          "Skills"
        ],
        "summary": "Every skill the caller may see, with its provenance and the state of its routine.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillSummaryDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{name}": {
      "get": {
        "tags": [
          "Skills"
        ],
        "summary": "One skill by name, or 404 when the tenant has none by that name or a grant denies it.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillDetailDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{name}/preview": {
      "post": {
        "tags": [
          "Skills"
        ],
        "summary": "Prepare the batch and report what it would send. Sends nothing, files nothing, writes nothing.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillPreviewDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{name}/send-request": {
      "post": {
        "tags": [
          "Skills"
        ],
        "summary": "Ask to send the batch. This never sends: it files a pending approval bound to\nbatchHash, and the mail leaves only after a named person approves that item.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "batchHash",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillSendRequestResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{name}/publish-plan": {
      "get": {
        "tags": [
          "Skills"
        ],
        "summary": "What publishing this skill as a routine would settle, without writing anything. Problems and open\nquestions come back so the screen can show them before anyone commits.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "declineTile",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "mailbox",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "teams",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillPublishPlan"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{name}/publish": {
      "post": {
        "tags": [
          "Skills"
        ],
        "summary": "Publish the skill as its routine. This never switches anything on: it pins the current version and the\nagreements on the skill's own routine, leaves it disabled, and files a confirmation for its owner.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PublishSkillRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PublishSkillRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PublishSkillRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillPublishResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{name}/grants": {
      "get": {
        "tags": [
          "Skills"
        ],
        "summary": "Every explicit share of this skill. The common case has none.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillGrantDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Skills"
        ],
        "summary": "Share this skill with a colleague, a role or a group — or deny it to one.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSkillGrantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSkillGrantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSkillGrantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillGrantDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/skills/{name}/grants/{grantId}": {
      "delete": {
        "tags": [
          "Skills"
        ],
        "summary": "Withdraw one share of this skill. The id of any other grant in the tenant answers 404.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/skills/{name}/grant-subjects": {
      "get": {
        "tags": [
          "Skills"
        ],
        "summary": "The subjects this caller may name in a share. Gated on the same right as making the share, so the dialog\nnever has to borrow the users or roles endpoints, which need rights a tenant admin does not hold.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GrantSubjectOptionsDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/me/subscription/changes": {
      "get": {
        "tags": [
          "SubscriptionChanges"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantSubscriptionChangeDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/partners/{partnerId}/subscription-changes": {
      "get": {
        "tags": [
          "SubscriptionChanges"
        ],
        "parameters": [
          {
            "name": "partnerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantSubscriptionChangeDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/management/templates/processes": {
      "get": {
        "tags": [
          "TemplateLibrary"
        ],
        "parameters": [
          {
            "name": "serviceProviderId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sectorTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessTemplateSummaryDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/management/templates/processes/{id}": {
      "get": {
        "tags": [
          "TemplateLibrary"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessTemplateDetailDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/management/templates/dashboards": {
      "get": {
        "tags": [
          "TemplateLibrary"
        ],
        "parameters": [
          {
            "name": "serviceProviderId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sectorTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DashboardTemplateSummaryDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/management/templates/dashboards/{id}": {
      "get": {
        "tags": [
          "TemplateLibrary"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardTemplateDetailDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/management/templates/connector-presets": {
      "get": {
        "tags": [
          "TemplateLibrary"
        ],
        "parameters": [
          {
            "name": "serviceProviderId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sectorTag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorPresetSummaryDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/management/templates/connector-presets/{id}": {
      "get": {
        "tags": [
          "TemplateLibrary"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorPresetDetailDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenant/api-key": {
      "get": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Status of the caller's own API key — masked preview + lifecycle timestamps (no plaintext).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantApiKeyStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenant/api-key/reveal": {
      "post": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Reveal the caller's own full API key once. Gated + audit-logged. 409 when the key is revoked.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantApiKeyRevealDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenant/api-key/rotate": {
      "post": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Rotate the caller's own key: mint + return a fresh key once; the old one stops working.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantApiKeyRevealDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenant/api-key/revoke": {
      "post": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Revoke the caller's own key — it stops authenticating against `/v1` immediately.",
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "List tenants visible to the caller. Platform admins (`platform.manage` / an unrestricted\nrole) see every tenant except partner self-tenants; partner admins (`forges.manage`)\nsee only their OWN partner's tenants — those stamped with their `ServiceProviderId`, the one partner a\ntenant has (#2699, #4221). The permission gate below stays as-is; only the row set the service returns is scoped.",
        "parameters": [
          {
            "name": "includeSelfTenants",
            "in": "query",
            "description": "#2684 — include the partner self-tenant scaffolding rows that #694 hides by default.\nHonoured for platform-standing callers only; ignored (not rejected) otherwise, so a\npartner admin setting it simply gets the normal list.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tenants"
        ],
        "summary": "Create a new tenant in Cockpit.",
        "requestBody": {
          "description": "Tenant creation request.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Get a tenant by its unique identifier. Platform admins or the tenant's own users.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Update tenant metadata (partial update — all fields optional).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Fields to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tenants"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteTenantResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/me/workspace": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "The caller's own workspace name and branding, for whoever may change them (#3682: the Management page reads them\nhere, not from the database). The tenant comes from the identity.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantWorkspaceDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Changes the caller's own workspace name and branding, for a tenant-admin (#4383). The tenant comes from the\nidentity, never from the route, and the request carries no operational field, so a rename can never switch the\ntenant off, move it or reroute it. `null` leaves a field as it is; an empty string clears a branding field.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantWorkspaceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantWorkspaceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantWorkspaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/me/member-approval": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "\"Nieuwe leden via domein goedkeuren\" of the caller's own organization (#4532). The tenant comes from the identity;\nthe gate is `users.manage`, because the setting decides who becomes a member.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantMemberApprovalDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Switches \"Nieuwe leden via domein goedkeuren\" of the caller's own organization (#4532). Every change is audited\nwith the old and the new value; setting the value it already has changes and audits nothing.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantMemberApprovalDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantMemberApprovalDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantMemberApprovalDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}/step-up-policy": {
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "#1979 (Option A §1) — sets/clears a tenant's mandatory IdP step-up policy. Gated on\n`identity.manage` (a stricter tier than `tenants.manage`, matching the partner-identity-policy\nsurface), because turning a tenant mandatory-IdP is a security control. A null\n`RequiredIdentityProviderId` clears it. The IdP must be active and in scope of the tenant\n(tenant-scoped, partner-wide, an explicit binding, or global) — an out-of-scope IdP is rejected up\nfront (it would otherwise resolve fail-closed and lock the tenant out). So is the local password IdP: it has no\nOIDC scheme to step up through, so requiring it would lock every member out of the tenant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The mandatory-IdP + optional session-lifetime.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantStepUpPolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantStepUpPolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantStepUpPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}/erase-customer-data": {
      "post": {
        "tags": [
          "Tenants"
        ],
        "summary": "Offboarding (#4635): erase a deactivated tenant's customer data — source mirrors, documents, knowledge,\nconversations and transcripts — and shred its audit PII. Central records and retained evidence stay until\nthe tenant can be deleted. Irreversible, so no audit means no erasure: the request is recorded before anything\ngoes (a failed write stops it) and the count after. No step-up yet: the tenant step-up enforcer guards a\ntenant's own IdP, not a fresh sign-in of the admin (#4811).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}/quota": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Get quota configuration for a tenant. Platform admins or the tenant's own users.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Create or update quota configuration for a tenant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantQuotaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantQuotaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetTenantQuotaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}/lifecycle": {
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Transition a tenant between lifecycle stages (prospect → scanning → implementing →\nhypercare → active → churned). Sets `ImplementationStartDate` / `MrrStartDate`\nat the canonical transitions and writes a centralized audit log entry.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Target stage + optional implementation week + note.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantLifecycleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantLifecycleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantLifecycleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}/onboarding-progress": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Onboarding progress snapshot for the tenant — counts of enabled connectors,\nmapped processes, RACI assignments, and published dashboards. Returned via\na single projection query; safe for UI polling.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}/instantiate-sector-pack": {
      "post": {
        "tags": [
          "Tenants"
        ],
        "summary": "One-click sector-pack instantiation — deploys all published process templates,\ndashboard templates, and connector presets for the given sector to the tenant.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tenant unique identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Sector tag + optional RACI role mappings.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstantiateSectorPackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InstantiateSectorPackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InstantiateSectorPackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{id}/reveal-api-key": {
      "post": {
        "tags": [
          "Tenants"
        ],
        "summary": "Reveal the full API key for a tenant. Platform admins only. Audit-logged.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/seats": {
      "get": {
        "tags": [
          "TenantSeats"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSeatOverviewDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/seats/{userId}": {
      "put": {
        "tags": [
          "TenantSeats"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSeatAssignRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSeatAssignRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSeatAssignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSeatOverviewDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/subscriptions": {
      "get": {
        "tags": [
          "TenantSubscription"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantSubscriptionDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "TenantSubscription"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSubscriptionUpsertRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSubscriptionUpsertRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSubscriptionUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/subscriptions/active": {
      "get": {
        "tags": [
          "TenantSubscription"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/subscription-level": {
      "get": {
        "tags": [
          "TenantSubscription"
        ],
        "summary": "The level of the caller's own tenant, for every member who may see their own billing (#4363): the level and what\nit means, never a price — the commercial terms stay behind Task&lt;IActionResult&gt; TenantSubscriptionController.GetActive(Guid tenantId, CancellationToken ct). 404 without an active\nsubscription.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionLevelDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/me/subscription": {
      "get": {
        "tags": [
          "TenantSubscription"
        ],
        "summary": "The caller's own tenant's active subscription with its prices, for a tenant-admin (#4383). The tenant comes from\nthe identity, never from the route, so the grant cannot reach another tenant. The partner's internal notes stay\nout. 404 without an active subscription.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/subscriptions/{id}": {
      "put": {
        "tags": [
          "TenantSubscription"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSubscriptionUpsertRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSubscriptionUpsertRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSubscriptionUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "TenantSubscription"
        ],
        "summary": "Deactivates one of the tenant's subscriptions. The tenant check (a subscription of another tenant is not found)\nand the `subscription.deactivated` event live in ITenantSubscriptionDeactivationService, shared\nwith the MCP tool (#1719).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenant/usage": {
      "get": {
        "tags": [
          "TenantUsage"
        ],
        "summary": "The caller's own tenant usage + quota status for a month (default current).",
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUsageOverviewDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/tenants/{tenantId}/value": {
      "get": {
        "tags": [
          "TenantValue"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantValueBundleDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/think-along/me": {
      "get": {
        "tags": [
          "ThinkAlong"
        ],
        "summary": "The caller's own think-along: what runs for them (on or off, the calendar, the local hour), whether an\nadministrator switched it on for them apart from their own choice, and their own opt-out and calendar consent.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThinkAlongPersonalDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ThinkAlong"
        ],
        "summary": "The caller's own choices. Opting out wins over every other row; consenting to the calendar only matters\n    where an administrator listed the calendar for them.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetThinkAlongPersonalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetThinkAlongPersonalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetThinkAlongPersonalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/think-along/me/do-not-repeat": {
      "post": {
        "tags": [
          "ThinkAlong"
        ],
        "summary": "\"Don't mention this again\": the reference is remembered for 180 days, without any of its content.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DoNotRepeatRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DoNotRepeatRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DoNotRepeatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/think-along/policies": {
      "get": {
        "tags": [
          "ThinkAlong"
        ],
        "summary": "The tenant's own rows (per person, per team, tenant-wide). Requires `users.manage`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ThinkAlongPolicyDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ThinkAlong"
        ],
        "summary": "Back to the inherited value: removes the tenant's own row for one person, one team or (both empty) the\n    tenant. Requires `users.manage`. 404 when there was no such row.",
        "parameters": [
          {
            "name": "targetUserId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "targetGroupId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ThinkAlong"
        ],
        "summary": "Switches the think-along on or off for one person, one team, or (both empty) the whole tenant. Requires\n    `users.manage`. Listing the calendar reads it only for people who consented themselves.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetThinkAlongPolicyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetThinkAlongPolicyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetThinkAlongPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThinkAlongPolicyDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/think-along/usage": {
      "get": {
        "tags": [
          "ThinkAlong"
        ],
        "summary": "The active tenant's members with what the chain decides for each of them (also when inherited), whether they\nopted out, and what they spent this month of the dirigent's budget per person, next to that budget. Requires\n`users.manage`. Only members of the active tenant are listed — also for a platform administrator.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThinkAlongUsageDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/today/dashboard": {
      "get": {
        "tags": [
          "TodayDashboard"
        ],
        "summary": "Returns the tenant's explicit Today dashboard, or 404 when none is configured. An empty 204 is not an\noption here: the typed Refit client (`Task&lt;TodayDashboardConfiguration?&gt;`) has no body to\ndeserialize and surfaces it as a failure, which the home page would then show as \"unavailable\".",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TodayDashboardConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayDashboardConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayDashboardConfiguration"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "TodayDashboard"
        ],
        "summary": "Sets the tenant's Today dashboard: part of designing the visual overview, so Stuur (`dashboards`, #4150).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTodayDashboardRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTodayDashboardRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetTodayDashboardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "TodayDashboard"
        ],
        "summary": "Clears the tenant's Today dashboard, on the same Stuur wall as setting it.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/today/sources": {
      "get": {
        "tags": [
          "TodaySources"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TodaySources"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodaySources"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodaySources"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/platform/usage/summary": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Returns per-instance usage totals (requests, tokens, last active) across all tenants.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Number of days to look back (default 30).",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users": {
      "get": {
        "tags": [
          "UserAssignments"
        ],
        "summary": "Lists the user directory of the caller's context (#3919), with each user's role-assignment count in that\ncontext. Platform standing sees every user, as the Management screen always did; a partner context sees\nthe partner's people, a tenant context only the tenant's own (UserDirectoryScope UserDirectoryScope.For(CockpitIdentity identity)).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/assignments": {
      "get": {
        "tags": [
          "UserAssignments"
        ],
        "summary": "Lists a single user's role assignments, with resolved scope/role display names.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "UserAssignments"
        ],
        "summary": "Grants a user a role at a scope. Returns 409 when an assignment already exists for that scope.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserAssignmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserAssignmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserAssignmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/assignments/{assignmentId}": {
      "put": {
        "tags": [
          "UserAssignments"
        ],
        "summary": "Changes an existing assignment's role and/or default flag. Scope is immutable.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserAssignmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserAssignmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserAssignmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "UserAssignments"
        ],
        "summary": "Revokes (deletes) an assignment.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/invites": {
      "post": {
        "tags": [
          "UserInvites"
        ],
        "summary": "Invites/grants a scoped membership by email. `InvitedBy` is set to the authenticated caller\n(never the request) and the target is re-checked against the caller's scope by the service.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "UserInvites"
        ],
        "summary": "Lists the pending (unredeemed, unexpired) invites within the caller's scope.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PendingInviteDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/invites/preview": {
      "post": {
        "tags": [
          "UserInvites"
        ],
        "summary": "Non-mutating pre-send preview of the decision Task&lt;IActionResult&gt; UserInvitesController.Invite(CreateInviteRequest req, CancellationToken ct) would take (§G1): whether the\nemail already maps to a verified identity (→ direct grant, no mail) or not (→ invite-mail), plus the\nresolved role/scope. Leak-free — it returns no identity detail about who owns the address, and writes\nnothing. `InvitedBy` is server-set (never the request), same as the invite write it previews.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitePreviewDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/invites/options": {
      "get": {
        "tags": [
          "UserInvites"
        ],
        "summary": "The scopes + bound IdPs + managed-mode the invite dialog may offer, for the named target. The\ncaller-scope fields are filled server-side from the identity; the service denies (empty options)\na target the caller can't reach (#1796 read-side twin).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "partnerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteOptionsDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/invites/{inviteId}/revoke": {
      "post": {
        "tags": [
          "UserInvites"
        ],
        "summary": "Revokes a pending invite within the caller's scope.",
        "parameters": [
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/invites/{inviteId}/resend": {
      "post": {
        "tags": [
          "UserInvites"
        ],
        "summary": "Re-sends a pending invite within the caller's scope (mints a new token, resets the TTL).",
        "parameters": [
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/source-identities": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Who userId is in each data source of the caller's active tenant (#3011) — the\nadministrator's view of the same table a user maintains under `/api/me/source-identities`, so a\nteam can be linked in one sitting. Tenant scope is the caller's own; a user id from another tenant\nsimply shows every source unlinked.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewerSourceIdentitiesDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/source-identities/{dataSourceId}": {
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Sets another user's id in one source of the caller's tenant, recorded as set by an administrator.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SetViewerSourceIdentityRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SetViewerSourceIdentityRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SetViewerSourceIdentityRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewerSourceLinkDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Removes another user's id in one source of the caller's tenant.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/sync/{instanceId}": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Sync all tenant users to a specific SparkForge instance.\nCreates or updates user accounts on the target instance.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "description": "Target SparkForge instance identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/sync": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Sync all tenant users to all online SparkForge instances registered to the current tenant.",
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/sync/results": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a summary of the most recent user sync results per instance for the current tenant. Asks `users.manage`,\nthe same right as starting a sync and the MCP `user_sync` tool (#4138); its Start-tier exception stays.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/count": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "The number of users in the caller's directory scope (#3919): every user for platform standing, otherwise\nthe users of the partner or tenant the caller stands in — the same scope as `GET /api/users`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/deprovision/{instanceId}": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Deprovision users that are no longer active on a specific SparkForge instance.\nDeactivates accounts for external IDs not in the provided active list.",
        "parameters": [
          {
            "name": "instanceId",
            "in": "path",
            "description": "Target SparkForge instance identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Request containing the list of external IDs that are still active.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeactivateUsersRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeactivateUsersRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeactivateUsersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/active": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Deactivates (soft, reversible) or reactivates a platform user (#1938). A deactivated user is blocked at\nthe identity seam — no login and in-flight sessions stop resolving — while the directory row is kept, so\na federated account can be reactivated later. Platform-admin only; the acting user + the self-lockout /\nlast-admin guards are enforced server-side, and the change is audited.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetUserActiveRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetUserActiveRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetUserActiveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{userId}/delete": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Hard-deletes a platform user and its identity cascade (assignments, invites, credentials, external\nidentities, passkeys/MFA, emails, memberships, org-roles, consents, native-OAuth tokens) (#1938, closes\n#1937). Destructive → the caller must echo the user's name/email in string? DeleteUserRequest.Confirmation,\nwhich the service re-checks. Platform-admin only; the self-lockout / last-admin guards are enforced\nserver-side, and the delete is audited. The confirmation rides a POST body (not a DELETE body — dropped by\nsome HTTP intermediaries — and not a query parameter — the name/email is user PII that would leak into\nrequest logs) (#1967); a dropped/absent body fails closed (mismatch → 400), never an open delete. The answer counts\nthe parts of the erasure still open in the person's tenants (#4755), so the screen never calls an unfinished erasure done.",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DeleteUserRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DeleteUserRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DeleteUserRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteUserResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice-ai/configs": {
      "get": {
        "tags": [
          "VoiceAiConfig"
        ],
        "summary": "List the active Voice AI configurations the caller may manage: every tenant's for a platform or unrestricted\ncaller, otherwise only the caller's own tenant's.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice-ai/configs/{tenantId}": {
      "get": {
        "tags": [
          "VoiceAiConfig"
        ],
        "summary": "Get the Voice AI configuration for a specific tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "VoiceAiConfig"
        ],
        "summary": "Create or update the Voice AI configuration for a tenant.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVoiceConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVoiceConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVoiceConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "VoiceAiConfig"
        ],
        "summary": "Deactivate the Voice AI configuration for a tenant (the operator kill-switch, #2378).",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/voice-ai/configs/{tenantId}/activate": {
      "post": {
        "tags": [
          "VoiceAiConfig"
        ],
        "summary": "Re-activate a previously deactivated Voice AI configuration (#2378): the counterpart to\nTask&lt;IActionResult&gt; VoiceAiConfigController.Deactivate(string tenantId, CancellationToken ct), so the kill-switch is a reversible pause and not a one-way soft-delete.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/voice/audio-fork/{callId}": {
      "get": {
        "tags": [
          "VoiceAudioFork"
        ],
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "callerNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/voice/bridge/availability": {
      "get": {
        "tags": [
          "VoiceBridge"
        ],
        "summary": "Of de spraak-bridge nu beschikbaar is voor de omgeving van de aangemelde gebruiker.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/bridge/sessions": {
      "post": {
        "tags": [
          "VoiceBridge"
        ],
        "summary": "Opent een spraaksessie voor de aangemelde gebruiker (503 als de bridge niet beschikbaar is).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartVoiceSessionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartVoiceSessionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartVoiceSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/voice/bridge/sessions/{id}": {
      "get": {
        "tags": [
          "VoiceBridge"
        ],
        "summary": "Haalt een eigen spraaksessie op (404 als die niet van deze gebruiker/tenant is).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "VoiceBridge"
        ],
        "summary": "Beëindigt een eigen spraaksessie (404 als die niet van deze gebruiker/tenant is).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/bridge/sessions/{id}/transcribe": {
      "post": {
        "tags": [
          "VoiceBridge"
        ],
        "summary": "Transcribeert een opgenomen spraakbeurt binnen een eigen sessie (#1848). De ruwe audio is de\nrequest-body (octet-stream/audio-*); de transcriptie loopt over de resolved STT-keten en komt terug\nmet de data-residentie (of de audio het milieu verliet). 404 als de sessie niet van deze\n(tenant, user) is; 503 als er geen provider bereikbaar was.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": { }
            }
          }
        }
      }
    },
    "/api/voice/profiles": {
      "get": {
        "tags": [
          "Voice"
        ],
        "summary": "Tenant-brede stemmen plus de privéstemmen van de beller. Nooit provider-afgeschermd.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/profiles/designed": {
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Maakt een stem uit de woordenlijst, met de clip HIER opnieuw gerenderd: audio van de beller aannemen was een\nomweg om de toestemmingspoort. Gezaaide synthese levert exact het proefje dat hij bewaarde.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDesignedVoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDesignedVoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDesignedVoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/profiles/cloned": {
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Maakt een stem uit een opname van de beller. Vereist een vastgelegde toestemming.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClonedVoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClonedVoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClonedVoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/profiles/{id}/tenant-default": {
      "put": {
        "tags": [
          "Voice"
        ],
        "summary": "Maakt een tenant-brede stem de huisstem. Vereist string CockpitPermissions.RoutingManage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/profiles/{id}": {
      "delete": {
        "tags": [
          "Voice"
        ],
        "summary": "Verwijdert een stem. Een privéstem mag door z'n eigenaar, een tenant-brede vereist het beheerrecht dat de\ncontroller als bool doorgeeft. De huisstem kan nooit weg (409): dan blijft de omgeving zonder terugvalstem.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/profiles/selection": {
      "put": {
        "tags": [
          "Voice"
        ],
        "summary": "Kiest of wist de eigen voorkeursstem. Nooit provider-afgeschermd: kiezen werkt op elke dienst. Alleen een stem die de\nbeller mag gebruiken — een eigen stem of een stem van de omgeving, dezelfde afbakening als de lijst — wordt bewaard\n(#4502); een andere is een 404. Dit is de enige ingang voor de voorkeursstem: het voorkeurenscherm laat hem staan.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectVoiceProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectVoiceProfileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SelectVoiceProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/voice/profiles/preview": {
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Spreekt een proefzin uit met kenmerken maar zonder stem, en bewaart niets. De gebruikte seed gaat mee in\n`X-Voice-Seed`, zodat een bewaard proefje later exact gereproduceerd kan worden.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewVoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewVoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewVoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/api/voice/profiles/{id}/sample": {
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Spreekt een zin uit met een BESTAANDE stem, voor de speelknop in de stemkiezer. Geen extra recht nodig — een\nstem die je mag kiezen mag je horen — en niet provider-afgeschermd, want alleen MAKEN is dat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SampleVoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SampleVoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SampleVoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/api/voice/profiles/narration": {
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Leest tekst voor met de stem die voor deze gebruiker geldt — de voorleesknop bij een chatbericht. De beller\nkiest de stem niet: een stemnaam in de body sloeg de eigenaarscontrole over.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SynthesizeVoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SynthesizeVoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SynthesizeVoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/api/waitlist/signups": {
      "post": {
        "tags": [
          "Waitlist"
        ],
        "summary": "Public signup. Records interest and nothing else.",
        "description": "    The answer is identical whether this was a first signup or a repeat, so the endpoint cannot be used to\nfind out who is on the list. Abuse is bounded by the per-IP waitlist limiter plus the fleet-wide\nceiling on this route, and by the unique e-mail — a single address can never occupy more than one row.\n    400 carries only the generic \"which field was unusable\" sentence the service produced; it never echoes\nthe submitted values back, so the endpoint cannot be turned into a reflector.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistSignupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistSignupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistSignupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaitlistSignupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist": {
      "get": {
        "tags": [
          "Waitlist"
        ],
        "summary": "The follow-up list. Platform-admin only — it holds other people's personal data.",
        "description": "Bounded page, projected server-side without the free text. The total travels with it so a handler can\nnever mistake a truncated page for the whole queue.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/WaitlistEntryStatus"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaitlistPageDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist/{id}": {
      "get": {
        "tags": [
          "Waitlist"
        ],
        "summary": "One entry in full, including the free text — what a handler opens to follow up.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaitlistEntryDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist/{id}/follow-up": {
      "put": {
        "tags": [
          "Waitlist"
        ],
        "summary": "Records what a human did about one signup. Never provisions anything.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistFollowUpRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistFollowUpRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistFollowUpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Returns all active webhook subscriptions for the current tenant. The list shows each callback URL, so it asks\n`webhooks.manage`, the same right as the writes and the MCP `webhook_list` tool (#4138).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookSubscriptionDto"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Creates a new webhook subscription for the current tenant.\nReturns the HMAC signing secret — this is the only time it is returned.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/webhooks/{id}/regenerate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Regenerates the HMAC signing secret for a webhook subscription.\nReturns the new secret — this is the only time it is returned.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/webhooks/{id}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Deactivates a webhook subscription (soft delete).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Subscription identifier.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": { }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/wizards/sessions/{id}/report": {
      "get": {
        "tags": [
          "WizardSessions"
        ],
        "summary": "Generates (or re-generates) the Process Scan PDF rapport for a wizard session\nand returns it as an application/pdf download. Idempotent read (GET) — mirrors\nReportsController's /reports/monthly/{id}/pdf convention.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/wizards/sessions/{id}/field-status": {
      "get": {
        "tags": [
          "WizardSessions"
        ],
        "summary": "Returns per-field GEVULD / DEELS / OPEN status for a wizard session.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessScanFieldStatusDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessScanFieldStatusDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessScanFieldStatusDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/workbench/{workbenchId}": {
      "get": {
        "tags": [
          "Workbench"
        ],
        "parameters": [
          {
            "name": "workbenchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkbenchDefinition"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/workbench/{workbenchId}/tiles": {
      "get": {
        "tags": [
          "Workbench"
        ],
        "summary": "Every tile of the workbench for one selection, in one answer and in writing order (#4344). Reads only: a tile with\nAI operations reports them pending and the caller asks that tile on Task&lt;IActionResult&gt; WorkbenchController.GetTile(Guid workbenchId, string placementId, Dictionary&lt;string, string&gt;? scope, bool includeAi = true, CancellationToken ct = default(CancellationToken)). Each tile carries its own\nstate, so one that fails is an error tile beside the rest. The viewer and the subject are resolved once for the\nwhole call. Selection as on Task&lt;IActionResult&gt; WorkbenchController.GetTile(Guid workbenchId, string placementId, Dictionary&lt;string, string&gt;? scope, bool includeAi = true, CancellationToken ct = default(CancellationToken)). Limited by string RateLimiterRegistration.WorkbenchTiles,\nsince one request here is every tile's reads.",
        "parameters": [
          {
            "name": "workbenchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RenderedTile"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/workbench/{workbenchId}/tile/{placementId}": {
      "get": {
        "tags": [
          "Workbench"
        ],
        "summary": "One tile for one selection. The selection travels as `scope[name]=value`, bound under that name only: a\nbare `?name=value` is not a selection, so no other parameter of this route can land in the scope.\nincludeAi false renders the reads and reports the AI operations pending — the page's first\npass (#3016); every caller that renders once leaves it at true.",
        "parameters": [
          {
            "name": "workbenchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "placementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          {
            "name": "includeAi",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenderedTile"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/workbench/{workbenchId}/tile/{placementId}/action": {
      "post": {
        "tags": [
          "Workbench"
        ],
        "summary": "Runs one declared action. This is the guard — the disabled button on the page is a courtesy that\nanybody can re-enable in their browser in five seconds.",
        "parameters": [
          {
            "name": "workbenchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "placementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/WorkbenchActionRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/WorkbenchActionRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/WorkbenchActionRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TileActionResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccessRequestStatus": {
        "type": "integer"
      },
      "AcquireLockResponse": {
        "required": [
          "acquired"
        ],
        "type": "object",
        "properties": {
          "acquired": {
            "type": "boolean"
          },
          "lockedByUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "lockedByDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lockedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "alreadyHeld": {
            "type": "boolean"
          },
          "heldByYouElsewhere": {
            "type": "boolean"
          }
        }
      },
      "ActionRefusal": { },
      "ActivatePluginRequest": {
        "type": "object",
        "properties": {
          "configJson": {
            "maxLength": 65536,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ActivateSectorPackRequest": {
        "required": [
          "packId"
        ],
        "type": "object",
        "properties": {
          "packId": {
            "type": "string"
          }
        }
      },
      "ActiveChatRunDto": {
        "required": [
          "runId",
          "status"
        ],
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "AddCreditsRequest": {
        "type": "object",
        "properties": {
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "amountEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "source": {
            "type": [
              "null",
              "string"
            ]
          },
          "reference": {
            "type": [
              "null",
              "string"
            ]
          },
          "idempotencyKey": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AddEntityRequest": {
        "required": [
          "entityType"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string"
          },
          "isReadOnly": {
            "type": "boolean"
          },
          "mappingConfigJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AddGroupMemberRequest": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "AddProcessRoleAssignmentRequest": {
        "required": [
          "level"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "level": {
            "type": "string"
          },
          "stepKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "organizationalRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AgentExecutionMetadata": {
        "required": [
          "agentId",
          "instanceId",
          "durationMs"
        ],
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string"
          },
          "instanceId": {
            "type": "string",
            "format": "uuid"
          },
          "durationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        },
        "description": "Metadata returned alongside an agent execution result."
      },
      "AgreementAssistRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "currentBody": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgreementCreateRequest": {
        "type": "object",
        "properties": {
          "layer": {
            "type": "string"
          },
          "anchorId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "anchorRoleId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgreementLayerRuleDto": {
        "required": [
          "key",
          "statement",
          "rationale"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": [
              "null",
              "string"
            ]
          },
          "statement": {
            "type": "string"
          },
          "rationale": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgreementRuleDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "statement": {
            "type": "string"
          },
          "rationale": {
            "type": [
              "null",
              "string"
            ]
          },
          "provenance": {
            "type": "string"
          }
        }
      },
      "AgreementWriteRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgreementRuleDto"
            }
          }
        }
      },
      "AiBudgetChainDto": {
        "type": "object",
        "properties": {
          "platformEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "partnerEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "tenantEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveLevel": {
            "type": [
              "null",
              "string"
            ]
          },
          "canEditPlatform": {
            "type": "boolean"
          },
          "canEditPartner": {
            "type": "boolean"
          },
          "canEditTenant": {
            "type": "boolean"
          }
        }
      },
      "ApiKeyCreateRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "expiresInDays": {
            "maximum": 3650,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "AppPlanDto": {
        "required": [
          "artifactId",
          "kind",
          "name"
        ],
        "type": "object",
        "properties": {
          "artifactId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AppRegistrationRequest": {
        "required": [
          "clientId",
          "clientSecret",
          "baseUrl",
          "allowTenantOverride"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": [
              "null",
              "string"
            ]
          },
          "baseUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "allowTenantOverride": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean",
            "default": true
          },
          "confirmed": {
            "type": "boolean",
            "default": false
          }
        },
        "description": "A change to one scope's app registration. string? AppRegistrationRequest.ClientSecret null keeps the stored secret; bool AppRegistrationRequest.Confirmed\nfalse only previews. bool AppRegistrationRequest.AllowTenantOverride only counts on a service provider. The validation attributes sit\non the constructor parameters: MVC validates a positional record through them and answers every request with a 500\nwhen a `[property: …]` target puts them on the properties instead (#4158)."
      },
      "ApprovalProxyRequest": {
        "type": "object",
        "properties": {
          "reviewedBy": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Request body for approval via Cockpit."
      },
      "ApproveAccessRequestRequest": {
        "type": "object",
        "properties": {
          "organizationalRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "adoptTemplate": {
            "type": "boolean"
          }
        }
      },
      "ApproveApiRequest": {
        "required": [
          "userCode",
          "name"
        ],
        "type": "object",
        "properties": {
          "userCode": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "connectionMode": {
            "$ref": "#/components/schemas/ForgeConnectionMode"
          }
        }
      },
      "AppVisibilityDto": {
        "type": "object",
        "properties": {
          "visible": {
            "type": "boolean"
          }
        }
      },
      "ArtifactDto": {
        "required": [
          "artifactId",
          "artifactType",
          "title"
        ],
        "type": "object",
        "properties": {
          "artifactId": {
            "type": "string",
            "format": "uuid"
          },
          "artifactType": {
            "$ref": "#/components/schemas/ArtifactType"
          },
          "title": {
            "type": "string"
          },
          "isTitleSystemDefault": {
            "type": "boolean"
          },
          "domain": {
            "type": [
              "null",
              "string"
            ]
          },
          "isSystemDefined": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ownerDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerUserId": {
            "type": "string",
            "format": "uuid"
          },
          "currentVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "activeVersion": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ArtifactVersionDto"
              }
            ]
          },
          "draft": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ArtifactVersionDto"
              }
            ]
          },
          "latestPublished": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ArtifactVersionDto"
              }
            ]
          },
          "lockedByDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lockedByUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "lockedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ArtifactStatus": {
        "type": "integer"
      },
      "ArtifactTemplate": {
        "required": [
          "templateId",
          "artifactType",
          "title",
          "description",
          "icon"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "artifactType": {
            "$ref": "#/components/schemas/ArtifactType"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sector": {
            "type": [
              "null",
              "string"
            ]
          },
          "icon": {
            "type": "string"
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contentJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "bpmnXml": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ArtifactType": {
        "type": "integer"
      },
      "ArtifactVersionDto": {
        "required": [
          "versionId"
        ],
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "format": "uuid"
          },
          "basedOnVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/ArtifactStatus"
          },
          "contentJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "bpmnXml": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdByDisplayName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AskAgentRequest": {
        "required": [
          "task"
        ],
        "type": "object",
        "properties": {
          "task": {
            "type": "string"
          },
          "processId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Ask a domain agent a question, optionally anchored on a process step. The acting tenant + user are\ntaken from the AUTHENTICATED identity — never the request body — to prevent cross-tenant access."
      },
      "AskRunStepDiagnosisDto": {
        "required": [
          "question"
        ],
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          }
        }
      },
      "AssignmentScope": {
        "type": "integer"
      },
      "AssignOrganizationalRoleRequest": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "isPrimary": {
            "type": "boolean"
          }
        }
      },
      "AuditChainBreak": {
        "required": [
          "sequence",
          "entryId",
          "kind",
          "details"
        ],
        "type": "object",
        "properties": {
          "sequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "entryId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/AuditChainBreakKind"
          },
          "details": {
            "type": "string"
          }
        }
      },
      "AuditChainBreakKind": {
        "type": "integer"
      },
      "AuditChainResealResult": {
        "required": [
          "tenantId",
          "resealed",
          "entriesProcessed"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "resealed": {
            "type": "boolean"
          },
          "entriesProcessed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "entriesChanged": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tamperSuspectAtSequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tamperSuspectEntryId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AuditChainStats": {
        "required": [
          "tenantId",
          "totalEntries",
          "hashedEntries",
          "unhashedEntries",
          "maxSequenceNumber"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "totalEntries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "hashedEntries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "unhashedEntries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "maxSequenceNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "firstEntryTimestamp": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastEntryTimestamp": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "prunedRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "prunedThroughIngestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "legalHoldLevels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "horizonPausedByUnreadablePolicy": {
            "type": "boolean"
          }
        }
      },
      "AuditChainVerificationResult": {
        "required": [
          "tenantId",
          "isValid",
          "entriesVerified"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "isValid": {
            "type": "boolean"
          },
          "entriesVerified": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "entriesExamined": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "brokenAtSequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "brokenAtEntryId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "violationDetails": {
            "type": [
              "null",
              "string"
            ]
          },
          "breaks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditChainBreak"
            }
          },
          "totalBreaks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "breaksTruncated": {
            "type": "boolean"
          },
          "verifiedFromSequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "prunedThroughIngestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "AuditLogDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ]
          },
          "userEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "action": {
            "type": "string"
          },
          "details": {
            "type": "string"
          },
          "metadataJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "ipAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "ingestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sequenceNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "entryHash": {
            "type": [
              "null",
              "string"
            ]
          },
          "previousHash": {
            "type": [
              "null",
              "string"
            ]
          },
          "traceId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AvailableIntentsResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unavailable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnavailableIntentDto"
            }
          }
        }
      },
      "BatchApprovalRequest": {
        "required": [
          "ids",
          "action",
          "reason"
        ],
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "action": {
            "type": "string"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BatchDeployRequest": {
        "required": [
          "modelId"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "huggingFacePath": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "forgeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "rolling": {
            "type": "boolean"
          }
        }
      },
      "BillingOverviewDto": {
        "type": "object",
        "properties": {
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "scopeLabel": {
            "type": "string"
          },
          "hasData": {
            "type": "boolean"
          },
          "balanceEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "purchasedEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "consumedEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentPeriodCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentPeriodTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "runwayMonths": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "runwayLabel": {
            "type": "string"
          },
          "periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingPeriodDto"
            }
          },
          "selectedPeriod": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SelectedPeriodDto"
              }
            ]
          },
          "recentMutations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditMutationDto"
            }
          }
        }
      },
      "BillingPeriodDto": {
        "required": [
          "id",
          "monthLabel",
          "periodStart",
          "periodEnd",
          "totalTokens",
          "totalCostEur",
          "topGroupLabel",
          "status",
          "isCurrent"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "monthLabel": {
            "type": "string"
          },
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "periodEnd": {
            "type": "string",
            "format": "date"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "topGroupLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": "string"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "hasUnpricedUsage": {
            "type": "boolean",
            "default": false
          },
          "unpricedModels": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/UnpricedModelTokensDto"
            }
          }
        }
      },
      "BoundIdpOptionDto": {
        "required": [
          "id",
          "code",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          }
        }
      },
      "BuilderAgentHistoryEntry": {
        "required": [
          "role",
          "content"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "BuilderAgentProposal": {
        "required": [
          "toolName",
          "argsJson",
          "description"
        ],
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "argsJson": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "BuilderAgentToolCallRecord": {
        "required": [
          "toolName",
          "argsJson",
          "summary"
        ],
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "argsJson": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "applied": {
            "type": "boolean"
          },
          "rejectionReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BuilderAgentTurnApiRequest": {
        "required": [
          "userPrompt"
        ],
        "type": "object",
        "properties": {
          "userPrompt": {
            "type": "string"
          },
          "history": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BuilderAgentHistoryEntry"
            }
          },
          "maxIterations": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isGeneration": {
            "type": "boolean",
            "description": "True for the one-shot NL→artifact generation from the empty-state hero (P8, #1029). Records the turn\nas `AiEventType.Generate`. Defaults false for ordinary conversational refinement turns."
          }
        },
        "description": "Wire-shape for `POST /api/artifacts/{id}/agent/turn`. TenantId + UserId come from identity, not the body."
      },
      "BuilderAgentTurnResult": {
        "required": [
          "toolCalls",
          "rejectedToolCalls",
          "reply"
        ],
        "type": "object",
        "properties": {
          "toolCalls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuilderAgentToolCallRecord"
            }
          },
          "rejectedToolCalls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuilderAgentToolCallRecord"
            }
          },
          "reply": {
            "type": "string"
          },
          "pendingProposal": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BuilderAgentProposal"
              }
            ]
          },
          "totalPromptTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalCompletionTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "truncatedAtMaxIterations": {
            "type": "boolean"
          },
          "draftVersionId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "BuilderToolExecutionResult": {
        "required": [
          "applied",
          "summary"
        ],
        "type": "object",
        "properties": {
          "applied": {
            "type": "boolean"
          },
          "summary": {
            "type": "string"
          },
          "rejectionReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BundlePart": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "filterField": {
            "type": "string"
          },
          "filters": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "mode": {
            "type": "string"
          },
          "field": {
            "type": [
              "null",
              "string"
            ]
          },
          "fields": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "BundleSpec": {
        "type": "object",
        "properties": {
          "rootEntityType": {
            "type": "string"
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundlePart"
            }
          }
        }
      },
      "ByokFeeKind": {
        "type": "integer"
      },
      "CachePolicyPreset": {
        "type": "integer"
      },
      "CampaignApproverRoleDto": {
        "required": [
          "roleId",
          "label"
        ],
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "CentralModelUpsertRequest": {
        "required": [
          "modelId",
          "displayName",
          "provider",
          "ownerLevel"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "displayName": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "provider": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "family": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "parameterSize": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isApproved": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "minGpuMemoryGb": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recommendedArgs": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "ownerLevel": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ChannelImportance": {
        "type": "integer"
      },
      "ChatAdminModeDto": {
        "required": [
          "canEnable",
          "enabled",
          "expiresAtUtc"
        ],
        "type": "object",
        "properties": {
          "canEnable": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "expiresAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ChatImageContent": {
        "required": [
          "mediaType",
          "base64Data"
        ],
        "type": "object",
        "properties": {
          "mediaType": {
            "type": "string"
          },
          "base64Data": {
            "type": "string"
          }
        }
      },
      "ChurnRiskEntryDto": {
        "required": [
          "tenantId",
          "tenantName",
          "compositeScore",
          "riskLevel",
          "reason"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "compositeScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "riskLevel": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ClientRegistrationRequest": {
        "type": "object",
        "properties": {
          "redirect_uris": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "client_name": {
            "type": [
              "null",
              "string"
            ]
          },
          "grant_types": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "response_types": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "token_endpoint_auth_method": {
            "type": [
              "null",
              "string"
            ]
          },
          "scope": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientRegistrationResponse": {
        "required": [
          "client_id"
        ],
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_id_issued_at": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "client_name": {
            "type": [
              "null",
              "string"
            ]
          },
          "redirect_uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grant_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "token_endpoint_auth_method": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CoachingSessionDetailDto": {
        "required": [
          "firefliesMeetingId",
          "checklistJson",
          "scorecardJson",
          "detectedNumbersJson",
          "missingDataJson"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "firefliesMeetingId": {
            "type": "string"
          },
          "meetingTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "transcriptPreview": {
            "type": [
              "null",
              "string"
            ]
          },
          "processScanWizardSessionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "checklistJson": {
            "type": "string"
          },
          "scorecardJson": {
            "type": "string"
          },
          "detectedNumbersJson": {
            "type": "string"
          },
          "missingDataJson": {
            "type": "string"
          },
          "followUpEmailDraft": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastAnalyzedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "CoachingSessionSummaryDto": {
        "required": [
          "firefliesMeetingId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "firefliesMeetingId": {
            "type": "string"
          },
          "meetingTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "transcriptPreview": {
            "type": [
              "null",
              "string"
            ]
          },
          "checklistFilledPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "scorecardAverage": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "detectedNumbersCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasProcessScanSession": {
            "type": "boolean"
          },
          "analyzedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CockpitAssignmentDto": {
        "type": "object",
        "properties": {
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "partnerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenantName": {
            "type": [
              "null",
              "string"
            ]
          },
          "role": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          }
        }
      },
      "CockpitChatMessage": {
        "required": [
          "role",
          "content"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "images": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ChatImageContent"
            }
          }
        }
      },
      "CockpitInfoResponse": {
        "type": "object",
        "properties": {
          "serverName": {
            "type": "string",
            "description": "Always \"Cockpit\" — used by mobile clients to identify this as a Cockpit instance."
          },
          "serverVersion": {
            "type": "string",
            "description": "Server version."
          },
          "supportsDeviceCode": {
            "type": "boolean",
            "description": "Whether device code (QR-based) authentication is supported.\nRequires Azure AD to be configured."
          },
          "oidcConfig": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "OIDC/Azure AD configuration for MSAL device code flow.",
                "$ref": "#/components/schemas/CockpitOidcConfig"
              }
            ]
          }
        },
        "description": "Response for /api/info endpoint."
      },
      "CockpitMeDto": {
        "type": "object",
        "properties": {
          "isKnown": {
            "type": "boolean"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "partnerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantName": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPartnerAdmin": {
            "type": "boolean"
          },
          "isTenantUser": {
            "type": "boolean"
          },
          "isPlatformAdmin": {
            "type": "boolean"
          },
          "contextWithoutStanding": {
            "type": "boolean"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "activeRoles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allAssignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CockpitAssignmentDto"
            }
          },
          "pendingMemberships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendingMembershipDto"
            }
          },
          "defaultDashboardArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sectorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeZone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CockpitOidcConfig": {
        "type": "object",
        "properties": {
          "authority": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "description": "Azure AD OIDC configuration returned to mobile clients."
      },
      "CockpitUsageEvent": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "description": "Stable id assigned by the SparkForge outbox.",
            "format": "uuid"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Opaque Cockpit user id responsible for the inference call."
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Cockpit tenant id stamped at the inference boundary."
          },
          "tier": {
            "type": [
              "null",
              "string"
            ],
            "description": "Subscription/serving tier captured by SparkForge. Accepted but not yet persisted: UsageLogEntity has no\ntier column, and billability is carried by OwnerLevel (Platform = Ratho-borne resale, everything else\nBYOK/own-hardware). Optional on the wire so a batch is never rejected over a field the ingest discards."
          },
          "modelId": {
            "type": "string",
            "description": "Model identifier (e.g. \"Qwen/Qwen3-32B\", \"gpt-4o\")."
          },
          "promptTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Number of prompt/input tokens consumed.",
            "format": "int32"
          },
          "completionTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Number of completion/output tokens generated.",
            "format": "int32"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Total tokens (prompt + completion). Used as the primary Tokens field.",
            "format": "int32"
          },
          "durationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Request duration in milliseconds.",
            "format": "double"
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ],
            "description": "API endpoint path (e.g. \"/v1/chat/completions\")."
          },
          "timestamp": {
            "type": "string",
            "description": "When this request occurred (UTC).",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Origin of the record. Should be \"direct\" for instance-reported events.\nDefaults to \"direct\" so callers can omit this field."
          }
        },
        "description": "A single usage event reported directly by a SparkForge instance.\nSource should be \"direct\" to distinguish these records from proxy-tracked usage."
      },
      "CockpitUsageEventBatch": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CockpitUsageEvent"
            }
          }
        },
        "description": "A batch of usage events reported directly by a SparkForge instance to Cockpit.\nUsed for the POST /api/forges/{instanceId}/usage endpoint."
      },
      "CompleteOrchestrationTaskRequest": {
        "type": "object",
        "properties": {
          "resultJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ComposeDraftRequest": {
        "type": "object",
        "properties": {
          "intent": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CompositeQueryDto": {
        "required": [
          "artifactId",
          "kind",
          "name",
          "spec"
        ],
        "type": "object",
        "properties": {
          "artifactId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "originIntent": {
            "type": [
              "null",
              "string"
            ]
          },
          "spec": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "versionId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CompositeScoreDto": {
        "required": [
          "score",
          "label",
          "adoptionComponent",
          "throughputComponent",
          "aiIntensityComponent"
        ],
        "type": "object",
        "properties": {
          "score": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "label": {
            "type": "string"
          },
          "adoptionComponent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "throughputComponent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "aiIntensityComponent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ConductRequest": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": [
              "null",
              "string"
            ],
            "description": "Canonical entity type (e.g. `ticket`); absent means `ticket`."
          },
          "entityId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The value of that type's identifying field."
          },
          "ticketId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The pre-generalisation name for EntityId; still accepted."
          },
          "processId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Conduct a plan for one entity, optionally anchored on a process step for the orakel context."
      },
      "ConfigUpdateRequest": {
        "type": "object",
        "properties": {
          "value": {
            "maxLength": 65536,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConfirmRunStepImprovementDto": {
        "required": [
          "content",
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "confirmed": {
            "type": "boolean"
          }
        }
      },
      "ConnectedSourceDto": {
        "required": [
          "name",
          "connectorKey"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "health": {
            "$ref": "#/components/schemas/ConnectedSourceHealth"
          }
        }
      },
      "ConnectedSourceHealth": {
        "type": "integer"
      },
      "ConnectorDescriptorDto": {
        "required": [
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "standardEntityTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "credentialFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorFieldDto"
            }
          },
          "passthroughOnly": {
            "type": "boolean"
          },
          "passthroughEntityType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConnectorFieldDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "isSecret": {
            "type": "boolean"
          },
          "isRequired": {
            "type": "boolean"
          },
          "defaultValue": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConnectorPresetDetailDto": {
        "required": [
          "sectorTag",
          "name",
          "plugins",
          "warnings"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sectorTag": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "plugins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorPresetPluginDto"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ConnectorPresetPluginDto": {
        "required": [
          "pluginId"
        ],
        "type": "object",
        "properties": {
          "pluginId": {
            "type": "string"
          },
          "defaultConfigJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConnectorPresetSummaryDto": {
        "required": [
          "sectorTag",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sectorTag": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "pluginCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ConnectorSwitchChangeRequestDto": {
        "required": [
          "layer",
          "connectorKey",
          "action",
          "enabled"
        ],
        "type": "object",
        "properties": {
          "layer": {
            "type": "string"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "connectorKey": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "apply": {
            "type": "boolean"
          }
        }
      },
      "ConnectorSwitchChangeResultDto": {
        "required": [
          "outcome",
          "connectorKey",
          "before",
          "after",
          "effectiveAfter",
          "stillClosedBy"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "before": {
            "$ref": "#/components/schemas/ConnectorSwitchStateDto"
          },
          "after": {
            "$ref": "#/components/schemas/ConnectorSwitchStateDto"
          },
          "effectiveAfter": {
            "$ref": "#/components/schemas/ConnectorSwitchStateDto"
          },
          "stillClosedBy": {
            "type": "string"
          }
        }
      },
      "ConnectorSwitchLayerDto": {
        "required": [
          "layer",
          "editable"
        ],
        "type": "object",
        "properties": {
          "layer": {
            "type": "string"
          },
          "editable": {
            "type": "boolean"
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConnectorSwitchStateDto"
              }
            ]
          }
        }
      },
      "ConnectorSwitchOverviewDto": {
        "required": [
          "connectors"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "connectors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorSwitchRowDto"
            }
          }
        }
      },
      "ConnectorSwitchRowDto": {
        "required": [
          "connectorKey",
          "layers",
          "effective",
          "closedBy"
        ],
        "type": "object",
        "properties": {
          "connectorKey": {
            "type": "string"
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectorSwitchLayerDto"
            }
          },
          "effective": {
            "$ref": "#/components/schemas/ConnectorSwitchStateDto"
          },
          "closedBy": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ConnectorSwitchStateDto": {
        "required": [
          "read",
          "create",
          "update",
          "delete"
        ],
        "type": "object",
        "properties": {
          "read": {
            "type": "boolean"
          },
          "create": {
            "type": "boolean"
          },
          "update": {
            "type": "boolean"
          },
          "delete": {
            "type": "boolean"
          },
          "changedBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "changedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ConnectorWriteApprovalHistoryScope": {
        "type": "integer"
      },
      "ConnectorWriteApprovalOutcome": {
        "type": "integer"
      },
      "ContextDirectoryDto": {
        "type": "object",
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/ContextDirectoryMode"
          },
          "canAccessPlatform": {
            "type": "boolean"
          },
          "canIncludeSelfTenants": {
            "type": "boolean"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContextNodeDto"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        }
      },
      "ContextDirectoryMode": {
        "type": "integer"
      },
      "ContextNodeDto": {
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ContextNodeKind"
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "partnerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "environment": {
            "type": [
              "null",
              "string"
            ]
          },
          "role": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "tenantCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lifecycleStage": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContextNodeKind": {
        "type": "integer"
      },
      "ConversationCompletionRequest": {
        "required": [
          "messages"
        ],
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CockpitChatMessage"
            }
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "processId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "intent": {
            "type": [
              "null",
              "string"
            ]
          },
          "userMessageId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ConversationCompletionResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "modelUsed": {
            "type": [
              "null",
              "string"
            ]
          },
          "promptTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "completionTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "errorType": {
            "type": [
              "null",
              "string"
            ]
          },
          "provenance": { }
        }
      },
      "ConversationTakeoverResponse": {
        "required": [
          "outcome"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          },
          "conversation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LiveConversationDto"
              }
            ]
          }
        }
      },
      "CoPilotScanResult": {
        "required": [
          "newCount",
          "duplicateCount",
          "open"
        ],
        "type": "object",
        "properties": {
          "newCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "duplicateCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "open": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoPilotSuggestionDto"
            }
          },
          "totalPromptTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalCompletionTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "CoPilotSuggestionDto": {
        "required": [
          "id",
          "elementId",
          "severity",
          "message"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "elementId": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "proposedToolCallJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CostBearer": {
        "type": "integer"
      },
      "CostSource": {
        "type": "integer"
      },
      "CreateAccessRequestRequest": {
        "type": "object",
        "properties": {
          "requestedRoute": {
            "type": [
              "null",
              "string"
            ]
          },
          "processArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedOrganizationalRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "deniedDataSourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateAgentTemplateApiRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "configJson": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string",
            "description": "JSON-serialized agent configuration (name, systemPrompt, settings, plugins).\nDefaults to an empty object if not provided."
          }
        },
        "description": "Request body for creating a new agent template."
      },
      "CreateArtifactRequest": {
        "required": [
          "artifactType",
          "title"
        ],
        "type": "object",
        "properties": {
          "artifactType": {
            "$ref": "#/components/schemas/ArtifactType"
          },
          "title": {
            "type": "string"
          },
          "domain": {
            "type": [
              "null",
              "string"
            ]
          },
          "isTitleSystemDefault": {
            "type": "boolean"
          }
        }
      },
      "CreateClonedVoiceRequest": {
        "required": [
          "name",
          "description",
          "referenceText",
          "audioBase64",
          "contentType",
          "durationSeconds",
          "consentGiven"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "referenceText": {
            "type": "string"
          },
          "audioBase64": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "durationSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "consentGiven": {
            "type": "boolean"
          }
        }
      },
      "CreateCockpitGroupRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "groupType": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "parentGroupId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateDataSourceGrantRequest": {
        "required": [
          "subjectType",
          "subjectId"
        ],
        "type": "object",
        "properties": {
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string",
            "format": "uuid"
          },
          "effect": {
            "type": "string"
          },
          "access": {
            "type": "string"
          }
        }
      },
      "CreateDataSourceRequest": {
        "required": [
          "tenantId",
          "name",
          "connectorKey"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "connectionConfigJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "entityTypes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateDeploymentApiRequest": {
        "required": [
          "templateId",
          "instanceIds"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid"
          },
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "One or more SparkForge instance IDs to deploy to."
          }
        },
        "description": "Request body for deploying an agent template to one or more instances."
      },
      "CreateDesignedVoiceRequest": {
        "required": [
          "name",
          "description",
          "gender",
          "age",
          "pitch",
          "accent",
          "whisper",
          "sampleText",
          "seed"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "gender": {
            "type": [
              "null",
              "string"
            ]
          },
          "age": {
            "type": [
              "null",
              "string"
            ]
          },
          "pitch": {
            "type": [
              "null",
              "string"
            ]
          },
          "accent": {
            "type": [
              "null",
              "string"
            ]
          },
          "whisper": {
            "type": "boolean"
          },
          "sampleText": {
            "type": "string"
          },
          "seed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "CreateForgeRequest": {
        "required": [
          "hostname"
        ],
        "type": "object",
        "properties": {
          "hostname": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "version": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiEndpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "format": "uri"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        },
        "description": "Full creation request used by the admin-only Task&lt;IActionResult&gt; ForgesController.AdminCreate(CreateForgeRequest req, CancellationToken ct = default(CancellationToken)) endpoint."
      },
      "CreateGovernancePolicyRequest": {
        "required": [
          "name",
          "policyType",
          "ownerLevel"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "policyType": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "ownerLevel": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "rulesJson": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "isInheritable": {
            "type": "boolean"
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "CreateIdentityProviderRequest": {
        "required": [
          "code",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "displayName": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "providerType": {
            "$ref": "#/components/schemas/IdentityProviderType"
          },
          "issuer": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "authority": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "clientId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "clientSecret": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "metadataUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "format": "uri"
          },
          "subjectClaimType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "emailClaimType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "displayNameClaimType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantBindingIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "sortOrder": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "canVouchEmailVerified": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CreateImplementationTaskRequest": {
        "required": [
          "weekNumber",
          "title"
        ],
        "type": "object",
        "properties": {
          "weekNumber": {
            "maximum": 6,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateInviteRequest": {
        "required": [
          "email",
          "roleDefinitionId"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "roleDefinitionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dataSourceGrants": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "idpPin": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateMobileConversationRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateModelCostPolicyRequest": {
        "required": [
          "modelId"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "maxLength": 200,
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "costBearer": {
            "$ref": "#/components/schemas/CostBearer"
          },
          "resaleClass": {
            "$ref": "#/components/schemas/ModelResaleClass"
          },
          "licenseClass": {
            "$ref": "#/components/schemas/ModelLicenseClass"
          },
          "ratePer1kTokensEur": {
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "marginPercent": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "byokFeeKind": {
            "$ref": "#/components/schemas/ByokFeeKind"
          },
          "byokFeeValue": {
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "isActive": {
            "type": "boolean"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateNavigationItemRequest": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "icon": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "route": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "parentId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "processId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "minimumRaciLevel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RaciLevel"
              }
            ]
          }
        }
      },
      "CreateOrchestrationTaskRequest": {
        "required": [
          "taskType",
          "title",
          "assignedRole"
        ],
        "type": "object",
        "properties": {
          "taskType": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "title": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "assignedRole": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "priority": {
            "type": [
              "null",
              "string"
            ]
          },
          "nextTaskType": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "nextTaskRole": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "parentTaskId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "triggerId": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "processArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "processInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slaDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "dueDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "metadataJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateOrganizationalRoleRequest": {
        "required": [
          "roleId",
          "label",
          "ownerLevel"
        ],
        "type": "object",
        "properties": {
          "roleId": {
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*\\z",
            "type": "string"
          },
          "label": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "department": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerLevel": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreatePartnerDto": {
        "required": [
          "name",
          "code",
          "contactEmail",
          "logoUrl",
          "azureAdTenantId"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "logoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "azureAdTenantId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateProcessInstanceRequest": {
        "required": [
          "processArtifactId"
        ],
        "type": "object",
        "properties": {
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "entityType": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "entityId": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "currentStepKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "metadataJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "idempotencyKey": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateProcessScanSessionResponse": {
        "type": "object",
        "properties": {
          "wizardSessionId": {
            "type": "string",
            "format": "uuid"
          },
          "artifactId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CreateProviderChainEntryRequest": {
        "required": [
          "ownerLevel",
          "providerType",
          "priority"
        ],
        "type": "object",
        "properties": {
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "providerType": {
            "$ref": "#/components/schemas/InstanceType"
          },
          "modality": {
            "$ref": "#/components/schemas/ProviderModality"
          },
          "apiEndpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "modelId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "maximum": 9999,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "label": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "servedIntent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProviderIntent"
              }
            ]
          },
          "dailyCostCapAmount": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "dailyCostCapCurrency": {
            "maxLength": 8,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "dailyRequestCap": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyTokenCap": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contextWindowBudgetTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxDataClassification": {
            "$ref": "#/components/schemas/DataClassificationLevel"
          },
          "allowPII": {
            "type": "boolean"
          },
          "pseudonymizeBeforeEgress": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "dataResidencyRegion": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "providerSpecificConfigJson": {
            "maxLength": 4000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateRagCollectionRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CreateRagEmbeddingConfigRequest": {
        "required": [
          "ownerLevel",
          "name",
          "providerKey",
          "model",
          "dimensions"
        ],
        "type": "object",
        "properties": {
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "providerKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "endpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "apiVersion": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "forgeInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dimensions": {
            "maximum": 100000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "providerSpecificConfigJson": {
            "maxLength": 4000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "CreateRagVectorStoreConfigRequest": {
        "required": [
          "ownerLevel",
          "name",
          "providerKey"
        ],
        "type": "object",
        "properties": {
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "providerKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "endpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "collectionPrefix": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "providerSpecificConfigJson": {
            "maxLength": 4000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "CreateRateAgreementRequest": {
        "required": [
          "provider",
          "model"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/RateKind"
          },
          "sellerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "sellerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "provider": {
            "maxLength": 100,
            "type": "string"
          },
          "model": {
            "maxLength": 200,
            "type": "string"
          },
          "unit": {
            "$ref": "#/components/schemas/RateUnit"
          },
          "direction": {
            "$ref": "#/components/schemas/RateDirection"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "costPerUnitEur": {
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "costSource": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CostSource"
              }
            ]
          },
          "sourceNote": {
            "maxLength": 500,
            "type": [
              "null",
              "string"
            ]
          },
          "reviewedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reviewedBy": {
            "maxLength": 200,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "CreateReleaseRequest": {
        "required": [
          "version",
          "containerTag"
        ],
        "type": "object",
        "properties": {
          "version": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "containerTag": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "releaseNotes": {
            "maxLength": 10000,
            "minLength": 0,
            "type": "string"
          },
          "releasedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isStable": {
            "type": "boolean"
          },
          "isLts": {
            "type": "boolean"
          }
        }
      },
      "CreateRoutingRuleRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "strategy": {
            "$ref": "#/components/schemas/RoutingStrategy"
          },
          "targetInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "fallbackInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "matchAgentIds": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchWorkflowIds": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchModels": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchDataSensitivity": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchContainsPII": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "matchMinTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "matchMaxTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "matchTimeWindow": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchTags": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "customConditionJson": {
            "maxLength": 10000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateScheduledJobDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "cronExpression": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "jobType": {
            "type": "string"
          },
          "configJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "outputRoutingJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "maxRetries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "timeoutSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "idempotencyKey": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateSkillGrantRequest": {
        "type": "object",
        "properties": {
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string",
            "format": "uuid"
          },
          "effect": {
            "type": "string"
          },
          "access": {
            "type": "string"
          }
        }
      },
      "CreateTenantApiRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "apiKey": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "Optional API key. If empty, a key is generated automatically."
          },
          "sparkForgeInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "routingStrategy": {
            "$ref": "#/components/schemas/RoutingStrategy"
          },
          "adminEmail": {
            "maxLength": 320,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "Optional admin email address. When provided, a welcome email is sent after tenant creation."
          }
        },
        "description": "Request body for creating a new tenant."
      },
      "CreateTokenApiRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "connectionMode": {
            "$ref": "#/components/schemas/ForgeConnectionMode"
          }
        }
      },
      "CreateUserAssignmentRequest": {
        "required": [
          "scope",
          "roleDefinitionId"
        ],
        "type": "object",
        "properties": {
          "scope": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssignmentScope"
              }
            ]
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "roleDefinitionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "isDefault": {
            "type": "boolean"
          }
        }
      },
      "CreateWebhookRequest": {
        "required": [
          "eventType",
          "callbackUrl"
        ],
        "type": "object",
        "properties": {
          "eventType": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "callbackUrl": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string",
            "format": "uri"
          }
        }
      },
      "CreateWebhookResponse": {
        "required": [
          "eventType",
          "callbackUrl",
          "secret"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string"
          },
          "callbackUrl": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "CreditMutationDto": {
        "required": [
          "description",
          "occurredAt",
          "amountEur",
          "kind"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date"
          },
          "amountEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "kind": {
            "type": "string"
          }
        }
      },
      "CustomerDataJobDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "attempts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "problem": {
            "type": [
              "null",
              "string"
            ]
          },
          "inOwnDatabase": {
            "type": "boolean"
          },
          "overdue": {
            "type": "boolean"
          },
          "scheduledFor": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "CustomerDataPlacementDto": {
        "type": "object",
        "properties": {
          "placementId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "type": "string"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "migratedTo": {
            "type": [
              "null",
              "string"
            ]
          },
          "problem": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dropDueAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "DailyUsagePointDto": {
        "required": [
          "date",
          "tokens",
          "requests",
          "isProjected"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "isProjected": {
            "type": "boolean"
          }
        }
      },
      "DashboardChatContextDto": {
        "required": [
          "dashboardId",
          "fetchedAt",
          "widgets",
          "totalWidgets",
          "truncated"
        ],
        "type": "object",
        "properties": {
          "dashboardId": {
            "type": "string",
            "format": "uuid"
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time"
          },
          "widgets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardWidgetChatContextDto"
            }
          },
          "totalWidgets": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "DashboardTemplateDetailDto": {
        "required": [
          "sectorTag",
          "name",
          "widgets",
          "warnings"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sectorTag": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "widgets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardWidgetSummaryDto"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DashboardTemplateSummaryDto": {
        "required": [
          "sectorTag",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sectorTag": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "widgetCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "DashboardWidgetChatContextDto": {
        "required": [
          "nodeId",
          "label",
          "body",
          "truncated"
        ],
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ImmersiveBody"
              }
            ]
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "DashboardWidgetSummaryDto": {
        "required": [
          "id",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "processName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DataAccessPolicyDto": {
        "required": [
          "id",
          "tenantId",
          "enabled",
          "largeDatasetRows"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "dataSourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dataSourceName": {
            "type": [
              "null",
              "string"
            ]
          },
          "entityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "largeDatasetRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxDataAgeMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cacheOnlyAboveRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "DataClassificationLevel": {
        "type": "integer"
      },
      "DataClassificationPolicyDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "defaultLevel": {
            "type": "string"
          },
          "maxSyncLevel": {
            "type": "string"
          },
          "requireClassification": {
            "type": "boolean"
          },
          "autoClassifyOnIngestion": {
            "type": "boolean"
          },
          "customLevelsJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DataSourceAccessMode": {
        "type": "integer"
      },
      "DataSourceDto": {
        "required": [
          "id",
          "tenantId",
          "name",
          "connectorKey",
          "connectionConfigJson",
          "hasSecret",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "connectionConfigJson": {
            "type": "string"
          },
          "hasSecret": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "privateNetworkTargetApprovalOrigin": {
            "type": [
              "null",
              "string"
            ]
          },
          "privateNetworkTargetApprovalRanges": {
            "type": [
              "null",
              "string"
            ]
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntityBindingDto"
            }
          },
          "createdAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "DataSourceGrantDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "dataSourceId": {
            "type": "string",
            "format": "uuid"
          },
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string",
            "format": "uuid"
          },
          "effect": {
            "type": "string"
          },
          "access": {
            "type": "string"
          },
          "grantedBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DataSourceModeAuditResult": {
        "required": [
          "activeTenantCount",
          "strictCount",
          "nonStrictTenants"
        ],
        "type": "object",
        "properties": {
          "activeTenantCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "strictCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nonStrictTenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantAccessModeRow"
            }
          },
          "allStrict": {
            "type": "boolean"
          }
        }
      },
      "DeactivateUsersRequest": {
        "required": [
          "activeExternalIds"
        ],
        "type": "object",
        "properties": {
          "activeExternalIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The external user IDs that are still active on the identity provider.\nAny user on the SparkForge instance whose external ID is NOT in this list will be deactivated."
          }
        },
        "description": "Request body for the deprovision endpoint."
      },
      "DelegateApprovalRequest": {
        "required": [
          "toUserId",
          "note"
        ],
        "type": "object",
        "properties": {
          "toUserId": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DeleteTenantResponse": {
        "type": "object",
        "properties": {
          "pendingCustomerDataJobs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DeleteUserRequest": {
        "type": "object",
        "properties": {
          "confirmation": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DeleteUserResponse": {
        "type": "object",
        "properties": {
          "pendingErasures": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DemoAnchor": {
        "type": "integer"
      },
      "DemoWorldOutcome": {
        "type": "integer"
      },
      "DemoWorldReport": {
        "required": [
          "outcome",
          "reason",
          "state"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/DemoWorldOutcome"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DemoWorldTenantState"
              }
            ]
          }
        }
      },
      "DemoWorldReset": {
        "type": "object",
        "properties": {
          "anchor": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "anchorToday": {
            "type": "boolean"
          },
          "seed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "startScene": {
            "type": "boolean"
          }
        }
      },
      "DemoWorldTenantState": {
        "required": [
          "tenantId",
          "tenantName",
          "onDemoWorld",
          "seeded",
          "seed",
          "overlayRows"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "onDemoWorld": {
            "type": "boolean"
          },
          "seeded": {
            "type": "boolean"
          },
          "seed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "anchor": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "overlayRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DemoAnchor"
              }
            ]
          }
        }
      },
      "DenyAccessRequestRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "DeviceCodeApiRequest": {
        "required": [
          "hostname",
          "apiEndpoint"
        ],
        "type": "object",
        "properties": {
          "hostname": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "version": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiEndpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "format": "uri"
          },
          "devicePublicKey": {
            "maxLength": 4096,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DiscountExpiryEntryDto": {
        "required": [
          "tenantId",
          "tenantName",
          "discountType",
          "discountPercentage",
          "expiresAt",
          "daysRemaining"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "discountType": {
            "type": [
              "null",
              "string"
            ]
          },
          "discountPercentage": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "daysRemaining": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DocStoreDeleteRequest": {
        "required": [
          "level",
          "path"
        ],
        "type": "object",
        "properties": {
          "level": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "path": {
            "type": "string"
          },
          "expectedUpdatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "apply": {
            "type": "boolean"
          }
        }
      },
      "DocStoreDeleteResultDto": {
        "required": [
          "path"
        ],
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "applied": {
            "type": "boolean"
          },
          "deleted": {
            "type": "boolean"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "earlierVersions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DocStoreDocumentDto": {
        "required": [
          "path",
          "level"
        ],
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currentVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "customer": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "content": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "editable": {
            "type": "boolean"
          },
          "routineName": {
            "type": [
              "null",
              "string"
            ]
          },
          "writtenByRoutine": {
            "type": "boolean"
          }
        }
      },
      "DocStoreEntryDto": {
        "required": [
          "path",
          "level"
        ],
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "customer": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "level": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "editable": {
            "type": "boolean"
          },
          "routineName": {
            "type": [
              "null",
              "string"
            ]
          },
          "writtenByRoutine": {
            "type": "boolean"
          }
        }
      },
      "DocStoreHistoryDto": {
        "required": [
          "path"
        ],
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "currentVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocStoreVersionDto"
            }
          }
        }
      },
      "DocStoreLevelDto": {
        "required": [
          "level",
          "canView",
          "canManage"
        ],
        "type": "object",
        "properties": {
          "level": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "canView": {
            "type": "boolean"
          },
          "canManage": {
            "type": "boolean"
          }
        }
      },
      "DocStoreListDto": {
        "type": "object",
        "properties": {
          "folder": {
            "type": "string"
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocStoreEntryDto"
            }
          }
        }
      },
      "DocStoreSaveRequest": {
        "required": [
          "level",
          "path",
          "content"
        ],
        "type": "object",
        "properties": {
          "level": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "path": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "customer": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": [
              "null",
              "string"
            ]
          },
          "expectedUpdatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "apply": {
            "type": "boolean"
          }
        }
      },
      "DocStoreSaveResultDto": {
        "required": [
          "path"
        ],
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "applied": {
            "type": "boolean"
          },
          "created": {
            "type": "boolean"
          },
          "currentVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currentUpdatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "currentUpdatedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "updatedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "storedBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "DocStoreScopeDto": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocStoreLevelDto"
            }
          }
        }
      },
      "DocStoreVersionDto": {
        "type": "object",
        "properties": {
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "replacedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "DoNotRepeatRequest": {
        "required": [
          "refKind",
          "refId"
        ],
        "type": "object",
        "properties": {
          "refKind": {
            "$ref": "#/components/schemas/ThinkAlongRefKind"
          },
          "refId": {
            "type": "string"
          }
        }
      },
      "DropCustomerDataPlacementRequest": {
        "type": "object",
        "properties": {
          "confirmation": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "DsarAuditErasureRequest": {
        "required": [
          "subjectReference",
          "reason"
        ],
        "type": "object",
        "properties": {
          "subjectReference": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "DsarAuditErasureResultDto": {
        "type": "object",
        "properties": {
          "deksDestroyed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DsarCreateRequest": {
        "required": [
          "subjectReference"
        ],
        "type": "object",
        "properties": {
          "subjectReference": {
            "type": "string"
          },
          "requestType": {
            "type": "string"
          },
          "subjectKind": {
            "type": "string"
          },
          "idempotencyKey": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "DsarErasureRequest": {
        "required": [
          "requestId",
          "connectorKey",
          "entityType",
          "subject"
        ],
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "connectorKey": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "idempotencyKey": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "DsarErasureResultDto": {
        "required": [
          "summary"
        ],
        "type": "object",
        "properties": {
          "approvalId": {
            "type": "string",
            "format": "uuid"
          },
          "summary": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DsarLocateRequest": {
        "required": [
          "subject"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "entityTypes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DsarLocateResponse": {
        "required": [
          "subject"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DsarSourceResultDto"
            }
          },
          "sourcesSearched": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sourcesWithData": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DsarRequestDto": {
        "required": [
          "subjectReference"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "subjectReference": {
            "type": "string"
          },
          "subjectKind": {
            "type": "string"
          },
          "requestType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "identityVerified": {
            "type": "boolean"
          },
          "identityMethod": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "locatorRunAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "sourcesSearched": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sourcesWithData": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DsarSourceResultDto": {
        "required": [
          "sourceName",
          "connectorKey",
          "entityType",
          "status"
        ],
        "type": "object",
        "properties": {
          "dataSourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sourceName": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "matchCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "retentionBasis": {
            "type": [
              "null",
              "string"
            ]
          },
          "retentionDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "servedFrom": {
            "type": "string"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DsarStatusUpdateRequest": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "DsarVerifyIdentityRequest": {
        "required": [
          "method"
        ],
        "type": "object",
        "properties": {
          "method": {
            "type": "string"
          }
        }
      },
      "EffectiveAgreementLayerDto": {
        "required": [
          "layer",
          "heading"
        ],
        "type": "object",
        "properties": {
          "layer": {
            "type": "string"
          },
          "switchedOff": {
            "type": "boolean"
          },
          "heading": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EffectiveAgreementRuleDto"
            }
          },
          "versionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "EffectiveAgreementRuleDto": {
        "required": [
          "statement"
        ],
        "type": "object",
        "properties": {
          "statement": {
            "type": "string"
          },
          "rationale": {
            "type": [
              "null",
              "string"
            ]
          },
          "provenance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EffectiveAgreementsDto": {
        "type": "object",
        "properties": {
          "processId": {
            "type": "string",
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EffectiveAgreementLayerDto"
            }
          }
        }
      },
      "EffectiveClassificationDto": {
        "type": "object",
        "properties": {
          "effectiveDefault": {
            "type": "string"
          },
          "syncAllowed": {
            "type": "boolean"
          },
          "ownerLevel": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "EffectiveGovernancePolicyDto": {
        "type": "object",
        "properties": {
          "policyType": {
            "type": "string"
          },
          "mergedRulesJson": {
            "type": "string"
          },
          "mostRestrictiveLevel": {
            "type": "string"
          },
          "contributingPolicies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GovernancePolicyDto"
            }
          }
        }
      },
      "EntityBindingDto": {
        "required": [
          "id",
          "tenantId",
          "entityType",
          "connectorKey",
          "isReadOnly",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "entityType": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "dataSourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "isReadOnly": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "EntityFieldDto": {
        "required": [
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "isNumeric": {
            "type": "boolean"
          }
        }
      },
      "EntityRelationshipDto": {
        "required": [
          "name",
          "kind",
          "target",
          "foreignKey"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "foreignKey": {
            "type": "string"
          }
        }
      },
      "EntityShapeDto": {
        "required": [
          "entityType",
          "fields"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string"
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntityFieldDto"
            }
          },
          "relationships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntityRelationshipDto"
            }
          }
        }
      },
      "EntityTagHeaderValue": {
        "type": "object",
        "properties": {
          "tag": {
            "$ref": "#/components/schemas/StringSegment"
          },
          "isWeak": {
            "type": "boolean"
          }
        }
      },
      "EscalateOrchestrationTaskRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ExactAdminDisconnectRequest": {
        "required": [
          "user",
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "user": {
            "type": [
              "null",
              "string"
            ]
          },
          "confirmed": {
            "type": "boolean"
          }
        }
      },
      "ExactAdminDisconnectResult": {
        "required": [
          "state",
          "userId",
          "account",
          "message"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/M365AdminDisconnectState"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "account": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": "string"
          },
          "grantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ExactConnectionStatus": {
        "required": [
          "configured",
          "connected",
          "needsReauth",
          "hasRight",
          "reason",
          "exactUserId",
          "exactUserName",
          "currentDivision",
          "connectedAt",
          "lastRefreshedAt",
          "connectPage"
        ],
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "connected": {
            "type": "boolean"
          },
          "needsReauth": {
            "type": "boolean"
          },
          "hasRight": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "exactUserId": {
            "type": [
              "null",
              "string"
            ]
          },
          "exactUserName": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentDivision": {
            "type": [
              "null",
              "string"
            ]
          },
          "connectedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastRefreshedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "connectPage": {
            "type": "string"
          }
        }
      },
      "ExactDisconnectResult": {
        "required": [
          "hadConnection",
          "message"
        ],
        "type": "object",
        "properties": {
          "hadConnection": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ExecuteAgentRequest": {
        "required": [
          "agentId",
          "input"
        ],
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string"
          },
          "input": {
            "type": "string"
          },
          "variables": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "description": "Request body for executing an AI agent via a registered SparkForge instance.\nPhase 5: Power Automate action endpoint."
      },
      "ExecuteAgentResponse": {
        "required": [
          "result",
          "metadata"
        ],
        "type": "object",
        "properties": {
          "result": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/AgentExecutionMetadata"
          }
        },
        "description": "Response body for a successful agent execution."
      },
      "ExecuteToolApiRequest": {
        "required": [
          "toolName"
        ],
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "args": {
            "$ref": "#/components/schemas/JsonElement"
          }
        },
        "description": "Wire-shape for `POST /api/artifacts/{id}/agent/execute-tool` — the proposal-confirm path."
      },
      "ExecuteWriteBackRequest": {
        "required": [
          "idempotencyKey"
        ],
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "payload": {
            "$ref": "#/components/schemas/JsonElement"
          }
        }
      },
      "FeatureDenialResponse": {
        "required": [
          "error",
          "feature",
          "currentTier",
          "requiredTier",
          "upgradeUrl"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "feature": {
            "type": "string"
          },
          "currentTier": {
            "type": "string"
          },
          "requiredTier": {
            "type": [
              "null",
              "string"
            ]
          },
          "upgradeUrl": {
            "type": "string"
          },
          "currentTierName": {
            "type": [
              "null",
              "string"
            ]
          },
          "requiredTierName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FederatedSearchRequest": {
        "required": [
          "query"
        ],
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "topK": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 10
          },
          "minScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "float",
            "default": 0.7
          },
          "maxClassification": {
            "type": [
              "null",
              "string"
            ],
            "default": "Internal"
          },
          "forgeIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "description": "Request body for federated search from Cockpit."
      },
      "FederationDataClassification": {
        "type": "integer"
      },
      "FederationEmbedderTierDto": {
        "required": [
          "id",
          "ownerLevel",
          "name",
          "isDefault",
          "providerKey",
          "model",
          "dimensions",
          "hasKey",
          "isActive",
          "updatedAtUtc"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/FederationOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "providerKey": {
            "type": "string"
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": "string"
          },
          "apiVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "dimensions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasKey": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FederationModelDto": {
        "required": [
          "id",
          "modelId",
          "displayName",
          "provider",
          "isApproved",
          "isBlocked",
          "minGpuMemoryGb",
          "ownerLevel",
          "updatedAtUtc"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "modelId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "family": {
            "type": [
              "null",
              "string"
            ]
          },
          "parameterSize": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": [
              "null",
              "string"
            ]
          },
          "isApproved": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "minGpuMemoryGb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recommendedArgs": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/FederationOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FederationOwnerLevel": {
        "type": "integer"
      },
      "FederationProviderChainEntryDto": {
        "required": [
          "id",
          "ownerLevel",
          "providerType",
          "hasKey",
          "priority",
          "isActive",
          "maxDataClassification",
          "allowPII"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/FederationOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "providerType": {
            "$ref": "#/components/schemas/FederationProviderType"
          },
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "apiEndpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "modelId": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasKey": {
            "type": "boolean"
          },
          "servedIntent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FederationProviderIntent"
              }
            ]
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "maxDataClassification": {
            "$ref": "#/components/schemas/FederationDataClassification"
          },
          "allowPII": {
            "type": "boolean"
          },
          "dataResidencyRegion": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FederationProviderIntent": {
        "type": "integer"
      },
      "FederationProviderType": {
        "type": "integer"
      },
      "FederationReadResponse": {
        "required": [
          "protocolVersion",
          "version",
          "generatedAtUtc",
          "providerChain",
          "models",
          "embedders"
        ],
        "type": "object",
        "properties": {
          "protocolVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "version": {
            "type": "string"
          },
          "generatedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "providerChain": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationProviderChainEntryDto"
            }
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationModelDto"
            }
          },
          "embedders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationEmbedderTierDto"
            }
          }
        }
      },
      "FeedbackResponse": {
        "required": [
          "id",
          "tenantId",
          "userId",
          "category",
          "status",
          "content"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "responseContent": {
            "type": [
              "null",
              "string"
            ]
          },
          "processArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "scheduledJobId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "scheduledJobRunId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "diagnosisConversationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dashboardId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "wizardDefinitionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "contextRoute": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledgedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "resolvedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "resolvedByUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ragIngestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "FeedbackSummary": {
        "required": [
          "byCategory"
        ],
        "type": "object",
        "properties": {
          "openCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "acknowledgedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "resolvedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ragIngestedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "averageResolutionHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "byCategory": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "FileContentResult": {
        "type": "object",
        "properties": {
          "fileContents": {
            "type": "string",
            "format": "byte"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "fileDownloadName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastModified": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "entityTag": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EntityTagHeaderValue"
              }
            ]
          },
          "enableRangeProcessing": {
            "type": "boolean"
          }
        }
      },
      "ForecastDto": {
        "required": [
          "projectedPeriodEndTokens",
          "lowerBoundTokens",
          "upperBoundTokens",
          "averageDailyTokens",
          "confidenceLevel",
          "basedOnDays",
          "projectedCostEur",
          "budgetEur",
          "withinBudget",
          "projectedDaily"
        ],
        "type": "object",
        "properties": {
          "projectedPeriodEndTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "lowerBoundTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "upperBoundTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "averageDailyTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "confidenceLevel": {
            "type": "string"
          },
          "basedOnDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "projectedCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "budgetEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "withinBudget": {
            "type": "boolean"
          },
          "projectedDaily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyUsagePointDto"
            }
          }
        }
      },
      "ForgeConnectionMode": {
        "type": "integer"
      },
      "ForgeEmbedderOptionDto": {
        "required": [
          "instanceId",
          "name",
          "connectionMode",
          "embeddingModelIds"
        ],
        "type": "object",
        "properties": {
          "instanceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "connectionMode": {
            "type": "string"
          },
          "embeddingModelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ForgeModelDeployRequest": {
        "required": [
          "modelId"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "huggingFacePath": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "targetNodeId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "maxModelLen": {
            "maximum": 1048576,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "gpuMemoryUtilization": {
            "maximum": 1,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "extraArgs": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ForgeModelStopRequest": {
        "type": "object",
        "properties": {
          "targetNodeId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "gracefulDrain": {
            "type": "boolean"
          }
        }
      },
      "ForgeModelSwitchRequest": {
        "required": [
          "modelId"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "targetNodeId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "gracefulDrain": {
            "type": "boolean"
          }
        }
      },
      "ForgeOptionDto": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ForgeStartTrainingRequest": {
        "required": [
          "name",
          "datasetId",
          "baseModelId"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "datasetId": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "baseModelId": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "method": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "epochs": {
            "maximum": 1000,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "learningRate": {
            "maximum": 1,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "float"
          },
          "loraRank": {
            "maximum": 256,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "batchSize": {
            "maximum": 1024,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ForgeUsageDto": {
        "required": [
          "instanceId",
          "instanceName",
          "tokens",
          "percentOfTotal"
        ],
        "type": "object",
        "properties": {
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "instanceName": {
            "type": "string"
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "percentOfTotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "GeneratedDashboardDto": {
        "required": [
          "dashboardName"
        ],
        "type": "object",
        "properties": {
          "dashboardArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "dashboardName": {
            "type": "string"
          },
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "GenerateLicenseDto": {
        "required": [
          "partnerId",
          "tenantId",
          "maxUsers",
          "maxInstances",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "maxUsers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxInstances": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GenerateMonthlyReportRequest": {
        "required": [
          "tenantId",
          "year",
          "month"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "year": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "month": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GlanceBoardDto": {
        "type": "object",
        "properties": {
          "tiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceTileDto"
            }
          },
          "isLive": {
            "type": "boolean"
          }
        }
      },
      "GlanceDeltaDto": {
        "required": [
          "direction",
          "display",
          "tone"
        ],
        "type": "object",
        "properties": {
          "direction": {
            "type": "string"
          },
          "display": {
            "type": "string"
          },
          "tone": {
            "type": "string"
          }
        }
      },
      "GlanceEntityListDto": {
        "required": [
          "entityType",
          "status"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceSourceStatusDto"
            }
          },
          "facets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceFacetDto"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceEntityRowDto"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasActiveFacets": {
            "type": "boolean"
          },
          "appliedSort": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GlanceSortDto"
              }
            ]
          }
        }
      },
      "GlanceEntityRowDto": {
        "required": [
          "externalId",
          "title",
          "source"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceFieldDto"
            }
          },
          "source": {
            "$ref": "#/components/schemas/GlanceSourceRefDto"
          }
        }
      },
      "GlanceFacetDto": {
        "required": [
          "key",
          "label",
          "kind"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "multiSelect": {
            "type": "boolean"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceFacetOptionDto"
            }
          }
        }
      },
      "GlanceFacetOptionDto": {
        "required": [
          "value",
          "label",
          "count",
          "selected"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "selected": {
            "type": "boolean"
          }
        }
      },
      "GlanceFieldDto": {
        "required": [
          "key",
          "label",
          "value",
          "role",
          "icon"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "icon": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GlanceSegmentDto": {
        "required": [
          "label",
          "value",
          "pct"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "pct": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GlanceSeriesPointDto": {
        "required": [
          "label",
          "value"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "GlanceSortDto": {
        "required": [
          "field",
          "descending"
        ],
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "descending": {
            "type": "boolean"
          }
        }
      },
      "GlanceSourceRefDto": {
        "required": [
          "connectorKey",
          "label",
          "status"
        ],
        "type": "object",
        "properties": {
          "connectorKey": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "GlanceSourceStatusDto": {
        "required": [
          "connectorKey",
          "label",
          "status",
          "snapshotAtUtc",
          "failureReason"
        ],
        "type": "object",
        "properties": {
          "connectorKey": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "snapshotAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "failureReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GlanceTileDetailDto": {
        "required": [
          "metricKey",
          "title",
          "display",
          "hasData"
        ],
        "type": "object",
        "properties": {
          "metricKey": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "display": {
            "type": "string"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasData": {
            "type": "boolean"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "breakdownLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceSeriesPointDto"
            }
          },
          "trendLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "trend": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceSeriesPointDto"
            }
          },
          "sourceLabel": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GlanceTileDto": {
        "required": [
          "metricKey",
          "title",
          "icon",
          "accent",
          "display",
          "format",
          "hasDetail"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "metricKey": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "accent": {
            "type": "string"
          },
          "display": {
            "type": "string"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          },
          "format": {
            "type": "string"
          },
          "hasDetail": {
            "type": "boolean"
          },
          "variant": {
            "type": "string"
          },
          "series": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlanceSegmentDto"
            }
          },
          "breakdownLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "delta": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GlanceDeltaDto"
              }
            ]
          },
          "sourceLabel": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GovernanceOwnerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "GovernancePolicyDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "policyType": {
            "type": "string"
          },
          "ownerLevel": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "rulesJson": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "isInheritable": {
            "type": "boolean"
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GrantSubjectOptionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "GrantSubjectOptionsDto": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantSubjectOptionDto"
            }
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantSubjectOptionDto"
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GrantSubjectOptionDto"
            }
          }
        }
      },
      "GroupUsageDto": {
        "required": [
          "groupId",
          "groupLabel",
          "tokens",
          "percentOfTotal"
        ],
        "type": "object",
        "properties": {
          "groupId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "groupLabel": {
            "type": "string"
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "percentOfTotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "IdentityProviderDto": {
        "required": [
          "code",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "providerType": {
            "$ref": "#/components/schemas/IdentityProviderType"
          },
          "issuer": {
            "type": [
              "null",
              "string"
            ]
          },
          "authority": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientId": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasClientSecret": {
            "type": "boolean"
          },
          "metadataUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "subjectClaimType": {
            "type": "string"
          },
          "emailClaimType": {
            "type": "string"
          },
          "displayNameClaimType": {
            "type": "string"
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantBindingIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "canVouchEmailVerified": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IdentityProviderType": {
        "type": "integer"
      },
      "IdpConfigResponse": {
        "required": [
          "code",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "providerType": {
            "$ref": "#/components/schemas/IdentityProviderType"
          },
          "authority": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientId": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientSecret": {
            "type": [
              "null",
              "string"
            ]
          },
          "issuer": {
            "type": [
              "null",
              "string"
            ]
          },
          "metadataUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "ImmersiveBody": {
        "required": [
          "kind"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "metrics": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImmersiveBodyMetric"
            }
          },
          "metricColumns": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "chartType": {
            "type": [
              "null",
              "string"
            ]
          },
          "series": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImmersiveBodyPoint"
            }
          },
          "columns": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "cellSeverities": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "rowLinks": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "rowTotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "feed": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImmersiveBodyFeedItem"
            }
          },
          "fields": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImmersiveBodyField"
            }
          },
          "avatar": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ImmersiveBodyAvatar"
              }
            ]
          },
          "sections": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ImmersiveBodySection"
            }
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "action": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ImmersiveBodyAction"
              }
            ]
          }
        }
      },
      "ImmersiveBodyAction": {
        "required": [
          "kind",
          "label"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "resourceId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ImmersiveBodyAvatar": {
        "required": [
          "monogram"
        ],
        "type": "object",
        "properties": {
          "monogram": {
            "type": "string"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ImmersiveBodyFeedItem": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "meta": {
            "type": [
              "null",
              "string"
            ]
          },
          "dateLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "severity": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ImmersiveBodyField": {
        "required": [
          "label",
          "value"
        ],
        "type": "object",
        "properties": {
          "format": {
            "type": [
              "null",
              "string"
            ]
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "severity": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ImmersiveBodyMetric": {
        "required": [
          "label",
          "value"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "severity": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ImmersiveBodyPoint": {
        "required": [
          "label"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ImmersiveBodySection": {
        "required": [
          "label",
          "body"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "body": {
            "$ref": "#/components/schemas/ImmersiveBody"
          },
          "severity": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ImmersiveComposeApiRequest": {
        "required": [
          "prompt"
        ],
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "history": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CockpitChatMessage"
            },
            "description": "Prior turns (oldest first) for multi-turn refinement of the same canvas. Optional."
          }
        },
        "description": "Wire-shape for `POST /api/immersive/compose`. Tenant/user come from identity, not the body."
      },
      "ImmersiveComposeApiResponse": {
        "required": [
          "intentJson",
          "reply"
        ],
        "type": "object",
        "properties": {
          "intentJson": {
            "type": "string"
          },
          "reply": {
            "type": "string"
          },
          "succeeded": {
            "type": "boolean"
          }
        },
        "description": "Result shape — the serialized intent + the AI's chat-as-canvas narration."
      },
      "ImplementationTaskDto": {
        "required": [
          "id",
          "tenantId",
          "weekNumber",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "weekNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "isCompleted": {
            "type": "boolean"
          },
          "blockerText": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ImplementationTaskOwnerOption": {
        "required": [
          "userId",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "InspectPlanRequest": {
        "type": "object",
        "properties": {
          "planJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "InstanceOwnerLevel": {
        "type": "integer"
      },
      "InstanceType": {
        "type": "integer"
      },
      "InstantiateSectorPackRequest": {
        "required": [
          "sectorTag"
        ],
        "type": "object",
        "properties": {
          "sectorTag": {
            "type": "string"
          },
          "orgRoleMappings": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "InviteMembershipOutcome": {
        "type": "integer"
      },
      "InviteOptionsDto": {
        "type": "object",
        "properties": {
          "canInviteTenantScope": {
            "type": "boolean"
          },
          "canInvitePartnerScope": {
            "type": "boolean"
          },
          "fixedTenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "boundIdps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoundIdpOptionDto"
            }
          },
          "isManagedSp": {
            "type": "boolean"
          }
        }
      },
      "InvitePreviewDto": {
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/InviteMembershipOutcome"
          },
          "email": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "scopeDescription": {
            "type": "string"
          },
          "grantsRequested": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "InviteResultDto": {
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/InviteMembershipOutcome"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "scopeDescription": {
            "type": "string"
          },
          "inviteId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "grantsApplied": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "InvoiceDto": {
        "required": [
          "id",
          "invoiceNumber",
          "monthLabel"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "billingPeriodId": {
            "type": "string",
            "format": "uuid"
          },
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "monthLabel": {
            "type": "string"
          },
          "creditorLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "debtorLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "debtorId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "debtorLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "scopeLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "totalAmountEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "hasUnpricedUsage": {
            "type": "boolean"
          },
          "paymentStatus": {
            "$ref": "#/components/schemas/InvoicePaymentStatus"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "paidAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "InvoicePaymentStatus": {
        "type": "integer"
      },
      "IssueInvoiceRequest": {
        "type": "object",
        "properties": {
          "periodId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "JobRunStatus": {
        "type": "integer"
      },
      "JoinMeetingRequest": {
        "required": [
          "meetingUrl"
        ],
        "type": "object",
        "properties": {
          "meetingUrl": {
            "type": "string"
          },
          "botName": {
            "type": [
              "null",
              "string"
            ]
          },
          "language": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        },
        "description": "Guid? JoinMeetingRequest.TenantId (#1420): when set AND different from the caller's own tenant, dispatch targets\nthat tenant's Vexa — honored ONLY for callers holding\nstring CockpitPermissions.VoiceAdminDispatch; everyone else stays pinned to their authenticated\ntenant. Null = the caller's own tenant (the normal, IDOR-safe path)."
      },
      "JsonElement": { },
      "KnowledgeIndexProjectionStatusDto": {
        "required": [
          "entityType",
          "attached",
          "enabled"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string"
          },
          "attached": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "lastSyncStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastSyncError": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastSyncRowCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastSyncedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "KnowledgeIndexStatusDto": {
        "required": [
          "dataSourceId",
          "supported",
          "enabled",
          "projections",
          "notice"
        ],
        "type": "object",
        "properties": {
          "dataSourceId": {
            "type": "string",
            "format": "uuid"
          },
          "supported": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "projections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KnowledgeIndexProjectionStatusDto"
            }
          },
          "notice": {
            "type": "string"
          },
          "sourceActive": {
            "type": "boolean"
          }
        }
      },
      "LiveConversationDto": {
        "required": [
          "conversationId",
          "ownerUserId"
        ],
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerUserId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "isStreaming": {
            "type": "boolean"
          },
          "isHumanControlled": {
            "type": "boolean"
          },
          "supervisorUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "supervisorName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "LoginProviderDto": {
        "required": [
          "code",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "providerType": {
            "$ref": "#/components/schemas/IdentityProviderType"
          },
          "authority": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "M365AdminConsentStatus": {
        "required": [
          "configured",
          "directoryId",
          "surfaces",
          "consentedAt",
          "consentedBy",
          "appChanged"
        ],
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "directoryId": {
            "type": [
              "null",
              "string"
            ]
          },
          "surfaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/M365AdminConsentSurface"
            }
          },
          "consentedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "consentedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "appChanged": {
            "type": "boolean"
          }
        }
      },
      "M365AdminConsentSurface": {
        "required": [
          "surface",
          "consented"
        ],
        "type": "object",
        "properties": {
          "surface": {
            "type": "string"
          },
          "consented": {
            "type": "boolean"
          }
        }
      },
      "M365AdminDisconnectRequest": {
        "required": [
          "user",
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "user": {
            "type": [
              "null",
              "string"
            ]
          },
          "confirmed": {
            "type": "boolean"
          }
        }
      },
      "M365AdminDisconnectResult": {
        "required": [
          "state",
          "targetUserId",
          "microsoftAccount",
          "message"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/M365AdminDisconnectState"
          },
          "targetUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "microsoftAccount": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": "string"
          },
          "grantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "M365AdminDisconnectState": {
        "type": "integer"
      },
      "M365ConnectionStatus": {
        "required": [
          "configured",
          "connected",
          "needsReauth",
          "reason",
          "microsoftAccount",
          "microsoftDisplayName",
          "connectedAt",
          "lastUsedAt",
          "grantedScopes",
          "surfaces",
          "connectPage"
        ],
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "connected": {
            "type": "boolean"
          },
          "needsReauth": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "microsoftAccount": {
            "type": [
              "null",
              "string"
            ]
          },
          "microsoftDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "connectedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "grantedScopes": {
            "type": [
              "null",
              "string"
            ]
          },
          "surfaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/M365SurfaceStatus"
            }
          },
          "connectPage": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "M365DisconnectResult": {
        "required": [
          "hadConnection",
          "message"
        ],
        "type": "object",
        "properties": {
          "hadConnection": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "M365SurfaceGrantDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "part": {
            "type": "string"
          },
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string",
            "format": "uuid"
          },
          "effect": {
            "type": "string"
          },
          "access": {
            "type": "string"
          },
          "grantedBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "M365SurfaceStatus": {
        "required": [
          "surface",
          "name",
          "meaning",
          "hasRight",
          "consented",
          "usable"
        ],
        "type": "object",
        "properties": {
          "surface": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "meaning": {
            "type": "string"
          },
          "hasRight": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "consented": {
            "type": "boolean"
          },
          "usable": {
            "type": "boolean"
          }
        }
      },
      "ManagedTransitionMember": {
        "required": [
          "userId",
          "email",
          "crossSpAssignments",
          "extraExternalIdentities",
          "extraEmails"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "crossSpAssignments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "extraExternalIdentities": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "extraEmails": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ManagedTransitionPreview": {
        "required": [
          "partnerId",
          "alreadyManaged",
          "affectedMemberCount",
          "crossSpAssignmentCount",
          "extraExternalIdentityCount",
          "extraEmailCount"
        ],
        "type": "object",
        "properties": {
          "partnerId": {
            "type": "string",
            "format": "uuid"
          },
          "alreadyManaged": {
            "type": "boolean"
          },
          "affectedMemberCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "crossSpAssignmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "extraExternalIdentityCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "extraEmailCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManagedTransitionMember"
            }
          }
        }
      },
      "ManagedTransitionResult": {
        "required": [
          "partnerId",
          "modeChanged",
          "crossSpAssignmentsRevoked",
          "externalIdentitiesUnlinked",
          "emailsUnlinked"
        ],
        "type": "object",
        "properties": {
          "partnerId": {
            "type": "string",
            "format": "uuid"
          },
          "modeChanged": {
            "type": "boolean"
          },
          "crossSpAssignmentsRevoked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "externalIdentitiesUnlinked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "emailsUnlinked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "McpAppDecisionRequest": {
        "required": [
          "ticket",
          "action"
        ],
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "mcpClientId": {
            "type": [
              "null",
              "string"
            ]
          },
          "confirmation": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "McpAuthorizationCodeRequest": {
        "required": [
          "clientId",
          "redirectUri",
          "codeChallenge",
          "codeChallengeMethod"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "redirectUri": {
            "type": "string"
          },
          "codeChallenge": {
            "type": "string"
          },
          "codeChallengeMethod": {
            "type": "string"
          },
          "resource": {
            "type": [
              "null",
              "string"
            ]
          },
          "scope": {
            "type": [
              "null",
              "string"
            ]
          },
          "consentGranted": {
            "type": "boolean"
          },
          "homeTenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "McpAuthorizationCodeResponse": {
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "boolean"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "errorDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "redirectUntrusted": {
            "type": "boolean"
          },
          "consentRequired": {
            "type": "boolean"
          },
          "clientName": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientDomain": {
            "type": [
              "null",
              "string"
            ]
          },
          "homeTenantOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpHomeTenantOption"
            }
          }
        }
      },
      "McpClientResult": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/McpClientState"
          },
          "data": { },
          "retryAfterSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "McpClientState": {
        "type": "integer"
      },
      "McpClientToolDescriptor": {
        "required": [
          "name",
          "description",
          "inputSchema"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "inputSchema": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "outputSchema": { },
          "annotations": { },
          "contractFingerprint": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "McpConnectedAppDto": {
        "required": [
          "clientId"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "clientName": {
            "type": [
              "null",
              "string"
            ]
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "environments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpConnectedAppEnvironmentDto"
            }
          }
        }
      },
      "McpConnectedAppEnvironmentDto": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "McpConnectionAuthenticationKind": {
        "type": "integer",
        "default": 0
      },
      "McpConnectionDto": {
        "required": [
          "id",
          "name",
          "endpoint",
          "delegatedScope",
          "entraTenantId",
          "ownerLevel",
          "canEdit",
          "isActive",
          "version"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "endpoint": {
            "type": "string",
            "format": "uri"
          },
          "delegatedScope": {
            "type": "string"
          },
          "entraTenantId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "canEdit": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "version": {
            "type": "string"
          },
          "authenticationKind": {
            "$ref": "#/components/schemas/McpConnectionAuthenticationKind"
          },
          "oAuthClientId": {
            "type": [
              "null",
              "string"
            ]
          },
          "oAuthIssuer": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasOAuthClientSecret": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "McpConnectionOwnershipDto": {
        "required": [
          "managesTenantConnections"
        ],
        "type": "object",
        "properties": {
          "managesTenantConnections": {
            "type": "boolean"
          },
          "personalSourcesAllowed": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "McpConnectionRequest": {
        "required": [
          "name",
          "endpoint"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "endpoint": {
            "maxLength": 2048,
            "type": "string"
          },
          "delegatedScope": {
            "maxLength": 512,
            "type": "string"
          },
          "entraTenantId": {
            "type": "string",
            "format": "uuid"
          },
          "authenticationKind": {
            "$ref": "#/components/schemas/McpConnectionAuthenticationKind"
          },
          "oAuthClientId": {
            "maxLength": 2048,
            "type": [
              "null",
              "string"
            ]
          },
          "oAuthIssuer": {
            "maxLength": 2048,
            "type": [
              "null",
              "string"
            ]
          },
          "oAuthClientSecret": {
            "maxLength": 1024,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "version": {
            "maxLength": 100,
            "type": [
              "null",
              "string"
            ]
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          }
        }
      },
      "McpDashboardBindingReadResult": {
        "required": [
          "selection",
          "result"
        ],
        "type": "object",
        "properties": {
          "selection": {
            "$ref": "#/components/schemas/McpDashboardBindingSelection"
          },
          "result": {
            "$ref": "#/components/schemas/McpReviewedReadResult"
          }
        }
      },
      "McpDashboardBindingSelection": {
        "required": [
          "bindingId",
          "bindingVersion"
        ],
        "type": "object",
        "properties": {
          "bindingId": {
            "type": "string",
            "format": "uuid"
          },
          "bindingVersion": {
            "type": "string"
          }
        }
      },
      "McpHomeTenantOption": {
        "required": [
          "tenantId",
          "name"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "McpOAuthAuthorizationState": {
        "type": "integer"
      },
      "McpOAuthConnectionStatus": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/McpOAuthAuthorizationState"
          },
          "issuer": {
            "type": [
              "null",
              "string"
            ]
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "authorizationRevision": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "setupOrigin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpSetupOrigin"
              }
            ]
          },
          "connectionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "McpOAuthDiscoveryProbeRequest": {
        "required": [
          "endpoint"
        ],
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "string",
            "format": "uri"
          },
          "issuer": {
            "type": [
              "null",
              "string"
            ],
            "format": "uri"
          }
        }
      },
      "McpOAuthDiscoveryResult": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/McpOAuthDiscoveryState"
          },
          "metadata": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpOAuthMetadata"
              }
            ]
          },
          "authorizationServers": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      },
      "McpOAuthDiscoveryState": {
        "type": "integer"
      },
      "McpOAuthMetadata": {
        "required": [
          "resource",
          "issuer",
          "authorizationEndpoint",
          "tokenEndpoint",
          "registrationEndpoint",
          "revocationEndpoint",
          "scopes",
          "tokenEndpointAuthMethods",
          "clientIdMetadataDocumentSupported",
          "authorizationResponseIssuerRequired"
        ],
        "type": "object",
        "properties": {
          "resource": {
            "type": "string",
            "format": "uri"
          },
          "issuer": {
            "type": "string"
          },
          "authorizationEndpoint": {
            "type": "string",
            "format": "uri"
          },
          "tokenEndpoint": {
            "type": "string",
            "format": "uri"
          },
          "registrationEndpoint": {
            "type": [
              "null",
              "string"
            ],
            "format": "uri"
          },
          "revocationEndpoint": {
            "type": [
              "null",
              "string"
            ],
            "format": "uri"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tokenEndpointAuthMethods": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "clientIdMetadataDocumentSupported": {
            "type": "boolean"
          },
          "authorizationResponseIssuerRequired": {
            "type": "boolean"
          }
        }
      },
      "McpOAuthStartRequest": {
        "required": [
          "connectionVersion"
        ],
        "type": "object",
        "properties": {
          "connectionVersion": {
            "type": "string"
          },
          "setupOrigin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpSetupOrigin"
              }
            ]
          }
        }
      },
      "McpReviewedReadResult": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/McpReviewedReadState"
          },
          "values": { },
          "items": {
            "type": [
              "null",
              "array"
            ]
          },
          "truncated": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "retryAfterSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "McpReviewedReadState": {
        "type": "integer"
      },
      "McpServerCreateRequest": {
        "required": [
          "name",
          "transportType",
          "endpoint"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "transportType": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "endpoint": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "arguments": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "environmentVariables": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "isPublic": {
            "type": "boolean"
          }
        }
      },
      "McpServerUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "transportType": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "endpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "arguments": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "environmentVariables": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "isEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "isPublic": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "McpSetupOrigin": {
        "required": [
          "kind"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/McpSetupOriginKind"
          },
          "artifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "McpSetupOriginKind": {
        "type": "integer"
      },
      "McpSourcePolicyRequest": {
        "required": [
          "personalSourcesAllowed"
        ],
        "type": "object",
        "properties": {
          "personalSourcesAllowed": {
            "type": "boolean"
          }
        }
      },
      "McpTokenResponse": {
        "required": [
          "access_token",
          "expires_in",
          "expires_at",
          "tenant_id",
          "permissions"
        ],
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          },
          "expires_in": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Seconds until expiry (OAuth convention).",
            "format": "int32"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "tenant_id": {
            "type": "string",
            "description": "The Cockpit tenant the token acts for (the user's active tenant) — echoed for client clarity."
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The connector permissions baked into the token (`api-access:{slug}` / `api-write:{slug}`)."
          }
        },
        "description": "The minted Option-C MCP access token, returned by `POST /api/mcp/token`. OAuth-style field names so\nMCP clients can treat it like any bearer-token response."
      },
      "McpToolBindingCallRequest": {
        "required": [
          "version",
          "input",
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "confirmed": {
            "type": "boolean"
          }
        }
      },
      "McpToolBindingDefinition": {
        "required": [
          "connectionVersion",
          "tool",
          "mapping"
        ],
        "type": "object",
        "properties": {
          "connectionVersion": {
            "type": "string"
          },
          "tool": {
            "$ref": "#/components/schemas/McpClientToolDescriptor"
          },
          "mapping": {
            "$ref": "#/components/schemas/McpToolMapping"
          },
          "usage": {
            "$ref": "#/components/schemas/McpToolBindingUsage"
          }
        }
      },
      "McpToolBindingDto": {
        "required": [
          "id",
          "connectionId",
          "name",
          "ownerLevel",
          "canEdit",
          "isActive",
          "version",
          "definition"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "connectionId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "canEdit": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "version": {
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/McpToolBindingDefinition"
          }
        }
      },
      "McpToolBindingReadRequest": {
        "required": [
          "version",
          "input"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "input": {
            "$ref": "#/components/schemas/JsonElement"
          }
        }
      },
      "McpToolBindingRequest": {
        "required": [
          "name",
          "connectionVersion",
          "tool",
          "contractFingerprint",
          "mapping"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "connectionVersion": {
            "maxLength": 100,
            "type": "string"
          },
          "tool": {
            "maxLength": 256,
            "type": "string"
          },
          "contractFingerprint": {
            "maxLength": 64,
            "minLength": 64,
            "type": "string"
          },
          "mapping": {
            "$ref": "#/components/schemas/McpToolMapping"
          },
          "confirmed": {
            "type": "boolean"
          },
          "usage": {
            "$ref": "#/components/schemas/McpToolBindingUsage"
          },
          "isActive": {
            "type": "boolean"
          },
          "version": {
            "maxLength": 100,
            "type": [
              "null",
              "string"
            ]
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          }
        }
      },
      "McpToolBindingResult": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/McpClientState"
          },
          "values": { },
          "items": {
            "type": [
              "null",
              "array"
            ]
          },
          "truncated": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "retryAfterSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "McpToolBindingUsage": {
        "type": "integer",
        "default": 0
      },
      "McpToolCallRequest": {
        "required": [
          "tool",
          "connectionVersion",
          "contractFingerprint",
          "arguments",
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "tool": {
            "type": "string"
          },
          "connectionVersion": {
            "type": "string"
          },
          "contractFingerprint": {
            "type": "string"
          },
          "arguments": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "confirmed": {
            "type": "boolean"
          }
        }
      },
      "McpToolMapping": {
        "required": [
          "arguments"
        ],
        "type": "object",
        "properties": {
          "arguments": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "argumentPaths": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "resultPaths": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "itemsPath": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "itemPaths": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "McpToolMappingProposalRequest": {
        "required": [
          "connectionVersion",
          "tool",
          "contractFingerprint",
          "purpose"
        ],
        "type": "object",
        "properties": {
          "connectionVersion": {
            "maxLength": 100,
            "type": "string"
          },
          "tool": {
            "maxLength": 256,
            "type": "string"
          },
          "contractFingerprint": {
            "maxLength": 64,
            "minLength": 64,
            "type": "string"
          },
          "purpose": {
            "maxLength": 4000,
            "type": "string"
          },
          "probe": {
            "type": "boolean"
          }
        }
      },
      "McpToolMappingProposalResult": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/McpClientState"
          },
          "mapping": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpToolMapping"
              }
            ]
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "inferredShape": { }
        }
      },
      "McpWorkdayBindingSelection": {
        "required": [
          "bindingId",
          "bindingVersion"
        ],
        "type": "object",
        "properties": {
          "bindingId": {
            "type": "string",
            "format": "uuid"
          },
          "bindingVersion": {
            "type": "string"
          }
        }
      },
      "McpWorkdayConnection": {
        "required": [
          "configured"
        ],
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "delegatedScope": {
            "type": [
              "null",
              "string"
            ]
          },
          "formsUrl": {
            "type": [
              "null",
              "string"
            ],
            "format": "uri"
          },
          "binding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpWorkdayBindingSelection"
              }
            ]
          },
          "timeZone": {
            "type": [
              "null",
              "string"
            ]
          },
          "connectionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "native": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "McpWorkdayItem": {
        "required": [
          "title",
          "detail",
          "time"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "time": {
            "type": [
              "null",
              "string"
            ]
          },
          "isCancelled": {
            "type": "boolean",
            "default": false
          },
          "isAllDay": {
            "type": "boolean",
            "default": false
          },
          "sourceId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "McpWorkdayOptInRequest": {
        "required": [
          "source",
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "confirmed": {
            "type": "boolean"
          }
        }
      },
      "McpWorkdayReadState": {
        "type": "integer"
      },
      "McpWorkdaySnapshot": {
        "required": [
          "tenantId",
          "sources"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpWorkdaySource"
            }
          },
          "binding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpWorkdayBindingSelection"
              }
            ]
          }
        }
      },
      "McpWorkdaySource": {
        "required": [
          "source",
          "state",
          "fetchedAt",
          "truncated",
          "items"
        ],
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/McpWorkdayReadState"
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time"
          },
          "truncated": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/McpWorkdayItem"
            }
          },
          "notice": {
            "type": [
              "null",
              "string"
            ]
          },
          "retryAfterSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "McpWorkdayToolResult": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/McpWorkdayReadState"
          },
          "data": { },
          "retryAfterSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MeetingAutoJoinPreferenceDto": {
        "required": [
          "enabled",
          "leadTimeMinutes"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "leadTimeMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "userPrincipalName": {
            "type": [
              "null",
              "string"
            ]
          },
          "botName": {
            "type": [
              "null",
              "string"
            ]
          },
          "language": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MissedRunDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "jobName": {
            "type": "string"
          },
          "jobType": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "firstOccurrence": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastOccurrence": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "occurrenceCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "checkIncomplete": {
            "type": "boolean"
          },
          "lastRunAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "stuckRunId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stuckSince": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "MobileChatImage": {
        "required": [
          "mediaType",
          "base64Data"
        ],
        "type": "object",
        "properties": {
          "mediaType": {
            "type": "string"
          },
          "base64Data": {
            "type": "string"
          }
        }
      },
      "MobileChatMessageDto": {
        "required": [
          "id",
          "content",
          "isUser",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "isUser": {
            "type": "boolean"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "provenance": { },
          "reasoningSummary": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasoningDurationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reasoningTranslation": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MobileChatStreamRequest": {
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "intent": {
            "type": [
              "null",
              "string"
            ]
          },
          "images": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MobileChatImage"
            }
          }
        }
      },
      "MobileConversationDetailDto": {
        "required": [
          "conversation",
          "messages"
        ],
        "type": "object",
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/MobileConversationDto"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MobileChatMessageDto"
            }
          }
        }
      },
      "MobileConversationDto": {
        "required": [
          "id",
          "title",
          "createdAt",
          "lastMessageAt",
          "isArchived",
          "lastIntent",
          "messageCount",
          "lastSnippet"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "isArchived": {
            "type": "boolean"
          },
          "lastIntent": {
            "type": [
              "null",
              "string"
            ]
          },
          "messageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastSnippet": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MobileConversationListResponse": {
        "required": [
          "items",
          "total",
          "skip",
          "take"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MobileConversationDto"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contentSearchBounded": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ModelCostDto": {
        "required": [
          "modelId",
          "tokens",
          "costEur",
          "isByok"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "costEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "isByok": {
            "type": "boolean"
          },
          "isUnpriced": {
            "type": "boolean",
            "default": false
          },
          "serviceTier": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasUnknownCost": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ModelCostPolicyDto": {
        "required": [
          "id",
          "modelId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "modelId": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "costBearer": {
            "$ref": "#/components/schemas/CostBearer"
          },
          "resaleClass": {
            "$ref": "#/components/schemas/ModelResaleClass"
          },
          "licenseClass": {
            "$ref": "#/components/schemas/ModelLicenseClass"
          },
          "ratePer1kTokensEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "marginPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "byokFeeKind": {
            "$ref": "#/components/schemas/ByokFeeKind"
          },
          "byokFeeValue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "isActive": {
            "type": "boolean"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isFallback": {
            "type": "boolean"
          },
          "isFirstPartyResale": {
            "type": "boolean"
          }
        }
      },
      "ModelLicenseClass": {
        "type": "integer"
      },
      "ModelResaleClass": {
        "type": "integer"
      },
      "ModelUsageDto": {
        "required": [
          "modelId",
          "tokens",
          "requests",
          "percentOfTotal"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "percentOfTotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ModifyApprovalRequest": {
        "required": [
          "editedMutationsJson",
          "changeRequestNote"
        ],
        "type": "object",
        "properties": {
          "editedMutationsJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "changeRequestNote": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MoveRagProjectionRequest": {
        "required": [
          "vectorStoreConfigId"
        ],
        "type": "object",
        "properties": {
          "vectorStoreConfigId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "MoveRagProjectionResponse": {
        "required": [
          "jobId",
          "message"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "NativeAuthorizationCodeRequest": {
        "required": [
          "clientId",
          "redirectUri",
          "codeChallenge",
          "codeChallengeMethod"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "redirectUri": {
            "type": "string"
          },
          "codeChallenge": {
            "type": "string"
          },
          "codeChallengeMethod": {
            "type": "string"
          },
          "consentGranted": {
            "type": "boolean"
          }
        }
      },
      "NativeAuthorizationCodeResponse": {
        "type": "object",
        "properties": {
          "succeeded": {
            "type": "boolean"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "errorDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "redirectUntrusted": {
            "type": "boolean"
          },
          "consentRequired": {
            "type": "boolean"
          },
          "clientName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "NativeConnectedAppDto": {
        "required": [
          "clientId"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "clientName": {
            "type": [
              "null",
              "string"
            ]
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "NavigationItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "icon": {
            "type": [
              "null",
              "string"
            ]
          },
          "route": {
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "type": [
              "null",
              "string"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "parentId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "processId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "minimumRaciLevel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RaciLevel"
              }
            ]
          },
          "badgeCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "disabled": {
            "type": "boolean"
          },
          "beta": {
            "type": "boolean"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NavigationItemDto"
            }
          }
        }
      },
      "NavigationItemResponse": {
        "required": [
          "tenantId",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "parentId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "icon": {
            "type": [
              "null",
              "string"
            ]
          },
          "route": {
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "type": [
              "null",
              "string"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isVisible": {
            "type": "boolean"
          },
          "processId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "minimumRaciLevel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RaciLevel"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "NginxSiteCreateRequest": {
        "required": [
          "name",
          "serverName",
          "upstreamUrl"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "serverName": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "upstreamUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "format": "uri"
          },
          "sslEnabled": {
            "type": "boolean"
          }
        }
      },
      "NginxSiteUpdateRequest": {
        "required": [
          "configContent"
        ],
        "type": "object",
        "properties": {
          "configContent": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "NotificationChannel": {
        "type": "integer"
      },
      "NotificationChannelPreferenceDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "push": {
            "type": "boolean"
          },
          "badge": {
            "type": "boolean"
          },
          "sound": {
            "type": "boolean"
          },
          "showPreview": {
            "type": "boolean"
          },
          "importance": {
            "$ref": "#/components/schemas/ChannelImportance"
          }
        }
      },
      "NotificationDto": {
        "required": [
          "id",
          "title",
          "category",
          "isRead",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": "string"
          },
          "linkUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "isRead": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "raciLevel": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "NotificationListDto": {
        "required": [
          "items",
          "unreadCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationDto"
            }
          },
          "unreadCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "OAuthCallbackQuery": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "issuer": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenant": {
            "type": [
              "null",
              "string"
            ]
          },
          "adminConsent": {
            "type": [
              "null",
              "string"
            ]
          },
          "scope": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OAuthCompleteRequest": {
        "required": [
          "query",
          "browserNonce"
        ],
        "type": "object",
        "properties": {
          "query": {
            "$ref": "#/components/schemas/OAuthCallbackQuery"
          },
          "browserNonce": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OAuthCompleteResult": {
        "required": [
          "provider",
          "result"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": [
              "null",
              "string"
            ]
          },
          "result": {
            "type": "string"
          },
          "setupOrigin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpSetupOrigin"
              }
            ]
          },
          "connectionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "OAuthStartRequest": {
        "required": [
          "bindingHash"
        ],
        "type": "object",
        "properties": {
          "bindingHash": {
            "type": "string"
          },
          "surfaces": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "connectionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "connectionVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "setupOrigin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/McpSetupOrigin"
              }
            ]
          }
        }
      },
      "OAuthStartResult": {
        "required": [
          "provider",
          "result"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "authorizationUrl": {
            "type": [
              "null",
              "string"
            ],
            "format": "uri"
          }
        }
      },
      "OidcDiscoveryRequest": {
        "required": [
          "authority"
        ],
        "type": "object",
        "properties": {
          "authority": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "format": "uri"
          }
        }
      },
      "OidcDiscoveryResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "issuer": {
            "type": [
              "null",
              "string"
            ]
          },
          "authorizationEndpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "tokenEndpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "userinfoEndpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "endSessionEndpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "jwksUri": {
            "type": [
              "null",
              "string"
            ]
          },
          "scopesSupported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "claimsSupported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "responseTypesSupported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OneTimeSecretRevealDto": {
        "required": [
          "purpose",
          "secret"
        ],
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "OpenErasureDto": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "attempts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "problem": {
            "type": [
              "null",
              "string"
            ]
          },
          "inOwnDatabase": {
            "type": "boolean"
          },
          "overdue": {
            "type": "boolean"
          }
        }
      },
      "OrchestrationRoleOptionDto": {
        "required": [
          "id",
          "roleId",
          "label",
          "department"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "roleId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "department": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OrchestrationTaskDto": {
        "required": [
          "tenantId",
          "taskType",
          "title",
          "status",
          "priority",
          "assignedRole"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "taskType": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "assignedRole": {
            "type": "string"
          },
          "claimedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "nextTaskType": {
            "type": [
              "null",
              "string"
            ]
          },
          "nextTaskRole": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentTaskId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "triggerId": {
            "type": [
              "null",
              "string"
            ]
          },
          "processArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "processInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slaDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "slaStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "metadataJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "resultJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "claimedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "escalatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "dueDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PaExecuteAgentRequest": {
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "conversationId": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Request body for the Execute Agent action endpoint."
      },
      "PaExecuteAgentResponse": {
        "required": [
          "response",
          "tokensUsed"
        ],
        "type": "object",
        "properties": {
          "response": {
            "type": "string"
          },
          "tokensUsed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "Response body for a successful agent execution."
      },
      "PaQueryRagRequest": {
        "required": [
          "query"
        ],
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "topK": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 5
          }
        },
        "description": "Request body for the Query RAG Collection action endpoint."
      },
      "PaQueryRagResponse": {
        "required": [
          "results"
        ],
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaRagResult"
            }
          }
        },
        "description": "Response body for the Query RAG Collection action endpoint."
      },
      "PaRagResult": {
        "required": [
          "content",
          "score"
        ],
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "score": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "float"
          }
        },
        "description": "A single result item from a RAG collection query."
      },
      "PartnerPricingDto": {
        "required": [
          "tier"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "partnerId": {
            "type": "string",
            "format": "uuid"
          },
          "tier": {
            "type": "string"
          },
          "seatPriceMonthly": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "seatPriceAnnual": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "implementationFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "processScanFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "includedProcessCreditsHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currency": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PartnerPricingUpsertRequest": {
        "required": [
          "tier",
          "currency"
        ],
        "type": "object",
        "properties": {
          "tier": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "seatPriceMonthly": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "seatPriceAnnual": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "implementationFee": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "processScanFee": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "includedProcessCreditsHours": {
            "maximum": 100000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          }
        }
      },
      "PartnerRevenueDto": {
        "type": "object",
        "properties": {
          "partnerId": {
            "type": "string",
            "format": "uuid"
          },
          "month": {
            "type": "string",
            "format": "date"
          },
          "monthlyRecurringRevenue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "activeSubscriptionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "perTier": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TierRevenueBreakdownDto"
            }
          },
          "upcomingDiscountExpiries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscountExpiryEntryDto"
            }
          },
          "upsellCandidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpsellCandidateDto"
            }
          },
          "churnRisks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChurnRiskEntryDto"
            }
          },
          "processCreditsIncludedHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "processCreditsUsedHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "PendingApprovalStatus": {
        "type": "integer"
      },
      "PendingInviteDto": {
        "type": "object",
        "properties": {
          "inviteId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "scopeDescription": {
            "type": "string"
          },
          "invitedBy": {
            "type": "string",
            "format": "uuid"
          },
          "invitedByName": {
            "type": "string"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "resendCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PendingLearningStatus": {
        "type": "integer"
      },
      "PendingMembershipDto": {
        "required": [
          "tenantId",
          "tenantName",
          "requestedAt"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PeriodComparisonDto": {
        "required": [
          "thisPeriodTokens",
          "previousPeriodTokens",
          "changePercent"
        ],
        "type": "object",
        "properties": {
          "thisPeriodTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "previousPeriodTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "changePercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "PersonalConversationDto": {
        "required": [
          "medium",
          "source",
          "sourceId",
          "title",
          "lastActivityAt"
        ],
        "type": "object",
        "properties": {
          "medium": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastIntent": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PersonalConversationListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonalConversationDto"
            }
          },
          "textSearchBounded": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "PersonalVoiceDetailDto": {
        "required": [
          "callId",
          "summary",
          "outcome",
          "startedAt",
          "completedAt",
          "durationSeconds",
          "transcriptJson",
          "batchTranscriptJson"
        ],
        "type": "object",
        "properties": {
          "callId": {
            "type": "string"
          },
          "summary": {
            "type": [
              "null",
              "string"
            ]
          },
          "outcome": {
            "type": [
              "null",
              "string"
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "transcriptJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "batchTranscriptJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PiiClassification": {
        "type": "integer"
      },
      "PiiSuggestionRequest": {
        "required": [
          "sampleRow"
        ],
        "type": "object",
        "properties": {
          "sampleRow": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "PlatformPricingConfigDto": {
        "required": [
          "tier"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tier": {
            "type": "string"
          },
          "minimumSeatPriceMonthly": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "minimumSeatPriceAnnual": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": "string"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PluginCapabilitiesDto": {
        "type": "object",
        "properties": {
          "handlesEvents": {
            "type": "boolean"
          },
          "hasBackgroundTasks": {
            "type": "boolean"
          },
          "providesWidgets": {
            "type": "boolean"
          },
          "providesDataSources": {
            "type": "boolean"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supportsWriteBack": {
            "type": "boolean"
          },
          "writeBackActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PluginDetailDto": {
        "required": [
          "pluginId",
          "name",
          "description",
          "version",
          "author"
        ],
        "type": "object",
        "properties": {
          "manifestJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "pluginId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "capabilities": {
            "$ref": "#/components/schemas/PluginCapabilitiesDto"
          }
        }
      },
      "PluginEventDto": {
        "required": [
          "pluginId",
          "eventType",
          "tenantId",
          "summary"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pluginId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "metadataJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "urgency": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PluginHealthDto": {
        "required": [
          "pluginId",
          "name"
        ],
        "type": "object",
        "properties": {
          "pluginId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "consecutiveFailures": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastSuccessAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastFailureAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastError": {
            "type": [
              "null",
              "string"
            ]
          },
          "totalEventsProduced": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PluginSummaryDto": {
        "required": [
          "pluginId",
          "name",
          "description",
          "version",
          "author"
        ],
        "type": "object",
        "properties": {
          "pluginId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "capabilities": {
            "$ref": "#/components/schemas/PluginCapabilitiesDto"
          }
        }
      },
      "PluginTestResultDto": {
        "required": [
          "success",
          "message"
        ],
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "notSupported": {
            "type": "boolean"
          }
        }
      },
      "PolicyValidationResultDto": {
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "denialReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "blockingPolicy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GovernancePolicyDto"
              }
            ]
          }
        }
      },
      "PollApiRequest": {
        "required": [
          "deviceCode"
        ],
        "type": "object",
        "properties": {
          "deviceCode": {
            "type": "string"
          }
        }
      },
      "PresenceOfGuid": { },
      "PreviewBundleRequest": {
        "type": "object",
        "properties": {
          "bundleJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "id": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PreviewFeatureChangeRequestDto": {
        "required": [
          "layer",
          "featureKey"
        ],
        "type": "object",
        "properties": {
          "layer": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "featureKey": {
            "type": "string"
          },
          "enabled": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "PreviewFeatureChangeResultDto": {
        "required": [
          "outcome",
          "featureKey"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          },
          "featureKey": {
            "type": "string"
          },
          "before": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "after": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "PreviewFeatureOverviewDto": {
        "required": [
          "tenantId",
          "features"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreviewFeatureStateDto"
            }
          }
        }
      },
      "PreviewFeatureStateDto": {
        "required": [
          "featureKey",
          "enabled",
          "source"
        ],
        "type": "object",
        "properties": {
          "featureKey": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          },
          "tenant": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "serviceProvider": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "platform": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "hostBaseline": {
            "type": "boolean"
          }
        }
      },
      "PreviewPlanRequest": {
        "type": "object",
        "properties": {
          "planJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PreviewRagProjectionRequest": {
        "type": "object",
        "properties": {
          "textFields": {
            "type": "string"
          },
          "maskFields": {
            "type": "string"
          },
          "htmlFields": {
            "type": "string"
          },
          "labelField": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PreviewVoiceRequest": {
        "required": [
          "text",
          "gender",
          "age",
          "pitch",
          "accent",
          "whisper",
          "seed"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "gender": {
            "type": [
              "null",
              "string"
            ]
          },
          "age": {
            "type": [
              "null",
              "string"
            ]
          },
          "pitch": {
            "type": [
              "null",
              "string"
            ]
          },
          "accent": {
            "type": [
              "null",
              "string"
            ]
          },
          "whisper": {
            "type": "boolean"
          },
          "seed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ProbeApiRequest": {
        "required": [
          "userCode"
        ],
        "type": "object",
        "properties": {
          "userCode": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessDefinitionDetailDto": {
        "required": [
          "definition"
        ],
        "type": "object",
        "properties": {
          "definition": {
            "$ref": "#/components/schemas/ProcessDefinitionDto"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessStepDto"
            }
          },
          "outgoingLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessLinkDto"
            }
          }
        }
      },
      "ProcessDefinitionDto": {
        "required": [
          "label",
          "domain"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionLong": {
            "type": [
              "null",
              "string"
            ]
          },
          "processType": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerSource": {
            "type": [
              "null",
              "string"
            ]
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ownerLevel": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "tenantName": {
            "type": [
              "null",
              "string"
            ]
          },
          "stepCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ProcessFlowSimulationDto": {
        "type": "object",
        "properties": {
          "path": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimulatedStepDto"
            }
          },
          "loopsBackTo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessInstanceDto": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "entityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "entityId": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentStepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentStepTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "startedByUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "metadataJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessJourneyDto": {
        "required": [
          "processInstanceId"
        ],
        "type": "object",
        "properties": {
          "processInstanceId": {
            "type": "string",
            "format": "uuid"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessStepJourneyDto"
            }
          }
        }
      },
      "ProcessJourneyRoutineDto": {
        "required": [
          "jobId",
          "found",
          "pinnedVersionId"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "found": {
            "type": "boolean"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "skillName": {
            "type": [
              "null",
              "string"
            ]
          },
          "pinnedVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "pinnedVersionNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pinMatches": {
            "type": "boolean"
          }
        }
      },
      "ProcessJourneyRunDto": {
        "required": [
          "runId",
          "jobId",
          "status",
          "startedAt"
        ],
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/JobRunStatus"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "sent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "held": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skipped": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ProcessJourneyTaskState": {
        "type": "integer"
      },
      "ProcessLinkDto": {
        "required": [
          "linkType"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sourceProcessArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "targetProcessArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "linkType": {
            "type": "string"
          }
        }
      },
      "ProcessRoleAssignmentDto": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "organizationalRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "level": {
            "type": "string"
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          },
          "assignedBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ProcessScanFieldStatus": {
        "type": "integer"
      },
      "ProcessScanFieldStatusDto": {
        "required": [
          "fieldId",
          "status"
        ],
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProcessScanFieldStatus"
          }
        }
      },
      "ProcessStepAgentDto": {
        "required": [
          "stepKey",
          "processArtifactId",
          "title",
          "agentTemplateId",
          "agentTemplateName"
        ],
        "type": "object",
        "properties": {
          "stepKey": {
            "type": "string"
          },
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "agentTemplateId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "agentTemplateName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessStepContent": {
        "required": [
          "stepKey",
          "title"
        ],
        "type": "object",
        "properties": {
          "stepKey": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "slaTargetHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "responsibleRoleId": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerPluginId": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerEventType": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataSourcePluginId": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataSourceConfig": {
            "type": [
              "null",
              "string"
            ]
          },
          "agentTemplateId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "automationType": {
            "type": [
              "null",
              "string"
            ]
          },
          "agentTimeoutSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "agentTokenBudget": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "routine": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StepRoutineRef"
              }
            ]
          },
          "method": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StepMethod"
              }
            ]
          },
          "transitions": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/StepTransition"
            }
          }
        }
      },
      "ProcessStepDto": {
        "required": [
          "stepKey",
          "title"
        ],
        "type": "object",
        "properties": {
          "stepKey": {
            "type": "string"
          },
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "responsibleRoleId": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerPluginId": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerEventType": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataSourcePluginId": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataSourceConfig": {
            "type": [
              "null",
              "string"
            ]
          },
          "slaTargetHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "automationType": {
            "type": [
              "null",
              "string"
            ]
          },
          "agentTimeoutSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "agentTokenBudget": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "transitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StepTransitionDto"
            }
          },
          "routine": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProcessStepRoutineDto"
              }
            ]
          },
          "method": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessStepJourneyDto": {
        "required": [
          "stepKey",
          "routine"
        ],
        "type": "object",
        "properties": {
          "stepKey": {
            "type": "string"
          },
          "method": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StepMethod"
              }
            ]
          },
          "routine": {
            "$ref": "#/components/schemas/ProcessJourneyRoutineDto"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessJourneyRunDto"
            }
          },
          "openApprovalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "taskState": {
            "$ref": "#/components/schemas/ProcessJourneyTaskState"
          },
          "taskReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessStepOutcome": {
        "type": "integer"
      },
      "ProcessStepRoutineDto": {
        "required": [
          "jobId",
          "pinnedVersionId"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "pinnedVersionId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ProcessStepTransitionDto": {
        "required": [
          "stepKey"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "instanceId": {
            "type": "string",
            "format": "uuid"
          },
          "stepKey": {
            "type": "string"
          },
          "stepTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "outcome": {
            "$ref": "#/components/schemas/ProcessStepOutcome"
          },
          "actorUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "actorDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "stepRoleKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessTemplateDetailDto": {
        "required": [
          "sectorTag",
          "name",
          "preview"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sectorTag": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "preview": {
            "$ref": "#/components/schemas/ProcessTemplatePreviewDto"
          }
        }
      },
      "ProcessTemplateLinkDto": {
        "required": [
          "targetProcessTemplate",
          "linkType"
        ],
        "type": "object",
        "properties": {
          "targetProcessTemplate": {
            "type": "string"
          },
          "linkType": {
            "type": "string"
          }
        }
      },
      "ProcessTemplatePreviewDto": {
        "required": [
          "label",
          "domain",
          "steps",
          "raci",
          "links",
          "warnings"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "processType": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerSource": {
            "type": [
              "null",
              "string"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessTemplateStepDto"
            }
          },
          "raci": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessTemplateRaciDto"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessTemplateLinkDto"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProcessTemplateRaciDto": {
        "required": [
          "stepId",
          "roleName",
          "level"
        ],
        "type": "object",
        "properties": {
          "stepId": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "level": {
            "type": "string"
          }
        }
      },
      "ProcessTemplateStepDto": {
        "required": [
          "stepId",
          "title"
        ],
        "type": "object",
        "properties": {
          "stepId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "triggerPluginId": {
            "type": [
              "null",
              "string"
            ]
          },
          "dataSourcePluginId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProcessTemplateSummaryDto": {
        "required": [
          "sectorTag",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sectorTag": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "stepCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "raciCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ProcessTriggerDto": {
        "required": [
          "triggerType",
          "actionType"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerType": {
            "type": "string"
          },
          "conditionJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "actionType": {
            "type": "string"
          },
          "actionConfigJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "sourcePluginId": {
            "type": [
              "null",
              "string"
            ]
          },
          "sourceEventType": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "ProfileSourceDto": {
        "required": [
          "key",
          "label",
          "connectorKey",
          "status"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "lastConnectedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ProfileSourcesDto": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProfileSourceDto"
            }
          }
        }
      },
      "PromptOverlayDto": {
        "required": [
          "id",
          "ownerLevel",
          "ownerId",
          "key",
          "text",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProposalAcceptRequest": {
        "required": [
          "tier"
        ],
        "type": "object",
        "properties": {
          "tier": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "seats": {
            "maximum": 100000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "seatPrice": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "billingPeriod": {
            "$ref": "#/components/schemas/SubscriptionBillingPeriod"
          },
          "discountPercentage": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "discountType": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "discountExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "contractReference": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "idempotencyKey": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ProposalAcceptResult": {
        "required": [
          "subscriptionId",
          "lifecycleStage",
          "acceptedAt"
        ],
        "type": "object",
        "properties": {
          "subscriptionId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lifecycleStage": {
            "type": "string"
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProposalDto": {
        "required": [
          "tenantId",
          "tenantName",
          "generatedAt",
          "executiveSummary",
          "holyShitImpact",
          "pricing",
          "timeline"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "executiveSummary": {
            "$ref": "#/components/schemas/ProposalExecutiveSummary"
          },
          "holyShitImpact": {
            "$ref": "#/components/schemas/ProposalHolyShitImpact"
          },
          "pricing": {
            "$ref": "#/components/schemas/ProposalPricing"
          },
          "timeline": {
            "$ref": "#/components/schemas/ProposalTimeline"
          }
        }
      },
      "ProposalExecutiveSummary": {
        "required": [
          "companyName",
          "industry",
          "size",
          "painPoints",
          "narrativeParagraph"
        ],
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string"
          },
          "industry": {
            "type": [
              "null",
              "string"
            ]
          },
          "size": {
            "type": [
              "null",
              "string"
            ]
          },
          "painPoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "narrativeParagraph": {
            "type": "string"
          }
        }
      },
      "ProposalHolyShitImpact": {
        "required": [
          "hiddenCostPerYearEur",
          "estimatedAnnualSavingsEur",
          "subscriptionYearlyCostEur",
          "roiRatio",
          "paybackMonths",
          "breakdown"
        ],
        "type": "object",
        "properties": {
          "hiddenCostPerYearEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "estimatedAnnualSavingsEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "subscriptionYearlyCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "roiRatio": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "paybackMonths": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalImpactLine"
            }
          }
        }
      },
      "ProposalImpactLine": {
        "required": [
          "label",
          "yearlyEurCost"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "yearlyEurCost": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ProposalPricing": {
        "required": [
          "recommendedTier",
          "seats",
          "seatPriceEur",
          "annualSeatPriceEur",
          "baseMonthlyPriceEur",
          "implementationFeeEur",
          "processScanFeeEur",
          "discountPercentage",
          "effectiveMonthlyPriceEur",
          "discountType",
          "discountExpiresAt",
          "currency"
        ],
        "type": "object",
        "properties": {
          "recommendedTier": {
            "type": "string"
          },
          "seats": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "seatPriceEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "annualSeatPriceEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "baseMonthlyPriceEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "implementationFeeEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "processScanFeeEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "discountPercentage": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveMonthlyPriceEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "discountType": {
            "type": [
              "null",
              "string"
            ]
          },
          "discountExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "ProposalSendFollowUpRequest": {
        "required": [
          "recipientEmail"
        ],
        "type": "object",
        "properties": {
          "recipientEmail": {
            "maxLength": 256,
            "minLength": 0,
            "type": "string"
          },
          "recipientName": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProposalTimeline": {
        "required": [
          "totalWeeks",
          "estimatedStartDate",
          "weeks"
        ],
        "type": "object",
        "properties": {
          "totalWeeks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "estimatedStartDate": {
            "type": "string",
            "format": "date-time"
          },
          "weeks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProposalTimelineWeek"
            }
          }
        }
      },
      "ProposalTimelineWeek": {
        "required": [
          "weekNumber",
          "title",
          "description"
        ],
        "type": "object",
        "properties": {
          "weekNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "ProposeProcessEditRequest": {
        "required": [
          "processArtifactId",
          "agentDomain",
          "responsibleRoleId",
          "step"
        ],
        "type": "object",
        "properties": {
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "agentDomain": {
            "type": "string"
          },
          "responsibleRoleId": {
            "type": [
              "null",
              "string"
            ]
          },
          "step": {
            "$ref": "#/components/schemas/ProcessStepContent"
          }
        },
        "description": "Propose a process-step edit during onboarding/leermodus (#1107)."
      },
      "ProviderChainEntryDto": {
        "required": [
          "id",
          "ownerLevel",
          "providerType",
          "modality",
          "hasKey",
          "priority",
          "isActive",
          "maxDataClassification",
          "allowPII",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerServiceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "providerType": {
            "$ref": "#/components/schemas/InstanceType"
          },
          "modality": {
            "$ref": "#/components/schemas/ProviderModality"
          },
          "apiEndpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "modelId": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasKey": {
            "type": "boolean"
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "effectiveDecisionEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "decisionPolicyInvalid": {
            "type": "boolean"
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "servedIntent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProviderIntent"
              }
            ]
          },
          "shadowedByEntryIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "dailyCostCapAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "dailyCostCapCurrency": {
            "type": [
              "null",
              "string"
            ]
          },
          "dailyRequestCap": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyTokenCap": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contextWindowBudgetTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxDataClassification": {
            "$ref": "#/components/schemas/DataClassificationLevel"
          },
          "allowPII": {
            "type": "boolean"
          },
          "pseudonymizeBeforeEgress": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "dataResidencyRegion": {
            "type": [
              "null",
              "string"
            ]
          },
          "providerSpecificConfigJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "engineCeilingTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProviderIntent": {
        "type": "integer"
      },
      "ProviderModality": {
        "type": "integer"
      },
      "ProviderReachabilityDto": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ProviderReachabilityStatus"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProviderReachabilityStatus": {
        "type": "integer"
      },
      "PublishArtifactRequest": {
        "required": [
          "basedOnVersionId"
        ],
        "type": "object",
        "properties": {
          "basedOnVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "PublishArtifactResponse": {
        "required": [
          "publishedVersionId"
        ],
        "type": "object",
        "properties": {
          "publishedVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PublishSkillRequest": {
        "type": "object",
        "properties": {
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reviewerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "testRecipients": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "reportToTeams": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "teamsRecipientUpn": {
            "type": [
              "null",
              "string"
            ]
          },
          "dashboardArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "declineTile": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "PushConfigApiRequest": {
        "required": [
          "configJson"
        ],
        "type": "object",
        "properties": {
          "configJson": {
            "maxLength": 65536,
            "minLength": 2,
            "type": "string",
            "description": "JSON string of key/value settings to apply (e.g. `{\"key\": \"value\"}`)."
          }
        },
        "description": "Request body for Task&lt;IActionResult&gt; ForgesController.PushConfig(Guid id, PushConfigApiRequest req, CancellationToken ct)."
      },
      "PushInstallationRequest": {
        "required": [
          "deviceProof",
          "pushChannel"
        ],
        "type": "object",
        "properties": {
          "deviceProof": {
            "maxLength": 128,
            "minLength": 43,
            "type": "string"
          },
          "deviceGeneration": {
            "maximum": 9223372036854776000,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "platform": {
            "$ref": "#/components/schemas/PushPlatform"
          },
          "pushChannel": {
            "maxLength": 4096,
            "minLength": 1,
            "type": "string"
          }
        }
      },
      "PushPlatform": {
        "type": "integer"
      },
      "PushRegistrationStatusDto": {
        "required": [
          "available"
        ],
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "QueryRagRequest": {
        "required": [
          "collectionId",
          "query"
        ],
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "limit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 10
          }
        },
        "description": "Request body for querying a RAG collection via a registered SparkForge instance.\nPhase 5: Power Automate action endpoint."
      },
      "QuietHoursDaysScope": {
        "type": "integer"
      },
      "QuietHoursPreferenceDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "start": {
            "type": [
              "null",
              "string"
            ]
          },
          "end": {
            "type": [
              "null",
              "string"
            ]
          },
          "days": {
            "$ref": "#/components/schemas/QuietHoursDaysScope"
          },
          "urgentBreaksThrough": {
            "type": "boolean"
          },
          "allowApprovals": {
            "type": "boolean"
          }
        }
      },
      "QuotaSuggestion": {
        "required": [
          "tier",
          "label",
          "description"
        ],
        "type": "object",
        "properties": {
          "tier": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "suggestedDailyTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "suggestedDailyRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isRecommended": {
            "type": "boolean"
          },
          "recommendationReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RaciLevel": {
        "type": "integer"
      },
      "RagEmbeddingConfigDto": {
        "required": [
          "id",
          "ownerLevel",
          "name",
          "isDefault",
          "providerKey",
          "model",
          "hasKey",
          "dimensions",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "providerKey": {
            "type": "string"
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": "string"
          },
          "apiVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasKey": {
            "type": "boolean"
          },
          "forgeInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dimensions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "providerSpecificConfigJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RagEmbeddingProbeResult": {
        "required": [
          "dimensions",
          "model",
          "providerKey"
        ],
        "type": "object",
        "properties": {
          "dimensions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "model": {
            "type": "string"
          },
          "providerKey": {
            "type": "string"
          }
        }
      },
      "RagProjectionActiveMoveDto": {
        "required": [
          "jobId",
          "fromStore",
          "toStore",
          "phase"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "fromStore": {
            "type": "string"
          },
          "toStore": {
            "type": "string"
          },
          "phase": {
            "type": "string"
          },
          "rounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxRounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextRoundAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "movedAt": {
            "type": "string",
            "format": "date-time"
          },
          "giveUpAt": {
            "type": "string",
            "format": "date-time"
          },
          "cancellable": {
            "type": "boolean"
          },
          "lastAttemptFailed": {
            "type": "boolean"
          }
        }
      },
      "RagProjectionConfigDto": {
        "required": [
          "dataSourceId",
          "entityType",
          "enabled",
          "textFields",
          "scope",
          "storeProvider"
        ],
        "type": "object",
        "properties": {
          "dataSourceId": {
            "type": "string",
            "format": "uuid"
          },
          "entityType": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "textFields": {
            "type": "string"
          },
          "maskFields": {
            "type": "string"
          },
          "labelField": {
            "type": [
              "null",
              "string"
            ]
          },
          "scope": {
            "type": "string"
          },
          "cutoffMonths": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "syncIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "storeProvider": {
            "type": "string"
          },
          "parentIdField": {
            "type": [
              "null",
              "string"
            ]
          },
          "childGranularity": {
            "type": "string"
          },
          "chunkLongText": {
            "type": "boolean"
          },
          "chunkMaxSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "chunkOverlap": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hybridSearch": {
            "type": "boolean"
          },
          "persistText": {
            "type": "boolean"
          },
          "readSource": {
            "type": "string"
          },
          "htmlFields": {
            "type": "string"
          },
          "filterFields": {
            "type": "string"
          },
          "retentionDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "consentedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "consentedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSyncedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSyncStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastSyncRowCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastSyncError": {
            "type": [
              "null",
              "string"
            ]
          },
          "moveInProgress": {
            "type": "boolean"
          }
        }
      },
      "RagProjectionFailedMoveDto": {
        "required": [
          "jobId",
          "toStore",
          "reasonCode"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "toStore": {
            "type": "string"
          },
          "movedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reasonCode": {
            "type": "string"
          }
        }
      },
      "RagProjectionMoveStatusDto": {
        "required": [
          "targets"
        ],
        "type": "object",
        "properties": {
          "currentStore": {
            "type": [
              "null",
              "string"
            ]
          },
          "currentStoreProblemCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagProjectionMoveTargetDto"
            }
          },
          "activeMove": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RagProjectionActiveMoveDto"
              }
            ]
          },
          "lastFailedMove": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RagProjectionFailedMoveDto"
              }
            ]
          }
        }
      },
      "RagProjectionMoveTargetDto": {
        "required": [
          "vectorStoreConfigId",
          "name",
          "ownerLevel"
        ],
        "type": "object",
        "properties": {
          "vectorStoreConfigId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "ownerLevel": {
            "type": "string"
          }
        }
      },
      "RagProjectionPreviewDto": {
        "required": [
          "text",
          "label"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "blocked": {
            "type": "boolean"
          },
          "blockedReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RagResult": {
        "required": [
          "content",
          "score"
        ],
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "score": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "metadata": {
            "type": [
              "null",
              "object"
            ]
          }
        },
        "description": "A single result item returned from a RAG collection query."
      },
      "RagSharedStoreCleanupApplyRequest": {
        "required": [
          "itemKeys"
        ],
        "type": "object",
        "properties": {
          "itemKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RagSharedStoreCleanupItemDto": {
        "required": [
          "key",
          "tenantId",
          "dataSourceId",
          "sharedStoreName",
          "collectionName"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "dataSourceId": {
            "type": "string",
            "format": "uuid"
          },
          "sharedStoreConfigId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "sharedStoreName": {
            "type": "string"
          },
          "collectionName": {
            "type": "string"
          }
        }
      },
      "RagSharedStoreCleanupPlanDto": {
        "required": [
          "items",
          "skipped"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagSharedStoreCleanupItemDto"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagSharedStoreCleanupSkipDto"
            }
          }
        }
      },
      "RagSharedStoreCleanupResultDto": {
        "required": [
          "removed",
          "noLongerStray",
          "failed"
        ],
        "type": "object",
        "properties": {
          "removed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagSharedStoreCleanupItemDto"
            }
          },
          "noLongerStray": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RagSharedStoreCleanupSkipDto": {
        "required": [
          "tenantId",
          "dataSourceId",
          "reason"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "dataSourceId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "RagVectorStoreConfigDto": {
        "required": [
          "id",
          "ownerLevel",
          "name",
          "isDefault",
          "providerKey",
          "hasKey",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "providerKey": {
            "type": "string"
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "collectionPrefix": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasKey": {
            "type": "boolean"
          },
          "privateNetworkApprovalOrigin": {
            "type": [
              "null",
              "string"
            ]
          },
          "privateNetworkApprovalRanges": {
            "type": [
              "null",
              "string"
            ]
          },
          "providerSpecificConfigJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RagVectorStoreProbeResult": {
        "required": [
          "reachable",
          "providerKey"
        ],
        "type": "object",
        "properties": {
          "reachable": {
            "type": "boolean"
          },
          "providerKey": {
            "type": "string"
          },
          "version": {
            "type": [
              "null",
              "string"
            ]
          },
          "wroteAndReadBack": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "RateAgreementDto": {
        "required": [
          "id",
          "provider",
          "model"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/RateKind"
          },
          "sellerLevel": {
            "$ref": "#/components/schemas/InstanceOwnerLevel"
          },
          "sellerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "unit": {
            "$ref": "#/components/schemas/RateUnit"
          },
          "direction": {
            "$ref": "#/components/schemas/RateDirection"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date-time"
          },
          "costPerUnitEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "costSource": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CostSource"
              }
            ]
          },
          "sourceNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reviewedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isWildcardModel": {
            "type": "boolean"
          }
        }
      },
      "RateCoverageGapDto": {
        "required": [
          "provider",
          "model"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RateCoverageStatus"
          }
        }
      },
      "RateCoverageStatus": {
        "type": "integer"
      },
      "RateDirection": {
        "type": "integer"
      },
      "RateKind": {
        "type": "integer"
      },
      "RateUnit": {
        "type": "integer"
      },
      "ReaderTimeZoneDto": {
        "required": [
          "timeZone"
        ],
        "type": "object",
        "properties": {
          "timeZone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReassignOrchestrationTaskRequest": {
        "type": "object",
        "properties": {
          "newUserId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RecipientAllowlistVerdict": {
        "type": "integer"
      },
      "RecordQuotaUsageRequest": {
        "type": "object",
        "properties": {
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The caller this usage belongs to. Optional, but WITHOUT it the usage can only ever charge the tenant tier:\nthe per-user and per-group daily caps are resolved from this id, so an integration that omits it leaves\nthose caps silently under-enforced for its traffic (the tenant cap keeps working).",
            "format": "uuid"
          },
          "tokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requests": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "durationMs": {
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "endpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "modelId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "promptTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "completionTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "providerType": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "instanceLabel": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Request body for recording quota usage."
      },
      "RedeemApiRequest": {
        "required": [
          "enrollmentToken",
          "hostname",
          "apiEndpoint"
        ],
        "type": "object",
        "properties": {
          "enrollmentToken": {
            "type": "string"
          },
          "hostname": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "version": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiEndpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string",
            "format": "uri"
          },
          "devicePublicKey": {
            "maxLength": 4096,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RegisterForgeApiRequest": {
        "required": [
          "hostname",
          "apiEndpoint"
        ],
        "type": "object",
        "properties": {
          "hostname": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "version": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiEndpoint": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string",
            "format": "uri"
          },
          "connectionMode": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string",
            "description": "Connection mode: \"Direct\" (default) or \"Tunnel\"."
          },
          "devicePublicKey": {
            "maxLength": 4096,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "description": "RSA public key in PEM format for tunnel device identity verification."
          }
        }
      },
      "RegisterWidgetDto": {
        "required": [
          "widgetType",
          "name",
          "description",
          "icon",
          "version",
          "isSystemWidget"
        ],
        "type": "object",
        "properties": {
          "widgetType": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "isSystemWidget": {
            "type": "boolean"
          }
        }
      },
      "RejectApiRequest": {
        "required": [
          "userCode"
        ],
        "type": "object",
        "properties": {
          "userCode": {
            "maxLength": 20,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "RejectProxyRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewedBy": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Request body for rejection via Cockpit."
      },
      "RejectRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "RenameArtifactRequest": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          }
        }
      },
      "RenameArtifactResponse": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          }
        }
      },
      "RenameMobileConversationRequest": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          }
        }
      },
      "RenderedAction": {
        "required": [
          "name",
          "label"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "disabledReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "refusal": {
            "$ref": "#/components/schemas/ActionRefusal"
          },
          "confirm": {
            "type": "boolean"
          },
          "inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RenderedInput"
            }
          }
        }
      },
      "RenderedChoice": {
        "required": [
          "value",
          "label"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "RenderedInput": {
        "required": [
          "name",
          "label"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TileInputKind"
          },
          "required": {
            "type": "boolean"
          },
          "choices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RenderedChoice"
            }
          }
        }
      },
      "RenderedTile": {
        "required": [
          "placementId",
          "title",
          "state"
        ],
        "type": "object",
        "properties": {
          "placementId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "width": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rowSpan": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "state": {
            "$ref": "#/components/schemas/TileState"
          },
          "html": {
            "type": "string"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RenderedAction"
            }
          },
          "hasOwnActions": {
            "type": "boolean"
          },
          "asOf": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "styles": {
            "type": "string"
          },
          "data": {
            "type": "object"
          },
          "script": {
            "type": "string"
          },
          "pendingAi": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "libraries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ReorderStepsRequest": {
        "required": [
          "stepKeys"
        ],
        "type": "object",
        "properties": {
          "stepKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ResolveFeedbackRequest": {
        "required": [
          "responseContent"
        ],
        "type": "object",
        "properties": {
          "responseContent": {
            "type": "string"
          }
        }
      },
      "RestoreVersionProxyRequest": {
        "required": [
          "targetVersionNumber"
        ],
        "type": "object",
        "properties": {
          "targetVersionNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "restoredBy": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Request body for version restore via Cockpit."
      },
      "RoutingStrategy": {
        "type": "integer"
      },
      "RunStepDiagnosisDto": {
        "required": [
          "conversationId",
          "jobId",
          "runId",
          "stepKey",
          "turns"
        ],
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "stepKey": {
            "type": "string"
          },
          "turns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunStepDiagnosisTurnDto"
            }
          }
        }
      },
      "RunStepDiagnosisFactDto": {
        "required": [
          "sourceId",
          "text"
        ],
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        }
      },
      "RunStepDiagnosisTurnDto": {
        "required": [
          "question",
          "observedFacts",
          "unknowns",
          "proposedNextActions",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "observedFacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunStepDiagnosisFactDto"
            }
          },
          "unknowns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "proposedNextActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SampleVoiceRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          }
        }
      },
      "SaveAgentConfigRequest": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "guardrails": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        }
      },
      "SaveAgreementLayerRequest": {
        "required": [
          "title",
          "body",
          "rules"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "rules": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AgreementLayerRuleDto"
            }
          }
        }
      },
      "SaveDomainAgentPresetRequest": {
        "required": [
          "label",
          "description",
          "instructions",
          "keywords",
          "maxSteps"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "instructions": {
            "type": [
              "null",
              "string"
            ]
          },
          "keywords": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxSteps": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "enabled": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "SaveDraftRequest": {
        "required": [
          "basedOnVersionId",
          "versionId"
        ],
        "type": "object",
        "properties": {
          "basedOnVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "versionId": {
            "type": "string",
            "format": "uuid"
          },
          "contentJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "bpmnXml": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SaveDraftResponse": {
        "required": [
          "versionId"
        ],
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "savedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SaveEntityTypeProfileRequest": {
        "required": [
          "canonicalSchemaJson"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "entityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayLabelSingular": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayLabelPlural": {
            "type": [
              "null",
              "string"
            ]
          },
          "icon": {
            "type": [
              "null",
              "string"
            ]
          },
          "canonicalSchemaJson": {
            "type": "string"
          },
          "forceTenantOverride": {
            "type": "boolean"
          }
        }
      },
      "SaveProcessDefinitionRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": [
              "null",
              "string"
            ]
          },
          "domain": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "descriptionLong": {
            "type": [
              "null",
              "string"
            ]
          },
          "processType": {
            "type": [
              "null",
              "string"
            ]
          },
          "triggerSource": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "SaveProcessLinkRequest": {
        "required": [
          "targetProcessArtifactId",
          "linkType"
        ],
        "type": "object",
        "properties": {
          "targetProcessArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "linkType": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          }
        }
      },
      "SaveProcessStepRequest": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "stepKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "responsibleRoleId": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "triggerPluginId": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "triggerEventType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "dataSourcePluginId": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "dataSourceConfig": {
            "type": [
              "null",
              "string"
            ]
          },
          "slaTargetHours": {
            "maximum": 168,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "automationType": {
            "maxLength": 20,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "agentTimeoutSeconds": {
            "maximum": 3600,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "agentTokenBudget": {
            "maximum": 1000000,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "routine": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProcessStepRoutineDto"
              }
            ]
          },
          "removeRoutine": {
            "type": "boolean"
          },
          "method": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SaveProcessTriggerRequest": {
        "required": [
          "triggerType",
          "actionType"
        ],
        "type": "object",
        "properties": {
          "triggerType": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "stepKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "conditionJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "actionType": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "actionConfigJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "sourcePluginId": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "sourceEventType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "SavePromptOverlayRequest": {
        "required": [
          "ownerLevel",
          "key",
          "text"
        ],
        "type": "object",
        "properties": {
          "ownerLevel": {
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "ScheduledJobDocStoreTargetDto": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "writtenAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ScheduledJobDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "cronExpression": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "jobType": {
            "type": "string"
          },
          "configJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "outputRoutingJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "maxRetries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "timeoutSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastRunAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "nextRunAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerProblem": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reviewerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "pinnedArtifactVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "pinnedVersionNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "allowedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "docStoreTarget": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScheduledJobDocStoreTargetDto"
              }
            ]
          },
          "routeIntent": {
            "type": [
              "null",
              "string"
            ]
          },
          "classification": {
            "type": [
              "null",
              "string"
            ]
          },
          "exceptionRule": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ScheduledJobRunAgreementsDto": {
        "type": "object",
        "properties": {
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "ownerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reviewerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "cronExpression": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "pinnedArtifactVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "pinnedVersionNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skillTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "allowedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "routeIntent": {
            "type": [
              "null",
              "string"
            ]
          },
          "classification": {
            "type": [
              "null",
              "string"
            ]
          },
          "exceptionRule": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ScheduledJobRunCustomerDto": {
        "type": "object",
        "properties": {
          "customerRef": {
            "type": "string"
          },
          "customerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJobRunInvoiceDto"
            }
          },
          "recipient": {
            "type": [
              "null",
              "string"
            ]
          },
          "preparedContentHash": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": "string"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "providerMessageId": {
            "type": [
              "null",
              "string"
            ]
          },
          "exceptionRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "decisionApprovalId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "openReviewId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "awaitsReview": {
            "type": "boolean"
          },
          "liveDataAvailable": {
            "type": "boolean"
          },
          "decision": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScheduledJobRunDecisionDto"
              }
            ]
          }
        }
      },
      "ScheduledJobRunDecisionDto": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          },
          "decidedByUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "decidedByName": {
            "type": [
              "null",
              "string"
            ]
          },
          "decidedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ScheduledJobRunDetailDto": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "jobName": {
            "type": "string"
          },
          "jobType": {
            "type": "string"
          },
          "triggerType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "durationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "attemptNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "slotKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "output": {
            "type": [
              "null",
              "string"
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasonArgumentsJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "agreements": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScheduledJobRunAgreementsDto"
              }
            ]
          },
          "routeTaken": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScheduledJobRunRouteTakenDto"
              }
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJobRunStepDto"
            }
          },
          "customers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJobRunCustomerDto"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/ScheduledJobRunTotalsDto"
          },
          "outputDelivery": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScheduledJobRunOutputDeliveryDto"
              }
            ]
          }
        }
      },
      "ScheduledJobRunDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "triggerType": {
            "type": "string"
          },
          "attemptNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "durationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "output": {
            "type": [
              "null",
              "string"
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasonCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasonArgumentsJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "outputDeliveryError": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ScheduledJobRunInvoiceDto": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "dueDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "liveDataAvailable": {
            "type": "boolean"
          }
        }
      },
      "ScheduledJobRunMailAttachmentDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "missing": {
            "type": "boolean"
          },
          "rendered": {
            "type": "boolean"
          },
          "renderedLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJobRunMailLineDto"
            }
          }
        }
      },
      "ScheduledJobRunMailDto": {
        "type": "object",
        "properties": {
          "customerRef": {
            "type": "string"
          },
          "verdict": {
            "type": "string"
          },
          "change": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "htmlBody": {
            "type": [
              "null",
              "string"
            ]
          },
          "recipient": {
            "type": [
              "null",
              "string"
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJobRunMailAttachmentDto"
            }
          },
          "storedContentHash": {
            "type": [
              "null",
              "string"
            ]
          },
          "rebuiltContentHash": {
            "type": [
              "null",
              "string"
            ]
          },
          "recordedSkillVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currentSkillVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ScheduledJobRunMailLineDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "ScheduledJobRunOutputDeliveryDto": {
        "type": "object",
        "properties": {
          "routedAt": {
            "type": "string",
            "format": "date-time"
          },
          "outcomes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJobRunOutputDeliveryOutcomeDto"
            }
          }
        }
      },
      "ScheduledJobRunOutputDeliveryOutcomeDto": {
        "type": "object",
        "properties": {
          "sinkType": {
            "type": "string"
          },
          "delivered": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ScheduledJobRunRouteServedDto": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "providerType": {
            "type": "string"
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "cloudEgress": {
            "type": "boolean"
          },
          "ownHardware": {
            "type": "boolean"
          },
          "calls": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ScheduledJobRunRouteTakenDto": {
        "type": "object",
        "properties": {
          "calls": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "anyCloudEgress": {
            "type": "boolean"
          },
          "allOnOwnHardware": {
            "type": "boolean"
          },
          "differsFromAgreement": {
            "type": "boolean"
          },
          "served": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduledJobRunRouteServedDto"
            }
          }
        }
      },
      "ScheduledJobRunStepDto": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outcome": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScheduledJobRunStepOutcomeDto"
              }
            ]
          }
        }
      },
      "ScheduledJobRunStepOutcomeDto": {
        "type": "object",
        "properties": {
          "sent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "held": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "releasing": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skipped": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ScheduledJobRunTotalsDto": {
        "type": "object",
        "properties": {
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "held": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "blocked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "skipped": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pending": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SeatFitDto": {
        "required": [
          "members",
          "paidSeats",
          "verdict"
        ],
        "type": "object",
        "properties": {
          "members": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "paidSeats": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "verdict": {
            "type": "string"
          }
        }
      },
      "SelectedPeriodDto": {
        "required": [
          "id",
          "monthLabel",
          "periodStart",
          "periodEnd",
          "totalTokens",
          "totalCostEur",
          "status",
          "costByModel",
          "forecastCostEur",
          "budgetEur",
          "withinBudget",
          "budgetWarningGroupLabel",
          "budgetWarningPercent"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "monthLabel": {
            "type": "string"
          },
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "periodEnd": {
            "type": "string",
            "format": "date"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "status": {
            "type": "string"
          },
          "costByModel": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelCostDto"
            }
          },
          "forecastCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "budgetEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "withinBudget": {
            "type": "boolean"
          },
          "budgetWarningGroupLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "budgetWarningPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "unpricedModels": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/UnpricedModelTokensDto"
            }
          }
        }
      },
      "SelectVoiceProfileRequest": {
        "required": [
          "profileId"
        ],
        "type": "object",
        "properties": {
          "profileId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "SendAnywayRequest": {
        "type": "object",
        "properties": {
          "expectedContentHash": {
            "type": "string"
          }
        }
      },
      "ServerCapabilitiesDto": {
        "required": [
          "serverType",
          "serverVersion",
          "serverName"
        ],
        "type": "object",
        "properties": {
          "serverType": {
            "type": "string"
          },
          "serverVersion": {
            "type": "string"
          },
          "serverName": {
            "type": "string"
          },
          "supportsDeviceCode": {
            "type": "boolean"
          },
          "supportsApiKey": {
            "type": "boolean"
          },
          "supportsOidc": {
            "type": "boolean"
          },
          "chatEnabled": {
            "type": "boolean"
          },
          "agentsEnabled": {
            "type": "boolean"
          },
          "ragEnabled": {
            "type": "boolean"
          },
          "modelSelectionEnabled": {
            "type": "boolean"
          },
          "conversationHistoryEnabled": {
            "type": "boolean"
          },
          "streamingEnabled": {
            "type": "boolean"
          },
          "forgeManagementEnabled": {
            "type": "boolean"
          },
          "agentTemplatesEnabled": {
            "type": "boolean"
          },
          "tenantInfoEnabled": {
            "type": "boolean"
          },
          "usageAnalyticsEnabled": {
            "type": "boolean"
          },
          "auditLogEnabled": {
            "type": "boolean"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availableModelCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "availableAgentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SetAiBudgetRequest": {
        "required": [
          "monthlyLimitEur"
        ],
        "type": "object",
        "properties": {
          "monthlyLimitEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "SetAppVisibilityRequest": {
        "type": "object",
        "properties": {
          "visible": {
            "type": "boolean"
          }
        }
      },
      "SetAzureAdTenantDto": {
        "required": [
          "azureAdTenantId"
        ],
        "type": "object",
        "properties": {
          "azureAdTenantId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetChatAdminModeRequest": {
        "required": [
          "enabled"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "SetChatMessageFeedbackRequest": {
        "required": [
          "positive"
        ],
        "type": "object",
        "properties": {
          "positive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "SetDataSourceAccessModeRequest": {
        "required": [
          "mode"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          }
        }
      },
      "SetDataSourcePrivateNetworkApprovalRequest": {
        "required": [
          "approved"
        ],
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean"
          },
          "addressRanges": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetDataSourceSecretRequest": {
        "type": "object",
        "properties": {
          "secretField": {
            "type": "string"
          },
          "plaintextSecret": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetInvoicePaymentStatusRequest": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/InvoicePaymentStatus"
          }
        }
      },
      "SetKnowledgeIndexRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "SetProviderChainEntryKeyRequest": {
        "required": [
          "plaintextKey"
        ],
        "type": "object",
        "properties": {
          "plaintextKey": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "SetRagEmbeddingConfigKeyRequest": {
        "required": [
          "plaintextKey"
        ],
        "type": "object",
        "properties": {
          "plaintextKey": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "SetRagVectorStoreConfigKeyRequest": {
        "required": [
          "plaintextKey"
        ],
        "type": "object",
        "properties": {
          "plaintextKey": {
            "maxLength": 1000,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "SetRagVectorStorePrivateNetworkApprovalRequest": {
        "required": [
          "approved"
        ],
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean"
          },
          "addressRanges": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetRequest": {
        "required": [
          "processArtifactId",
          "agentDomain",
          "enabled"
        ],
        "type": "object",
        "properties": {
          "processArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "agentDomain": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "maxRunsPerDay": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 50
          },
          "maxStepsPerRun": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SetScheduledJobDocStoreTargetDto": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "takeOver": {
            "type": "boolean"
          }
        }
      },
      "SetStepAgentTemplateRequest": {
        "type": "object",
        "properties": {
          "agentTemplateId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "SetStepTransitionsRequest": {
        "required": [
          "transitions"
        ],
        "type": "object",
        "properties": {
          "transitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StepTransitionDto"
            }
          }
        }
      },
      "SetTenantQuotaRequest": {
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean"
          },
          "dailyTokenLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyRequestLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyUserTokenLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyUserRequestLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyGroupTokenLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyGroupRequestLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyTokenLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyRequestLimit": {
            "maximum": 2147483647,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        },
        "description": "Request body to set a tenant's quota configuration (G4 #1668). Monthly caps are optional — leave them null\nfor no monthly cap (daily-only enforcement)."
      },
      "SetTenantStepUpPolicyRequest": {
        "type": "object",
        "properties": {
          "requiredIdentityProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "requiredIdpSessionLifetime": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SetThinkAlongPersonalRequest": {
        "required": [
          "optedOut",
          "calendarConsent"
        ],
        "type": "object",
        "properties": {
          "optedOut": {
            "type": "boolean"
          },
          "calendarConsent": {
            "type": "boolean"
          }
        }
      },
      "SetThinkAlongPolicyRequest": {
        "type": "object",
        "properties": {
          "targetUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "targetGroupId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean"
          },
          "calendar": {
            "type": "boolean"
          },
          "tickets": {
            "type": "boolean"
          },
          "localHour": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SetTodayDashboardRequest": {
        "required": [
          "artifactId"
        ],
        "type": "object",
        "properties": {
          "artifactId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SetUserActiveRequest": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          }
        }
      },
      "SetViewerSourceIdentityRequest": {
        "required": [
          "externalId"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "maxLength": 500,
            "type": "string"
          }
        }
      },
      "SetWriteBackPermissionsRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "allowedActions": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SimulatedStepDto": {
        "required": [
          "stepKey"
        ],
        "type": "object",
        "properties": {
          "stepKey": {
            "type": "string"
          },
          "via": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StepTransitionDto"
              }
            ]
          }
        }
      },
      "SimulateProcessFlowRequest": {
        "type": "object",
        "properties": {
          "runDataJson": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkholeDemoReadiness": {
        "required": [
          "verdict",
          "reason",
          "action",
          "scene",
          "tenants",
          "notMeasuredHere",
          "measuredAtUtc"
        ],
        "type": "object",
        "properties": {
          "verdict": {
            "$ref": "#/components/schemas/SkholeDemoReadinessVerdict"
          },
          "reason": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "scene": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SkholeDemoSceneCost"
              }
            ]
          },
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkholeDemoTenantHeadroom"
            }
          },
          "notMeasuredHere": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "measuredAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SkholeDemoReadinessVerdict": {
        "type": "integer"
      },
      "SkholeDemoResetOutcome": {
        "type": "integer"
      },
      "SkholeDemoResetReport": {
        "required": [
          "outcome",
          "reason",
          "tenants",
          "durationMs"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/SkholeDemoResetOutcome"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkholeDemoTenantReset"
            }
          },
          "durationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "SkholeDemoRestoredHub": {
        "required": [
          "artifactId",
          "entityType",
          "title",
          "removedVersions"
        ],
        "type": "object",
        "properties": {
          "artifactId": {
            "type": "string",
            "format": "uuid"
          },
          "entityType": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "removedVersions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SkholeDemoRestoredTask": {
        "required": [
          "taskId",
          "title",
          "created",
          "leftStanding"
        ],
        "type": "object",
        "properties": {
          "taskId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "created": {
            "type": "boolean"
          },
          "leftStanding": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "SkholeDemoRoutinePrepared": {
        "required": [
          "outcome"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/SkholeDemoRoutinePreparedOutcome"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "isRefusal": {
            "type": "boolean"
          }
        }
      },
      "SkholeDemoRoutinePreparedOutcome": {
        "type": "integer"
      },
      "SkholeDemoSceneCost": {
        "required": [
          "turns",
          "tokens",
          "slowestDurationMs",
          "startedAtUtc",
          "minutes",
          "rowsInWindow",
          "truncated"
        ],
        "type": "object",
        "properties": {
          "turns": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "slowestDurationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "startedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "minutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rowsInWindow": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "SkholeDemoStatus": {
        "required": [
          "enabled",
          "reason",
          "tenants"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkholeDemoTenant"
            }
          },
          "world": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoWorldTenantState"
            }
          }
        }
      },
      "SkholeDemoSwitchOutcome": {
        "type": "integer"
      },
      "SkholeDemoSwitchReport": {
        "required": [
          "outcome",
          "reason",
          "state"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/SkholeDemoSwitchOutcome"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "type": "string"
          },
          "worldNotMoved": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkholeDemoWorldNotMoved"
            }
          },
          "routine": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SkholeDemoRoutinePrepared"
              }
            ]
          }
        }
      },
      "SkholeDemoTenant": {
        "required": [
          "tenantId",
          "name"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkholeDemoTenantHeadroom": {
        "required": [
          "tenantId",
          "name",
          "enforced",
          "dailyTokenLimit",
          "dailyRequestLimit",
          "remainingTokens",
          "remainingRequests",
          "resetAtUtc",
          "scenesLeft",
          "problem"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "enforced": {
            "type": "boolean"
          },
          "dailyTokenLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyRequestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "remainingTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "remainingRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "resetAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "scenesLeft": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "problem": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkholeDemoTenantReset": {
        "required": [
          "tenantId",
          "removedRows",
          "removedRoutineTiles"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "removedRows": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "removedRoutineTiles": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "problem": {
            "type": [
              "null",
              "string"
            ]
          },
          "succeeded": {
            "type": "boolean"
          },
          "restoredRecordHubs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkholeDemoRestoredHub"
            }
          },
          "standardTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SkholeDemoRestoredTask"
              }
            ]
          }
        }
      },
      "SkholeDemoWorldNotMoved": {
        "required": [
          "tenantId",
          "outcome",
          "reason"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "outcome": {
            "$ref": "#/components/schemas/DemoWorldOutcome"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkillAttachmentPreview": {
        "required": [
          "sourceRef",
          "number",
          "fileName"
        ],
        "type": "object",
        "properties": {
          "sourceRef": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "overdue": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "amount": {
            "type": [
              "null",
              "string"
            ]
          },
          "dueDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "sha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "missing": {
            "type": "boolean"
          },
          "rendered": {
            "type": "boolean"
          },
          "renderedLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillDocumentLine"
            }
          }
        }
      },
      "SkillDataCategory": {
        "required": [
          "entityType",
          "label",
          "pii"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "pii": {
            "$ref": "#/components/schemas/PiiClassification"
          },
          "unknown": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "SkillDetailDto": {
        "required": [
          "summary"
        ],
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/SkillSummaryDto"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "selectionPlan": {
            "type": [
              "null",
              "string"
            ]
          },
          "mailTemplate": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasExceptionRule": {
            "type": "boolean"
          },
          "canEdit": {
            "type": "boolean"
          }
        }
      },
      "SkillDocumentLine": {
        "required": [
          "label",
          "value"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "SkillExceptionRuleResult": {
        "required": [
          "state",
          "entityType",
          "matchCount",
          "matchRefs",
          "atLeast",
          "problem"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/SkillExceptionRuleState"
          },
          "entityType": {
            "type": "string"
          },
          "matchCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "matchRefs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "atLeast": {
            "type": "boolean"
          },
          "problem": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkillExceptionRuleState": {
        "type": "integer"
      },
      "SkillGrantDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "artifactId": {
            "type": "string",
            "format": "uuid"
          },
          "subjectType": {
            "type": "string"
          },
          "subjectId": {
            "type": "string",
            "format": "uuid"
          },
          "effect": {
            "type": "string"
          },
          "access": {
            "type": "string"
          },
          "grantedBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SkillHistoryDto": {
        "required": [
          "jobId"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "lastRunAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastRunStatus": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JobRunStatus"
              }
            ]
          }
        }
      },
      "SkillMailPreview": {
        "required": [
          "customerRef",
          "customerId",
          "customerName",
          "status",
          "subject",
          "htmlBody",
          "attachments",
          "attachmentsComplete",
          "invoiceRefs",
          "contentHash"
        ],
        "type": "object",
        "properties": {
          "customerRef": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "resolvedCustomerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SkillMailStatus"
          },
          "statusReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "intendedRecipient": {
            "type": [
              "null",
              "string"
            ]
          },
          "actualRecipient": {
            "type": [
              "null",
              "string"
            ]
          },
          "recipientVerdict": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecipientAllowlistVerdict"
              }
            ]
          },
          "subject": {
            "type": "string"
          },
          "htmlBody": {
            "type": "string"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillAttachmentPreview"
            }
          },
          "attachmentsComplete": {
            "type": "boolean"
          },
          "invoiceRefs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "overdueInvoiceCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "exceptionRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "exceptionRule": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SkillExceptionRuleResult"
              }
            ]
          },
          "contentHash": {
            "type": "string"
          }
        }
      },
      "SkillMailStatus": {
        "type": "integer"
      },
      "SkillPreview": {
        "required": [
          "skillName",
          "skillVersion",
          "mails",
          "batchHash"
        ],
        "type": "object",
        "properties": {
          "skillName": {
            "type": "string"
          },
          "skillVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillMailPreview"
            }
          },
          "batchHash": {
            "type": "string"
          },
          "sender": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendRefusal": {
            "type": [
              "null",
              "string"
            ]
          },
          "asOf": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "readyCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "blockedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "heldCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SkillPreviewDto": {
        "type": "object",
        "properties": {
          "skillName": {
            "type": "string"
          },
          "skillVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "batchHash": {
            "type": "string"
          },
          "sender": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendRefusal": {
            "type": [
              "null",
              "string"
            ]
          },
          "asOf": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "readyCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "blockedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "heldCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillPreviewMailDto"
            }
          }
        }
      },
      "SkillPreviewMailDto": {
        "type": "object",
        "properties": {
          "customerRef": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "statusReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "actualRecipient": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": "string"
          },
          "attachmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "attachmentsComplete": {
            "type": "boolean"
          },
          "contentHash": {
            "type": "string"
          }
        }
      },
      "SkillProvenance": {
        "type": "integer"
      },
      "SkillPublishPlan": {
        "type": "object",
        "properties": {
          "canPublish": {
            "type": "boolean"
          },
          "problems": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillPublishQuestion"
            }
          },
          "skillName": {
            "type": [
              "null",
              "string"
            ]
          },
          "skillVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pinnedArtifactVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "jobId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "jobUpdatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "cronExpression": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reviewerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "allowedActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "routeIntent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProviderIntent"
              }
            ]
          },
          "routeReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "routeOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderIntent"
            }
          },
          "classification": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DataClassificationLevel"
              }
            ]
          },
          "classificationMeaning": {
            "type": [
              "null",
              "string"
            ]
          },
          "classificationOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataClassificationLevel"
            }
          },
          "dashboardArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tileDeclined": {
            "type": "boolean"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillDataCategory"
            }
          },
          "exceptionRule": {
            "type": [
              "null",
              "string"
            ]
          },
          "testRecipients": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reportToTeams": {
            "type": "boolean"
          },
          "teamsRecipientUpn": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkillPublishQuestion": {
        "required": [
          "key",
          "question"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "question": {
            "type": "string"
          }
        }
      },
      "SkillPublishResult": {
        "required": [
          "plan"
        ],
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "plan": {
            "$ref": "#/components/schemas/SkillPublishPlan"
          },
          "approval": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "jobId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "routineCreated": {
            "type": "boolean"
          },
          "wasTakenOffline": {
            "type": "boolean"
          },
          "moved": {
            "type": "boolean"
          }
        }
      },
      "SkillRoutineDto": {
        "required": [
          "jobId"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean"
          },
          "isLive": {
            "type": "boolean"
          },
          "missingAgreements": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pinnedVersionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "pinnedVersionNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "runsCurrentVersion": {
            "type": "boolean"
          },
          "cronExpression": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeZone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkillSendRequestResult": {
        "type": "object",
        "properties": {
          "approvalId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "preview": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SkillPreview"
              }
            ]
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "SkillSummaryDto": {
        "required": [
          "name",
          "artifactId",
          "provenance"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "artifactId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "provenance": {
            "$ref": "#/components/schemas/SkillProvenance"
          },
          "authorDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "routine": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SkillRoutineDto"
              }
            ]
          },
          "history": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SkillHistoryDto"
              }
            ]
          }
        }
      },
      "SkipOrchestrationTaskRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SkipRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "description": "Skip-this-round request body (#3458). The reason is what makes the decision answerable later."
      },
      "SnapshotConfigDto": {
        "required": [
          "dataSourceId",
          "entityType",
          "enabled",
          "scope",
          "effectiveScope",
          "effectiveScopeLabel",
          "storeProvider"
        ],
        "type": "object",
        "properties": {
          "dataSourceId": {
            "type": "string",
            "format": "uuid"
          },
          "entityType": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "scope": {
            "type": "string"
          },
          "cutoffMonths": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "effectiveScope": {
            "type": "string"
          },
          "effectiveScopeLabel": {
            "type": "string"
          },
          "cutoffField": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentEntityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "parentFkField": {
            "type": [
              "null",
              "string"
            ]
          },
          "syncIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "storeProvider": {
            "type": "string"
          },
          "maskFields": {
            "type": "string"
          },
          "maskPending": {
            "type": "boolean"
          },
          "unmaskedPiiFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastSyncedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSyncStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastSyncRowCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastSyncError": {
            "type": [
              "null",
              "string"
            ]
          },
          "deltaWatermark": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastFullSyncAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "fullReconcileIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "recommendedPreset": {
            "$ref": "#/components/schemas/CachePolicyPreset"
          }
        }
      },
      "SnapshotSyncTriggerResponse": {
        "required": [
          "accepted",
          "message"
        ],
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "SovereigntyPosture": {
        "type": "integer"
      },
      "SovereigntyStatusDto": {
        "type": "object",
        "properties": {
          "posture": {
            "$ref": "#/components/schemas/SovereigntyPosture"
          },
          "modelsSelfHosted": {
            "type": "boolean"
          },
          "dataStaysInOwnSystems": {
            "type": "boolean"
          },
          "healthy": {
            "type": "boolean"
          },
          "ownerLevel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/InstanceOwnerLevel"
              }
            ]
          },
          "environmentName": {
            "type": [
              "null",
              "string"
            ]
          },
          "hostname": {
            "type": [
              "null",
              "string"
            ]
          },
          "providerType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/InstanceType"
              }
            ]
          },
          "connectedSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectedSourceDto"
            }
          },
          "showDayModeSignal": {
            "type": "boolean"
          }
        }
      },
      "SslRenewRequest": {
        "required": [
          "provider"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "domain": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SslUploadRequest": {
        "required": [
          "certBase64",
          "keyBase64"
        ],
        "type": "object",
        "properties": {
          "certBase64": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string"
          },
          "keyBase64": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "StartVoiceSessionRequest": {
        "required": [
          "mode"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          }
        }
      },
      "StepCondition": {
        "required": [
          "field"
        ],
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StepConditionOperator"
              }
            ]
          },
          "value": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StepConditionDto": {
        "required": [
          "field",
          "operator"
        ],
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "value": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StepConditionOperator": { },
      "StepMethod": { },
      "StepRoutineRef": {
        "required": [
          "jobId",
          "pinnedVersionId"
        ],
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "pinnedVersionId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "StepTransition": {
        "required": [
          "targetStepKey"
        ],
        "type": "object",
        "properties": {
          "condition": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StepCondition"
              }
            ]
          },
          "targetStepKey": {
            "type": "string"
          }
        }
      },
      "StepTransitionDto": {
        "required": [
          "targetStepKey"
        ],
        "type": "object",
        "properties": {
          "condition": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StepConditionDto"
              }
            ]
          },
          "targetStepKey": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        }
      },
      "StringSegment": {
        "type": "object",
        "properties": {
          "buffer": {
            "type": [
              "null",
              "string"
            ]
          },
          "offset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "length": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "value": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasValue": {
            "type": "boolean"
          }
        }
      },
      "SubmitFeedbackRequest": {
        "required": [
          "category",
          "content"
        ],
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "processArtifactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stepKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "dashboardId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "wizardDefinitionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "contextRoute": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SubscribeWebhookRequest": {
        "required": [
          "eventType",
          "callbackUrl"
        ],
        "type": "object",
        "properties": {
          "eventType": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "Event type to subscribe to.\nSupported values: \"instance-offline\", \"quota-threshold\", \"dashboard-published\"."
          },
          "callbackUrl": {
            "maxLength": 2000,
            "minLength": 1,
            "type": "string",
            "description": "URL to POST the webhook payload to.",
            "format": "uri"
          }
        },
        "description": "Request body for subscribing to a webhook event."
      },
      "SubscribeWebhookResponse": {
        "type": "object",
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The new subscription identifier. Use this to unsubscribe.",
            "format": "uuid"
          }
        },
        "description": "Response body for a successful webhook subscription."
      },
      "SubscriptionBillingPeriod": {
        "type": "integer"
      },
      "SubscriptionLevelDto": {
        "required": [
          "tier",
          "name",
          "relation",
          "coreLine"
        ],
        "type": "object",
        "properties": {
          "tier": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "relation": {
            "type": "string"
          },
          "coreLine": {
            "type": "string"
          }
        }
      },
      "SwitchContextRequest": {
        "type": "object",
        "properties": {
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "SyncRagToInstancesRequest": {
        "required": [
          "instanceIds"
        ],
        "type": "object",
        "properties": {
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "SynthesizeVoiceRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "format": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TenantAccessModeRow": {
        "required": [
          "tenantId",
          "name",
          "mode",
          "isPartnerSelfTenant"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/DataSourceAccessMode"
          },
          "isPartnerSelfTenant": {
            "type": "boolean"
          }
        }
      },
      "TenantAgreementSwitchesDto": {
        "required": [
          "usePlatformLayer",
          "usePartnerLayer"
        ],
        "type": "object",
        "properties": {
          "usePlatformLayer": {
            "type": "boolean"
          },
          "usePartnerLayer": {
            "type": "boolean"
          },
          "hasPlatformLayer": {
            "type": "boolean",
            "default": false
          },
          "hasPartnerLayer": {
            "type": "boolean",
            "default": false
          },
          "partnerName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TenantApiKeyRevealDto": {
        "required": [
          "apiKey"
        ],
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string"
          }
        }
      },
      "TenantApiKeyStatusDto": {
        "required": [
          "maskedKey"
        ],
        "type": "object",
        "properties": {
          "maskedKey": {
            "type": "string"
          },
          "isRevoked": {
            "type": "boolean"
          },
          "needsRotation": {
            "type": "boolean"
          },
          "revokedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "rotatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TenantMemberApprovalDto": {
        "required": [
          "requiresApproval"
        ],
        "type": "object",
        "properties": {
          "requiresApproval": {
            "type": "boolean"
          }
        }
      },
      "TenantPluginDto": {
        "required": [
          "pluginId",
          "name"
        ],
        "type": "object",
        "properties": {
          "pluginId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "configJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "activatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "writeBackEnabled": {
            "type": "boolean"
          },
          "allowedActions": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TenantQuotaConfig": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "dailyTokenLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyRequestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyUserTokenLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyUserRequestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyGroupTokenLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyGroupRequestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyTokenLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyRequestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TenantQuotaStatusDto": {
        "type": "object",
        "properties": {
          "unlimited": {
            "type": "boolean"
          },
          "unlimitedReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "monthlyLimitConfigured": {
            "type": "boolean"
          },
          "monthlyTokenLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyTokensUsed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "monthlyTokensRemaining": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "monthlyRequestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyRequestsUsed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "estimatedCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "dailyEnforcementEnabled": {
            "type": "boolean"
          },
          "dailyTokenLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyRequestLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TenantSeatAssignRequest": {
        "type": "object",
        "properties": {
          "tier": {
            "maxLength": 50,
            "minLength": 1,
            "type": [
              "null",
              "string"
            ]
          },
          "approvedSurchargeEur": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "TenantSeatLevelDto": {
        "required": [
          "tier"
        ],
        "type": "object",
        "properties": {
          "tier": {
            "type": "string"
          },
          "bought": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "assigned": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TenantSeatMemberDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "seatTier": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TenantSeatOverviewDto": {
        "required": [
          "tenantTier"
        ],
        "type": "object",
        "properties": {
          "tenantTier": {
            "type": "string"
          },
          "billingPeriod": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionBillingPeriod"
              }
            ]
          },
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantSeatLevelDto"
            }
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantSeatMemberDto"
            }
          },
          "unlicensedMembers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TenantSubscriptionChangeDto": {
        "required": [
          "kind"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tierBefore": {
            "type": [
              "null",
              "string"
            ]
          },
          "tierAfter": {
            "type": [
              "null",
              "string"
            ]
          },
          "paidSeatsBefore": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "paidSeatsAfter": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "monthlyBefore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "monthlyAfter": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "surchargeEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "termEndsAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "partnerNotifiedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "TenantSubscriptionDto": {
        "required": [
          "tier"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tier": {
            "type": "string"
          },
          "billingPeriod": {
            "$ref": "#/components/schemas/SubscriptionBillingPeriod"
          },
          "seats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantSubscriptionSeatDto"
            }
          },
          "baseMonthlyPrice": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "discountType": {
            "type": [
              "null",
              "string"
            ]
          },
          "discountPercentage": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveMonthlyPrice": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "currentTermStart": {
            "type": "string",
            "format": "date-time"
          },
          "currentTermEnd": {
            "type": "string",
            "format": "date-time"
          },
          "discountExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          },
          "contractReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TenantSubscriptionSeatDto": {
        "required": [
          "tier"
        ],
        "type": "object",
        "properties": {
          "tier": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "seats": {
            "maximum": 100000,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "seatPrice": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "TenantSubscriptionUpsertRequest": {
        "required": [
          "seats",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "billingPeriod": {
            "$ref": "#/components/schemas/SubscriptionBillingPeriod"
          },
          "seats": {
            "maxItems": 3,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantSubscriptionSeatDto"
            }
          },
          "discountType": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "discountPercentage": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "startDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "endDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "discountExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "contractReference": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TenantUsageOverviewDto": {
        "required": [
          "analytics",
          "quota"
        ],
        "type": "object",
        "properties": {
          "analytics": {
            "$ref": "#/components/schemas/UsageAnalyticsDto"
          },
          "quota": {
            "$ref": "#/components/schemas/TenantQuotaStatusDto"
          }
        }
      },
      "TenantUsageProfileDto": {
        "required": [
          "activeUserCount",
          "totalAiRequests",
          "totalTokens",
          "processInstancesStarted",
          "processInstancesCompleted",
          "avgProcessHours",
          "processVolumeByDefinition"
        ],
        "type": "object",
        "properties": {
          "activeUserCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalAiRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "processInstancesStarted": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "processInstancesCompleted": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "avgProcessHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "processVolumeByDefinition": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "TenantValueBundleDto": {
        "required": [
          "profile",
          "compositeScore",
          "seatFit",
          "valueEstimate"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "month": {
            "type": "string",
            "format": "date"
          },
          "profile": {
            "$ref": "#/components/schemas/TenantUsageProfileDto"
          },
          "compositeScore": {
            "$ref": "#/components/schemas/CompositeScoreDto"
          },
          "seatFit": {
            "$ref": "#/components/schemas/SeatFitDto"
          },
          "valueEstimate": {
            "$ref": "#/components/schemas/ValueEstimateDto"
          }
        }
      },
      "TenantWorkspaceDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "primaryColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "accentColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "logoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "faviconUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TestConnectionRequest": {
        "required": [
          "apiEndpoint"
        ],
        "type": "object",
        "properties": {
          "apiEndpoint": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string",
            "format": "uri"
          }
        }
      },
      "TestRuleRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "workflowId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "dataSensitivity": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "containsPII": {
            "type": "boolean"
          },
          "estimatedTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requestTime": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ThinkAlongPersonalDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "calendar": {
            "type": "boolean"
          },
          "localHour": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "switchedOn": {
            "type": "boolean"
          },
          "optedOut": {
            "type": "boolean"
          },
          "calendarListed": {
            "type": "boolean"
          },
          "calendarConsent": {
            "type": "boolean"
          }
        }
      },
      "ThinkAlongPersonUsageDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "spentEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveEnabled": {
            "type": "boolean"
          },
          "optedOut": {
            "type": "boolean"
          }
        }
      },
      "ThinkAlongPolicyDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "targetUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "targetGroupId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean"
          },
          "calendar": {
            "type": "boolean"
          },
          "tickets": {
            "type": "boolean"
          },
          "localHour": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ThinkAlongRefKind": {
        "type": "integer"
      },
      "ThinkAlongUsageDto": {
        "type": "object",
        "properties": {
          "limitEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "configured": {
            "type": "boolean"
          },
          "month": {
            "type": "string",
            "format": "date-time"
          },
          "inheritedEnabled": {
            "type": "boolean"
          },
          "people": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThinkAlongPersonUsageDto"
            }
          }
        }
      },
      "TierRevenueBreakdownDto": {
        "required": [
          "tier",
          "subscriptionCount",
          "monthlyRecurringRevenue"
        ],
        "type": "object",
        "properties": {
          "tier": {
            "type": "string"
          },
          "subscriptionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyRecurringRevenue": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "TileActionResult": {
        "required": [
          "success"
        ],
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "refusal": {
            "$ref": "#/components/schemas/ActionRefusal"
          },
          "staleEntityTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "answer": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TileInputKind": {
        "enum": [
          "text",
          "multiline",
          "number",
          "date",
          "boolean",
          "choice"
        ]
      },
      "TilePlacement": {
        "required": [
          "placementId",
          "tileId"
        ],
        "type": "object",
        "properties": {
          "placementId": {
            "type": "string"
          },
          "tileId": {
            "type": "string",
            "format": "uuid"
          },
          "width": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rowSpan": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "arguments": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "TileState": {
        "type": "integer"
      },
      "TodayDashboardConfiguration": {
        "required": [
          "artifactId",
          "title"
        ],
        "type": "object",
        "properties": {
          "artifactId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "TodaySource": {
        "required": [
          "name",
          "connectorKey",
          "entityTypes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "entityTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TodaySources": {
        "required": [
          "level",
          "sources"
        ],
        "type": "object",
        "properties": {
          "level": {
            "type": [
              "null",
              "string"
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodaySource"
            }
          },
          "day": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "TokenResponse": {
        "required": [
          "access_token"
        ],
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          },
          "expires_in": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "refresh_token": {
            "type": [
              "null",
              "string"
            ]
          },
          "scope": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TopUserDto": {
        "required": [
          "handle",
          "groupLabel",
          "tokens",
          "percentOfTotal"
        ],
        "type": "object",
        "properties": {
          "handle": {
            "type": "string"
          },
          "groupLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "percentOfTotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "UnavailableIntentDto": {
        "required": [
          "intent",
          "reason"
        ],
        "type": "object",
        "properties": {
          "intent": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "UnpricedModelTokensDto": {
        "required": [
          "modelId",
          "serviceTier",
          "tokens"
        ],
        "type": "object",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "serviceTier": {
            "type": [
              "null",
              "string"
            ]
          },
          "tokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "UpdateCockpitGroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "groupType": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateDataSourceRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "connectionConfigJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "clearCredentialFields": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateForgeRequest": {
        "type": "object",
        "properties": {
          "ownerLevel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "The level to transfer to, or absent to keep the current one.",
                "$ref": "#/components/schemas/InstanceOwnerLevel"
              }
            ]
          },
          "ownerId": {
            "description": "The owner to transfer to. Absent keeps the current one; an explicit null clears it, which only\nInstanceOwnerLevel.Platform allows; a value sets it (#3227).",
            "$ref": "#/components/schemas/PresenceOfGuid"
          },
          "customerTenantId": {
            "description": "The customer this forge was prepared for — the `TenantId` column. Absent keeps it, an explicit\nnull clears it, a value sets it.",
            "$ref": "#/components/schemas/PresenceOfGuid"
          },
          "serviceProviderId": {
            "description": "The provider tag — the `ServiceProviderId` column. Absent keeps it, an explicit null clears it,\na value sets it.",
            "$ref": "#/components/schemas/PresenceOfGuid"
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "label": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        },
        "description": "Partial-update request for Task&lt;IActionResult&gt; ForgesController.Update(Guid id, UpdateForgeRequest req, CancellationToken ct = default(CancellationToken)).\nAll fields are optional — only non-null values are applied."
      },
      "UpdateGovernancePolicyRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "rulesJson": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "isInheritable": {
            "type": "boolean"
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateIdentityProviderRequest": {
        "type": "object",
        "properties": {
          "code": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "displayName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "providerType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/IdentityProviderType"
              }
            ]
          },
          "issuer": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "authority": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "clientId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "clientSecret": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "metadataUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ],
            "format": "uri"
          },
          "subjectClaimType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "emailClaimType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "displayNameClaimType": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "partnerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "tenantBindingIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "sortOrder": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "canVouchEmailVerified": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateImplementationTaskRequest": {
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 200,
            "minLength": 1,
            "type": [
              "null",
              "string"
            ]
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "clearOwnerUserId": {
            "type": "boolean"
          },
          "isCompleted": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "blockerText": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "weekNumber": {
            "maximum": 6,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateModelCostPolicyRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "costBearer": {
            "$ref": "#/components/schemas/CostBearer"
          },
          "resaleClass": {
            "$ref": "#/components/schemas/ModelResaleClass"
          },
          "licenseClass": {
            "$ref": "#/components/schemas/ModelLicenseClass"
          },
          "ratePer1kTokensEur": {
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "marginPercent": {
            "maximum": 100,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "byokFeeKind": {
            "$ref": "#/components/schemas/ByokFeeKind"
          },
          "byokFeeValue": {
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "isActive": {
            "type": "boolean"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateNavigationItemRequest": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "icon": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "route": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "processId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "minimumRaciLevel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RaciLevel"
              }
            ]
          }
        }
      },
      "UpdateOrganizationalRoleRequest": {
        "type": "object",
        "properties": {
          "label": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "department": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "displayOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdatePartnerDto": {
        "required": [
          "name",
          "contactEmail",
          "logoUrl",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "logoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "emailDomain": {
            "type": [
              "null",
              "string"
            ]
          },
          "primaryIdentityProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "autoAssignEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "defaultAutoAssignRole": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdatePluginConfigRequest": {
        "required": [
          "configJson"
        ],
        "type": "object",
        "properties": {
          "configJson": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "UpdatePriorityRequest": {
        "type": "object",
        "properties": {
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "New priority value.",
            "format": "int32"
          }
        },
        "description": "Request to update a routing rule's priority."
      },
      "UpdateProcessInstanceStatusRequest": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "currentStepKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateProviderChainEntryRequest": {
        "required": [
          "priority",
          "isActive",
          "maxDataClassification",
          "allowPII"
        ],
        "type": "object",
        "properties": {
          "instanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "apiEndpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "modelId": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "maximum": 9999,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "label": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "servedIntent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProviderIntent"
              }
            ]
          },
          "dailyCostCapAmount": {
            "maximum": 1000000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "dailyCostCapCurrency": {
            "maxLength": 8,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "dailyRequestCap": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dailyTokenCap": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contextWindowBudgetTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxDataClassification": {
            "$ref": "#/components/schemas/DataClassificationLevel"
          },
          "allowPII": {
            "type": "boolean"
          },
          "pseudonymizeBeforeEgress": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "dataResidencyRegion": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "providerSpecificConfigJson": {
            "maxLength": 4000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateRagEmbeddingConfigRequest": {
        "required": [
          "name",
          "providerKey",
          "model",
          "dimensions",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "providerKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "endpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "apiVersion": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "forgeInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dimensions": {
            "maximum": 100000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "providerSpecificConfigJson": {
            "maxLength": 4000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "UpdateRagVectorStoreConfigRequest": {
        "required": [
          "name",
          "providerKey",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "providerKey": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "endpoint": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "collectionPrefix": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "providerSpecificConfigJson": {
            "maxLength": 4000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "UpdateRateAgreementRequest": {
        "type": "object",
        "properties": {
          "costPerUnitEur": {
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "costSource": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CostSource"
              }
            ]
          },
          "sourceNote": {
            "maxLength": 500,
            "type": [
              "null",
              "string"
            ]
          },
          "reviewedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reviewedBy": {
            "maxLength": 200,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "UpdateRoutingRuleRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "priority": {
            "maximum": 10000,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "strategy": {
            "$ref": "#/components/schemas/RoutingStrategy"
          },
          "targetInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "fallbackInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "matchAgentIds": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchWorkflowIds": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchModels": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchDataSensitivity": {
            "maxLength": 50,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchContainsPII": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "matchMinTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "matchMaxTokens": {
            "maximum": 2147483647,
            "minimum": 0,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "matchTimeWindow": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "matchTags": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "customConditionJson": {
            "maxLength": 10000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateScheduledJobDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "ownerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "cronExpression": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "jobType": {
            "type": "string"
          },
          "configJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "outputRoutingJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "maxRetries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "timeoutSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateTenantApiRequest": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "routingStrategy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RoutingStrategy"
              }
            ]
          },
          "sparkForgeInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "preferredGlobalInstanceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "serviceProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "emailDomain": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "primaryIdentityProviderId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "autoAssignEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "defaultAutoAssignRole": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "primaryColor": {
            "maxLength": 7,
            "minLength": 0,
            "pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\z",
            "type": [
              "null",
              "string"
            ]
          },
          "accentColor": {
            "maxLength": 7,
            "minLength": 0,
            "pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\z",
            "type": [
              "null",
              "string"
            ]
          },
          "logoUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "faviconUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Request body for updating a tenant. All fields optional."
      },
      "UpdateTenantLifecycleRequest": {
        "required": [
          "stage"
        ],
        "type": "object",
        "properties": {
          "stage": {
            "type": "string"
          },
          "implementationWeek": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateTenantWorkspaceRequest": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": [
              "null",
              "string"
            ]
          },
          "primaryColor": {
            "maxLength": 7,
            "minLength": 0,
            "pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\z",
            "type": [
              "null",
              "string"
            ]
          },
          "accentColor": {
            "maxLength": 7,
            "minLength": 0,
            "pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\z",
            "type": [
              "null",
              "string"
            ]
          },
          "logoUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "faviconUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateUserAssignmentRequest": {
        "required": [
          "roleDefinitionId"
        ],
        "type": "object",
        "properties": {
          "roleDefinitionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "isDefault": {
            "type": "boolean"
          }
        }
      },
      "UpdateVoiceConfigRequest": {
        "required": [
          "strategyId",
          "backendType",
          "displayName",
          "systemPrompt",
          "keywordsJson",
          "transferDestination",
          "ragCollectionId",
          "welcomeMessage",
          "llmModel",
          "aiDisclosureMessage"
        ],
        "type": "object",
        "properties": {
          "strategyId": {
            "type": "string"
          },
          "backendType": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "systemPrompt": {
            "type": [
              "null",
              "string"
            ]
          },
          "keywordsJson": {
            "type": [
              "null",
              "string"
            ]
          },
          "transferDestination": {
            "type": [
              "null",
              "string"
            ]
          },
          "ragCollectionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "welcomeMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "llmModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "aiDisclosureMessage": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Request DTO for creating or updating Voice AI configurations.\nPrevents over-posting by only exposing safe properties."
      },
      "UpsellCandidateDto": {
        "required": [
          "tenantId",
          "tenantName",
          "members",
          "paidSeats"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "members": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "paidSeats": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "UpsertClassificationPolicyRequest": {
        "required": [
          "ownerLevel",
          "defaultLevel",
          "maxSyncLevel"
        ],
        "type": "object",
        "properties": {
          "ownerLevel": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "defaultLevel": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "maxSyncLevel": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "requireClassification": {
            "type": "boolean"
          },
          "autoClassifyOnIngestion": {
            "type": "boolean"
          },
          "customLevelsJson": {
            "maxLength": 10000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpsertCompositeQueryRequest": {
        "required": [
          "kind",
          "name",
          "spec"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "originIntent": {
            "type": [
              "null",
              "string"
            ]
          },
          "spec": {
            "$ref": "#/components/schemas/JsonElement"
          }
        }
      },
      "UpsertDataAccessPolicyRequest": {
        "required": [
          "tenantId"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "dataSourceId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "entityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "largeDatasetRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxDataAgeMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cacheOnlyAboveRows": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "UpsertRagProjectionConfigRequest": {
        "required": [
          "entityType"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "textFields": {
            "type": "string"
          },
          "maskFields": {
            "type": "string"
          },
          "labelField": {
            "type": [
              "null",
              "string"
            ]
          },
          "scope": {
            "type": "string"
          },
          "cutoffMonths": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "syncIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "storeProvider": {
            "type": "string"
          },
          "retentionDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "parentIdField": {
            "type": [
              "null",
              "string"
            ]
          },
          "childGranularity": {
            "type": "string"
          },
          "chunkLongText": {
            "type": "boolean"
          },
          "chunkMaxSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "chunkOverlap": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hybridSearch": {
            "type": "boolean"
          },
          "persistText": {
            "type": "boolean"
          },
          "readSource": {
            "type": "string"
          },
          "htmlFields": {
            "type": "string"
          },
          "filterFields": {
            "type": "string"
          }
        }
      },
      "UpsertSnapshotConfigRequest": {
        "required": [
          "entityType"
        ],
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string"
          },
          "preset": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CachePolicyPreset"
              }
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "scope": {
            "type": "string"
          },
          "cutoffMonths": {
            "maximum": 1200,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cutoffField": {
            "maxLength": 100,
            "type": [
              "null",
              "string"
            ]
          },
          "syncIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "storeProvider": {
            "type": "string"
          },
          "fullReconcileIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maskFields": {
            "maxLength": 1000,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UsageAnalyticsDto": {
        "required": [
          "periodLabel"
        ],
        "type": "object",
        "properties": {
          "periodLabel": {
            "type": "string"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "reasoningTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "cachedTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "cacheWriteTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "priorityRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tokenTrendPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "requestTrendPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "activeGroups": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "tenantCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "forgeCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "forecast": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ForecastDto"
              }
            ]
          },
          "dailyUsage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DailyUsagePointDto"
            }
          },
          "byGroup": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupUsageDto"
            }
          },
          "byModel": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelUsageDto"
            }
          },
          "topUsers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TopUserDto"
            }
          },
          "topForges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForgeUsageDto"
            }
          },
          "comparison": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PeriodComparisonDto"
              }
            ]
          },
          "unpricedModels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UserPreferencesDto": {
        "type": "object",
        "properties": {
          "emailNotifications": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "dashboardAlerts": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "wizardCompletionAlerts": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "preferredChannel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NotificationChannel"
              }
            ]
          },
          "categoryChannels": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/NotificationChannel"
            }
          },
          "dailyDigestHourUtc": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "approvalNotifications": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "defaultModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "streamResponses": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "showTokenUsage": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "useWorkers": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "preferredVoiceProfileId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "pauseLiveUpdates": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "defaultRefreshInterval": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "autoPublish": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "mcpWorkdayBindings": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/McpWorkdayBindingSelection"
            }
          },
          "mcpDashboardBindings": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/McpDashboardBindingSelection"
                }
              }
            }
          },
          "onboardingCompleted": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "onboardingCompletedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "quietHours": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/QuietHoursPreferenceDto"
              }
            ]
          },
          "notificationChannels": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/NotificationChannelPreferenceDto"
            }
          }
        }
      },
      "ValidateLicenseRequest": {
        "required": [
          "licenseKey"
        ],
        "type": "object",
        "properties": {
          "licenseKey": {
            "type": "string"
          }
        }
      },
      "ValidateOperationRequest": {
        "required": [
          "policyType",
          "ownerLevel",
          "operationContext"
        ],
        "type": "object",
        "properties": {
          "policyType": {
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "ownerLevel": {
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "ownerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "operationContext": {
            "maxLength": 65536,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "ValueEstimateDto": {
        "required": [
          "totalHoursSaved",
          "totalEurSaved",
          "cumulativeEurSinceOnboarding",
          "subscriptionMonthlyCostEur",
          "roiRatio",
          "perProcess"
        ],
        "type": "object",
        "properties": {
          "totalHoursSaved": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalEurSaved": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "cumulativeEurSinceOnboarding": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "subscriptionMonthlyCostEur": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "roiRatio": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "perProcess": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValueProcessLineDto"
            }
          }
        }
      },
      "ValueProcessLineDto": {
        "required": [
          "processArtifactId",
          "processName",
          "tasksCompleted",
          "baselineMinutes",
          "actualMinutes",
          "hoursSaved",
          "eurSaved"
        ],
        "type": "object",
        "properties": {
          "processArtifactId": {
            "type": "string",
            "format": "uuid"
          },
          "processName": {
            "type": "string"
          },
          "tasksCompleted": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "baselineMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "actualMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "hoursSaved": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "eurSaved": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ViewerDiscoveryResultDto": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "link": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ViewerSourceLinkDto"
              }
            ]
          },
          "sourceName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ViewerLinkOrigin": {
        "type": "integer"
      },
      "ViewerSourceIdentitiesDto": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ViewerSourceLinkDto"
            }
          }
        }
      },
      "ViewerSourceLinkDto": {
        "required": [
          "dataSourceId",
          "sourceName",
          "connectorKey"
        ],
        "type": "object",
        "properties": {
          "dataSourceId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceName": {
            "type": "string"
          },
          "connectorKey": {
            "type": "string"
          },
          "connectorKeyIsAlias": {
            "type": "boolean"
          },
          "externalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "origin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ViewerLinkOrigin"
              }
            ]
          },
          "linkedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "canDiscover": {
            "type": "boolean"
          }
        }
      },
      "VoiceDsarCallDto": {
        "required": [
          "callId"
        ],
        "type": "object",
        "properties": {
          "callId": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "startedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "outcome": {
            "type": [
              "null",
              "string"
            ]
          },
          "summary": {
            "type": [
              "null",
              "string"
            ]
          },
          "transcript": {
            "type": [
              "null",
              "string"
            ]
          },
          "batchTranscript": {
            "type": [
              "null",
              "string"
            ]
          },
          "audio": {
            "type": [
              "null",
              "string"
            ],
            "format": "byte"
          },
          "audioOmitted": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VoiceDsarErasureRequest": {
        "required": [
          "subject",
          "reason"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "VoiceDsarErasureResultDto": {
        "type": "object",
        "properties": {
          "deksDestroyed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "participantsAffected": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "phoneEventsAffected": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "VoiceDsarExportDto": {
        "required": [
          "subject"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "subjectHmac": {
            "type": [
              "null",
              "string"
            ]
          },
          "subjectEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "calls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceDsarCallDto"
            }
          },
          "callCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "voiceprints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceDsarVoiceprintDto"
            }
          },
          "voiceprintCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "phoneEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceDsarPhoneEventDto"
            }
          }
        }
      },
      "VoiceDsarPhoneEventDto": {
        "required": [
          "eventId"
        ],
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "callId": {
            "type": [
              "null",
              "string"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VoiceDsarVoiceprintDto": {
        "required": [
          "profileId",
          "name",
          "source"
        ],
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "referenceText": {
            "type": [
              "null",
              "string"
            ]
          },
          "referenceContentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "referenceAudio": {
            "type": [
              "null",
              "string"
            ],
            "format": "byte"
          },
          "referenceAudioOmitted": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VoiceDto": {
        "required": [
          "id",
          "name",
          "description",
          "source",
          "isTenantDefault",
          "isPrivate"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": "string"
          },
          "isTenantDefault": {
            "type": "boolean"
          },
          "isPrivate": {
            "type": "boolean"
          }
        }
      },
      "WaitlistEntryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "organizationName": {
            "type": [
              "null",
              "string"
            ]
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submissionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSubmittedAt": {
            "type": "string",
            "format": "date-time"
          },
          "handledAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "handledByUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "handledByDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "handlerNote": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WaitlistEntryStatus": {
        "type": "integer"
      },
      "WaitlistEntrySummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "organizationName": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submissionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSubmittedAt": {
            "type": "string",
            "format": "date-time"
          },
          "handledAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "handledByUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "handledByDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasHandlerNote": {
            "type": "boolean"
          }
        }
      },
      "WaitlistFollowUpRequest": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "maxLength": 32,
            "minLength": 0,
            "type": "string"
          },
          "handlerNote": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WaitlistPageDto": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WaitlistEntrySummaryDto"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "WaitlistSignupRequest": {
        "required": [
          "email",
          "contactName"
        ],
        "type": "object",
        "properties": {
          "email": {
            "maxLength": 254,
            "minLength": 0,
            "type": "string"
          },
          "contactName": {
            "maxLength": 200,
            "minLength": 0,
            "type": "string"
          },
          "organizationName": {
            "maxLength": 200,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "note": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "maxLength": 64,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WaitlistSignupResponse": {
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "WebhookSubscriptionDto": {
        "required": [
          "eventType",
          "callbackUrl"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string"
          },
          "callbackUrl": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "WorkbenchActionRequest": {
        "required": [
          "action"
        ],
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "scope": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "inputs": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "WorkbenchDefinition": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkbenchRow"
            }
          },
          "styles": {
            "type": [
              "null",
              "string"
            ]
          },
          "script": {
            "type": [
              "null",
              "string"
            ]
          },
          "libraries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WorkbenchRow": {
        "type": "object",
        "properties": {
          "tiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TilePlacement"
            }
          }
        }
      },
      "WriteBackActionDto": {
        "required": [
          "actionType",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "actionType": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "reversible": {
            "type": "boolean"
          },
          "compensatingAction": {
            "type": [
              "null",
              "string"
            ]
          },
          "isCompensatingOnly": {
            "type": "boolean"
          }
        }
      },
      "WriteBackLogDto": {
        "required": [
          "id",
          "pluginId",
          "actionType",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pluginId": {
            "type": "string"
          },
          "actionType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "externalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "reversible": {
            "type": "boolean"
          },
          "executedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "executedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rolledBackAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "errorMessage": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WriteBackOutcomeDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "errorMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "externalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "writeBackLogId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "idempotent": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Ratho.Cockpit.Api"
    },
    {
      "name": "AccessRequests"
    },
    {
      "name": "Actions"
    },
    {
      "name": "Agents"
    },
    {
      "name": "AgreementLayers"
    },
    {
      "name": "Agreements"
    },
    {
      "name": "AiBudgets"
    },
    {
      "name": "Approvals"
    },
    {
      "name": "ArtifactAgent"
    },
    {
      "name": "ArtifactCoPilot"
    },
    {
      "name": "Artifacts"
    },
    {
      "name": "ArtifactTemplates"
    },
    {
      "name": "Audit"
    },
    {
      "name": "AuditIntegrity"
    },
    {
      "name": "Auth"
    },
    {
      "name": "AuthDiscovery"
    },
    {
      "name": "Autonomy"
    },
    {
      "name": "Capabilities"
    },
    {
      "name": "Chat"
    },
    {
      "name": "Coaching"
    },
    {
      "name": "Compliance"
    },
    {
      "name": "CompositeQueries"
    },
    {
      "name": "Conductor"
    },
    {
      "name": "ConnectorSwitches"
    },
    {
      "name": "ConnectorWriteApprovals"
    },
    {
      "name": "ConversationMonitor"
    },
    {
      "name": "ConversationsMobile"
    },
    {
      "name": "CustomerDataJobs"
    },
    {
      "name": "CustomerDataPlacements"
    },
    {
      "name": "DashboardChatContext"
    },
    {
      "name": "DataClassification"
    },
    {
      "name": "DataSourceGrants"
    },
    {
      "name": "DataSources"
    },
    {
      "name": "DelegatedAppRegistrations"
    },
    {
      "name": "DemoReset"
    },
    {
      "name": "DemoWorld"
    },
    {
      "name": "Dictation"
    },
    {
      "name": "DocStore"
    },
    {
      "name": "DocumentLifecycle"
    },
    {
      "name": "DomainAgentPresets"
    },
    {
      "name": "DomainAgents"
    },
    {
      "name": "Dsar"
    },
    {
      "name": "Enrollment"
    },
    {
      "name": "EntityTypes"
    },
    {
      "name": "ExactConnection"
    },
    {
      "name": "FederationRead"
    },
    {
      "name": "Feedback"
    },
    {
      "name": "ForgeManagement"
    },
    {
      "name": "Forges"
    },
    {
      "name": "Glance"
    },
    {
      "name": "GovernancePolicies"
    },
    {
      "name": "Groups"
    },
    {
      "name": "IdentityProviders"
    },
    {
      "name": "ImmersiveComposer"
    },
    {
      "name": "ImplementationTasks"
    },
    {
      "name": "Info"
    },
    {
      "name": "Insights"
    },
    {
      "name": "InstanceBilling"
    },
    {
      "name": "Invoices"
    },
    {
      "name": "KnowledgeAnalytics"
    },
    {
      "name": "KnowledgeFederation"
    },
    {
      "name": "LearningMode"
    },
    {
      "name": "M365AdminConsent"
    },
    {
      "name": "M365Connection"
    },
    {
      "name": "McpAppDecisions"
    },
    {
      "name": "McpConnections"
    },
    {
      "name": "McpDashboardBindings"
    },
    {
      "name": "McpOAuthConnections"
    },
    {
      "name": "McpOAuth"
    },
    {
      "name": "McpToken"
    },
    {
      "name": "McpToolBindings"
    },
    {
      "name": "McpWorkday"
    },
    {
      "name": "Me"
    },
    {
      "name": "MeetingAutoJoin"
    },
    {
      "name": "MeetingBot"
    },
    {
      "name": "MeetingSttReceiver"
    },
    {
      "name": "MeNotifications"
    },
    {
      "name": "MePushInstallations"
    },
    {
      "name": "ModelCostPolicies"
    },
    {
      "name": "Monitoring"
    },
    {
      "name": "NativeOAuth"
    },
    {
      "name": "Navigation"
    },
    {
      "name": "NotificationActions"
    },
    {
      "name": "OAuthCallback"
    },
    {
      "name": "OneTimeSecrets"
    },
    {
      "name": "Orchestration"
    },
    {
      "name": "OrganizationalRoles"
    },
    {
      "name": "PartnerIdentityPolicy"
    },
    {
      "name": "PartnerPricing"
    },
    {
      "name": "PartnerRevenue"
    },
    {
      "name": "PartnerUsageStatement"
    },
    {
      "name": "PendingLearnings"
    },
    {
      "name": "PersonalConversations"
    },
    {
      "name": "PlatformLicenses"
    },
    {
      "name": "PlatformPartners"
    },
    {
      "name": "PlatformPricing"
    },
    {
      "name": "PlatformReleases"
    },
    {
      "name": "PlatformWidgets"
    },
    {
      "name": "Plugin"
    },
    {
      "name": "PluginWebhook"
    },
    {
      "name": "PowerAutomateActions"
    },
    {
      "name": "PowerAutomate"
    },
    {
      "name": "PreviewFeatures"
    },
    {
      "name": "ProcessDefinitions"
    },
    {
      "name": "ProcessSteps"
    },
    {
      "name": "PromptOverlays"
    },
    {
      "name": "Proposals"
    },
    {
      "name": "ProviderChainEntries"
    },
    {
      "name": "Quotas"
    },
    {
      "name": "Raci"
    },
    {
      "name": "Rag"
    },
    {
      "name": "RagEmbeddingConfig"
    },
    {
      "name": "RagVectorStoreConfig"
    },
    {
      "name": "RateAgreements"
    },
    {
      "name": "ReaderTimeZone"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Roles"
    },
    {
      "name": "RoutingDiagnostic"
    },
    {
      "name": "RoutingRules"
    },
    {
      "name": "ScheduledJobs"
    },
    {
      "name": "SectorPacks"
    },
    {
      "name": "Security"
    },
    {
      "name": "Skills"
    },
    {
      "name": "SubscriptionChanges"
    },
    {
      "name": "TemplateLibrary"
    },
    {
      "name": "TenantApiKey"
    },
    {
      "name": "Tenants"
    },
    {
      "name": "TenantSeats"
    },
    {
      "name": "TenantSubscription"
    },
    {
      "name": "TenantUsage"
    },
    {
      "name": "TenantValue"
    },
    {
      "name": "ThinkAlong"
    },
    {
      "name": "TodayDashboard"
    },
    {
      "name": "TodaySources"
    },
    {
      "name": "Usage"
    },
    {
      "name": "UserAssignments"
    },
    {
      "name": "UserInvites"
    },
    {
      "name": "Users"
    },
    {
      "name": "VoiceAiConfig"
    },
    {
      "name": "VoiceAudioFork"
    },
    {
      "name": "VoiceBridge"
    },
    {
      "name": "Voice"
    },
    {
      "name": "Waitlist"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "WizardSessions"
    },
    {
      "name": "Workbench"
    }
  ]
}