{
  "openapi": "3.1.0",
  "info": {
    "title": "Polyant Engine API",
    "version": "0.1.0"
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "HealthController_check",
        "tags": [
          "health"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          }
        },
        "security": []
      }
    },
    "/memories": {
      "get": {
        "operationId": "MemoriesController_listAll",
        "tags": [
          "memories"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "memory:read"
      },
      "post": {
        "operationId": "MemoriesController_create",
        "tags": [
          "memories"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "memory:write"
      },
      "delete": {
        "operationId": "MemoriesController_removeAll",
        "tags": [
          "memories"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "memory:write"
      }
    },
    "/memories/{id}": {
      "delete": {
        "operationId": "MemoriesController_remove",
        "tags": [
          "memories"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "memory:write"
      }
    },
    "/api/instances": {
      "get": {
        "operationId": "InstancesController_list",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent:read"
      },
      "post": {
        "operationId": "InstancesController_create",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent:write"
      }
    },
    "/api/instances/models": {
      "get": {
        "operationId": "InstancesController_getModels",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent:read"
      }
    },
    "/api/instances/{slug}": {
      "get": {
        "operationId": "InstancesController_getBySlug",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent:read"
      },
      "patch": {
        "operationId": "InstancesController_update",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent:write"
      },
      "delete": {
        "operationId": "InstancesController_remove",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent:delete"
      }
    },
    "/api/instances/{slug}/icon": {
      "get": {
        "operationId": "InstancesController_getIcon",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent:read"
      },
      "put": {
        "operationId": "InstancesController_setIcon",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent:write"
      },
      "delete": {
        "operationId": "InstancesController_removeIcon",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent:write"
      }
    },
    "/api/instances/{slug}/prompts": {
      "get": {
        "operationId": "InstancePromptsController_getPrompts",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.prompt:read"
      },
      "patch": {
        "operationId": "InstancePromptsController_updatePrompts",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.prompt:write"
      }
    },
    "/api/instances/{slug}/tools/required-secrets": {
      "get": {
        "operationId": "InstanceToolsController_getRequiredSecrets",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.tool:read"
      }
    },
    "/api/instances/{slug}/tools": {
      "get": {
        "operationId": "InstanceToolsController_getTools",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.tool:read"
      },
      "patch": {
        "operationId": "InstanceToolsController_updateTools",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.tool:write"
      }
    },
    "/api/instances/{slug}/skills": {
      "get": {
        "operationId": "InstanceSkillsController_getSkills",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:read"
      },
      "patch": {
        "operationId": "InstanceSkillsController_updateSkills",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:write"
      }
    },
    "/api/instances/{slug}/skills/{skillSlug}/upgrade": {
      "post": {
        "operationId": "InstanceSkillsController_upgrade",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skillSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:write"
      }
    },
    "/api/instances/{slug}/skills/{skillSlug}/auto-load": {
      "post": {
        "operationId": "InstanceSkillsController_toggleAutoLoad",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skillSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:write"
      }
    },
    "/api/instances/{slug}/skills/{skillSlug}/rollback": {
      "post": {
        "operationId": "InstanceSkillsController_rollback",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skillSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:write"
      }
    },
    "/api/instances/{slug}/skills/{skillSlug}/env": {
      "get": {
        "operationId": "InstanceSkillsController_getSkillEnvVars",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skillSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:read"
      },
      "put": {
        "operationId": "InstanceSkillsController_setSkillEnvVars",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skillSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:write"
      }
    },
    "/api/instances/{slug}/skills/{skillSlug}/env/{key}": {
      "delete": {
        "operationId": "InstanceSkillsController_removeSkillEnvVar",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skillSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.skill:write"
      }
    },
    "/api/instances/{slug}/secrets": {
      "get": {
        "operationId": "InstanceSecretsController_listSecrets",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.secret:read"
      },
      "put": {
        "operationId": "InstanceSecretsController_setSecrets",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.secret:write"
      }
    },
    "/api/instances/{slug}/secrets/{key}": {
      "delete": {
        "operationId": "InstanceSecretsController_removeSecret",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.secret:write"
      }
    },
    "/api/instances/{slug}/channels": {
      "get": {
        "operationId": "InstanceChannelsController_listChannels",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.channel:read"
      }
    },
    "/api/instances/{slug}/channels/{type}": {
      "put": {
        "operationId": "InstanceChannelsController_setChannel",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.channel:write"
      },
      "delete": {
        "operationId": "InstanceChannelsController_removeChannel",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.channel:write"
      }
    },
    "/api/conversations": {
      "get": {
        "operationId": "ConversationsController_list",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "conversation:read"
      }
    },
    "/api/conversations/{conversationId}": {
      "get": {
        "operationId": "ConversationsController_getOne",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:read"
      },
      "patch": {
        "operationId": "ConversationsController_rename",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:delete"
      },
      "delete": {
        "operationId": "ConversationsController_remove",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:delete"
      }
    },
    "/api/conversations/{conversationId}/messages": {
      "get": {
        "operationId": "ConversationsController_getMessages",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:read"
      }
    },
    "/api/conversations/{conversationId}/messages/{messageId}/debug": {
      "get": {
        "operationId": "ConversationsController_getMessageDebug",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:read"
      }
    },
    "/api/conversations/{conversationId}/hooks": {
      "get": {
        "operationId": "ConversationsController_getHookExecutions",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:read"
      }
    },
    "/api/conversations/{conversationId}/state": {
      "get": {
        "operationId": "ConversationsController_getState",
        "tags": [
          "conversations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:read"
      }
    },
    "/api/analytics": {
      "get": {
        "operationId": "AnalyticsController_global",
        "tags": [
          "analytics"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "analytics:read"
      }
    },
    "/api/instances/{slug}/analytics": {
      "get": {
        "operationId": "AnalyticsController_perInstance",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "analytics:read"
      }
    },
    "/api/tools": {
      "get": {
        "operationId": "ToolsController_list",
        "tags": [
          "tools"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent.tool:read"
      }
    },
    "/api/governance/overview": {
      "get": {
        "operationId": "GovernanceController_getOverview",
        "tags": [
          "governance"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/governance/analytics": {
      "get": {
        "operationId": "GovernanceController_analytics",
        "tags": [
          "governance"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/governance/tools": {
      "get": {
        "operationId": "GovernanceController_getTools",
        "tags": [
          "governance"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/governance/metadata": {
      "get": {
        "operationId": "GovernanceController_getMetadata",
        "tags": [
          "governance"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/organizations/{orgSlug}/governance/policies": {
      "get": {
        "operationId": "GovernancePoliciesController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      },
      "post": {
        "operationId": "GovernancePoliciesController_create",
        "tags": [
          "organizations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/organizations/{orgSlug}/governance/policies/{id}": {
      "patch": {
        "operationId": "GovernancePoliciesController_update",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      },
      "delete": {
        "operationId": "GovernancePoliciesController_remove",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/instances/{slug}/governance/policies": {
      "get": {
        "operationId": "InstanceGovernanceController_getInstanceGovernancePolicies",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      },
      "patch": {
        "operationId": "InstanceGovernanceController_updateInstanceGovernancePolicies",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/instances/{slug}/governance/policies/{assignmentId}": {
      "delete": {
        "operationId": "InstanceGovernanceController_removeInstanceGovernancePolicy",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/instances/{slug}/governance/analytics": {
      "get": {
        "operationId": "InstanceGovernanceController_instanceAnalytics",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/instances/{slug}/governance/events": {
      "get": {
        "operationId": "InstanceGovernanceController_getInstanceGovernanceEvents",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/instances/{slug}/compliance/snapshots": {
      "post": {
        "operationId": "InstanceComplianceController_createConfigSnapshot",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      },
      "get": {
        "operationId": "InstanceComplianceController_listConfigSnapshots",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/instances/{slug}/compliance/snapshots/{version}": {
      "get": {
        "operationId": "InstanceComplianceController_getConfigSnapshot",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/instances/{slug}/compliance/model-card": {
      "get": {
        "operationId": "InstanceComplianceController_getInstanceModelCard",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      },
      "patch": {
        "operationId": "InstanceComplianceController_updateInstanceModelCard",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/instances/{slug}/compliance/reports": {
      "post": {
        "operationId": "InstanceComplianceController_generateComplianceReport",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      },
      "get": {
        "operationId": "InstanceComplianceController_listComplianceReports",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/instances/{slug}/compliance/reports/{id}": {
      "get": {
        "operationId": "InstanceComplianceController_getComplianceReport",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      }
    },
    "/api/instances/{slug}/knowledge": {
      "get": {
        "operationId": "InstanceKnowledgeController_list",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.knowledge:read"
      },
      "post": {
        "operationId": "InstanceKnowledgeController_upload",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.knowledge:write",
        "x-throttle": {
          "limit": 5,
          "ttlMs": 60000
        }
      }
    },
    "/api/instances/{slug}/knowledge/export": {
      "get": {
        "operationId": "InstanceKnowledgeController_export",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.knowledge:read"
      }
    },
    "/api/instances/{slug}/knowledge/{docId}": {
      "get": {
        "operationId": "InstanceKnowledgeController_getById",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.knowledge:read"
      },
      "delete": {
        "operationId": "InstanceKnowledgeController_remove",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.knowledge:write"
      }
    },
    "/api/instances/{slug}/knowledge/import": {
      "post": {
        "operationId": "InstanceKnowledgeController_import",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.knowledge:write",
        "x-throttle": {
          "limit": 5,
          "ttlMs": 60000
        }
      }
    },
    "/api/instances/{slug}/scheduled-tasks": {
      "get": {
        "operationId": "InstanceScheduledTasksController_list",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.task:read"
      },
      "post": {
        "operationId": "InstanceScheduledTasksController_create",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.task:write"
      }
    },
    "/api/instances/{slug}/scheduled-tasks/runs": {
      "get": {
        "operationId": "InstanceScheduledTasksController_listRuns",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.task:read"
      }
    },
    "/api/instances/{slug}/scheduled-tasks/{id}": {
      "get": {
        "operationId": "InstanceScheduledTasksController_getOne",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.task:read"
      },
      "patch": {
        "operationId": "InstanceScheduledTasksController_update",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.task:write"
      },
      "delete": {
        "operationId": "InstanceScheduledTasksController_remove",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.task:write"
      }
    },
    "/api/instances/{slug}/scheduled-tasks/{id}/run": {
      "post": {
        "operationId": "InstanceScheduledTasksController_runNow",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.task:write"
      }
    },
    "/api/instances/{slug}/retention": {
      "get": {
        "operationId": "InstanceRetentionController_get",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:read"
      },
      "put": {
        "operationId": "InstanceRetentionController_put",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:delete"
      },
      "delete": {
        "operationId": "InstanceRetentionController_remove",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:delete"
      }
    },
    "/api/instances/{slug}/retention/runs": {
      "get": {
        "operationId": "InstanceRetentionController_runs",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:read"
      }
    },
    "/api/instances/{slug}/retention/run": {
      "post": {
        "operationId": "InstanceRetentionController_run",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "conversation:delete"
      }
    },
    "/webhooks/{webhookToken}": {
      "post": {
        "operationId": "WebhookController_receiveEvent",
        "tags": [
          "webhooks"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "webhookToken",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public by design: authenticated by the opaque, unguessable path token itself, not by a separate credential.",
        "x-throttle": {
          "limit": 60,
          "ttlMs": 60000
        }
      }
    },
    "/webhooks/twilio/{instanceSlug}/whatsapp": {
      "post": {
        "operationId": "TwilioWebhookController_handleWhatsAppWebhook",
        "tags": [
          "webhooks"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "instanceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public by design: authenticated by validating the Twilio HMAC request signature (X-Twilio-Signature) inside the handler, not by the auth guard.",
        "x-throttle": {
          "limit": 60,
          "ttlMs": 60000
        }
      }
    },
    "/api/instances/{slug}/room": {
      "get": {
        "operationId": "RoomController_getRoom",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:read"
      },
      "put": {
        "operationId": "RoomController_upsertRoomConfig",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      },
      "delete": {
        "operationId": "RoomController_deleteRoomConfig",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      }
    },
    "/api/instances/{slug}/hooks": {
      "get": {
        "operationId": "InstanceHooksController_list",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      },
      "post": {
        "operationId": "InstanceHooksController_create",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/instances/{slug}/hooks/{id}": {
      "patch": {
        "operationId": "InstanceHooksController_update",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      },
      "delete": {
        "operationId": "InstanceHooksController_remove",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/hook-functions": {
      "get": {
        "operationId": "HookFunctionsController_list",
        "tags": [
          "hook-functions"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent.tool:read"
      }
    },
    "/api/instances/{slug}/event-sources": {
      "get": {
        "operationId": "EventSourcesController_list",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:read"
      },
      "post": {
        "operationId": "EventSourcesController_create",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      }
    },
    "/api/instances/{slug}/event-sources/{id}": {
      "put": {
        "operationId": "EventSourcesController_update",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      },
      "delete": {
        "operationId": "EventSourcesController_remove",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      }
    },
    "/api/instances/{slug}/event-sources/{id}/rotate-token": {
      "post": {
        "operationId": "EventSourcesController_rotate",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      }
    },
    "/api/instances/{slug}/event-sources/{id}/definitions": {
      "get": {
        "operationId": "EventSourcesController_listDefs",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:read"
      },
      "post": {
        "operationId": "EventSourcesController_createDef",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      }
    },
    "/api/instances/{slug}/event-sources/{id}/definitions/{defId}": {
      "put": {
        "operationId": "EventSourcesController_updateDef",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "defId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      },
      "delete": {
        "operationId": "EventSourcesController_removeDef",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "defId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:write"
      }
    },
    "/api/instances/{slug}/room/backlog": {
      "get": {
        "operationId": "WebhookBacklogController_getBacklog",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:read"
      }
    },
    "/api/instances/{slug}/room/activity": {
      "get": {
        "operationId": "WebhookBacklogController_getActivity",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.room:read"
      }
    },
    "/api/audit-logs": {
      "get": {
        "operationId": "AuditController_list",
        "tags": [
          "audit-logs"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "audit_log:read"
      }
    },
    "/api/audit-logs/stats": {
      "get": {
        "operationId": "AuditController_stats",
        "tags": [
          "audit-logs"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "audit_log:read"
      }
    },
    "/api/instances/{slug}/export": {
      "get": {
        "operationId": "InstanceExportController_exportInstance",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.export:read"
      }
    },
    "/api/instances/import": {
      "post": {
        "operationId": "InstanceExportController_importNew",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent:write"
      }
    },
    "/api/instances/{slug}/import": {
      "post": {
        "operationId": "InstanceExportController_importOverwrite",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent:write"
      }
    },
    "/api/attachments/{key}": {
      "get": {
        "operationId": "AttachmentsController_getAttachment",
        "tags": [
          "attachments"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-wildcard": true,
        "description": "This path parameter is an Express wildcard capture and may itself contain literal `/` characters.",
        "x-permission": "conversation:read"
      }
    },
    "/api/workspaces/active": {
      "put": {
        "operationId": "ActiveWorkspaceController_setActive",
        "tags": [
          "workspaces"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "agent:read"
      }
    },
    "/oauth/{provider}/callback": {
      "get": {
        "operationId": "OAuthCallbackController_callback",
        "tags": [
          "oauth"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public by design: authenticated by a single-use, server-issued state nonce (CSRF-safe), not by a bearer token."
      }
    },
    "/v1/models": {
      "get": {
        "operationId": "OpenAIController_listModels",
        "tags": [
          "v1"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          },
          {
            "instanceApiKey": []
          }
        ],
        "x-permission": "agent:read"
      }
    },
    "/v1/chat/completions": {
      "post": {
        "operationId": "OpenAIController_chatCompletions",
        "tags": [
          "v1"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "instanceApiKey": []
          },
          {}
        ],
        "description": "Marked @Public() in the route metadata, but the handler validates a per-instance API key internally (independent of the global auth guard). When the target instance's API-key auth is turned OFF, this route accepts any request — no token is required or validated.",
        "x-throttle": {
          "limit": 20,
          "ttlMs": 60000
        }
      }
    },
    "/api/instances/{slug}/chat/stream": {
      "post": {
        "operationId": "InstanceChatStreamController_stream",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "instanceApiKey": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Marked @Public() in the route metadata, but the handler validates a per-instance API key internally (independent of the global auth guard). When the target instance's API-key auth is turned OFF, this route accepts any request — no token is required or validated."
      }
    },
    "/channels/http/{slug}/messages": {
      "post": {
        "operationId": "ChannelHttpController_receiveMessage",
        "tags": [
          "channels"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "instanceApiKey": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Marked @Public() in the route metadata, but the handler validates a per-instance API key internally (independent of the global auth guard). When the target instance's API-key auth is turned OFF, this route accepts any request — no token is required or validated.",
        "x-throttle": {
          "limit": 300,
          "ttlMs": 60000
        }
      }
    },
    "/api/skills": {
      "get": {
        "operationId": "SkillsController_list",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "skill.catalog:read"
      },
      "post": {
        "operationId": "SkillsController_create",
        "tags": [
          "skills"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "skill.catalog:write"
      }
    },
    "/api/skills/catalog/export": {
      "get": {
        "operationId": "SkillsController_exportCatalog",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "skill.catalog:read"
      }
    },
    "/api/skills/catalog/import": {
      "post": {
        "operationId": "SkillsController_importCatalog",
        "tags": [
          "skills"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "skill.catalog:write"
      }
    },
    "/api/skills/{name}": {
      "get": {
        "operationId": "SkillsController_getOne",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "skill.catalog:read"
      },
      "put": {
        "operationId": "SkillsController_update",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "skill.catalog:write"
      },
      "delete": {
        "operationId": "SkillsController_remove",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "skill.catalog:write"
      }
    },
    "/api/skills/{name}/export": {
      "get": {
        "operationId": "SkillsController_exportSkill",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "skill.catalog:read"
      }
    },
    "/api/skills/{name}/versions": {
      "get": {
        "operationId": "SkillsController_listVersions",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "skill.catalog:read"
      }
    },
    "/api/skills/{name}/versions/{version}": {
      "get": {
        "operationId": "SkillsController_getVersion",
        "tags": [
          "skills"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "skill.catalog:read"
      }
    },
    "/api/users": {
      "get": {
        "operationId": "UsersController_list",
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-required-roles": [
          "superadmin"
        ]
      },
      "post": {
        "operationId": "UsersController_create",
        "tags": [
          "users"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-required-roles": [
          "superadmin"
        ]
      }
    },
    "/api/users/{id}": {
      "get": {
        "operationId": "UsersController_getOne",
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-required-roles": [
          "superadmin"
        ]
      },
      "patch": {
        "operationId": "UsersController_update",
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-required-roles": [
          "superadmin"
        ]
      },
      "delete": {
        "operationId": "UsersController_remove",
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-required-roles": [
          "superadmin"
        ]
      }
    },
    "/api/users/{id}/reset-password": {
      "post": {
        "operationId": "UsersController_resetPassword",
        "tags": [
          "users"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-required-roles": [
          "superadmin"
        ]
      }
    },
    "/api/me": {
      "get": {
        "operationId": "MeController_context",
        "tags": [
          "me"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "org:read"
      }
    },
    "/api/me/password": {
      "post": {
        "operationId": "MeController_changePassword",
        "tags": [
          "me"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-authenticated-only": true
      }
    },
    "/api/me/access": {
      "get": {
        "operationId": "MeController_access",
        "tags": [
          "me"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals.",
        "x-authenticated-only": true
      }
    },
    "/api/auth/credentials/verify": {
      "post": {
        "operationId": "CredentialsController_verify",
        "tags": [
          "auth"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "internalSecret": []
          }
        ],
        "description": "Marked @Public() because it runs during login (before the caller has a session), but the handler requires a shared internal secret (x-internal-auth header, checked against AUTH_INTERNAL_SECRET) exchanged only between the web and engine services. The route is NOT open to arbitrary callers.",
        "x-throttle": {
          "limit": 5,
          "ttlMs": 60000
        }
      }
    },
    "/api/activity-stream/live": {
      "get": {
        "operationId": "ActivityStreamController_live",
        "tags": [
          "activity-stream"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "analytics:read"
      }
    },
    "/api/instances/{slug}/optouts": {
      "get": {
        "operationId": "OptoutsController_list",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:read"
      },
      "post": {
        "operationId": "OptoutsController_optOut",
        "tags": [
          "instances"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/instances/{slug}/optouts/{channelType}/{channelId}": {
      "delete": {
        "operationId": "OptoutsController_optIn",
        "tags": [
          "instances"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "agent.governance:write"
      }
    },
    "/api/organizations/{orgSlug}/members": {
      "get": {
        "operationId": "MembersController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/members/{userId}": {
      "put": {
        "operationId": "MembersController_assign",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "delete": {
        "operationId": "MembersController_remove",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/roles/permissions": {
      "get": {
        "operationId": "RolesController_permissions",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "custom_roles",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/roles": {
      "get": {
        "operationId": "RolesController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "custom_roles",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "post": {
        "operationId": "RolesController_create",
        "tags": [
          "organizations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "custom_roles",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/roles/{roleId}": {
      "get": {
        "operationId": "RolesController_get",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "custom_roles",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "patch": {
        "operationId": "RolesController_update",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "custom_roles",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "delete": {
        "operationId": "RolesController_remove",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "custom_roles",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/workspaces": {
      "get": {
        "operationId": "WorkspacesController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "workspace_scoped_rbac",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "post": {
        "operationId": "WorkspacesController_create",
        "tags": [
          "organizations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "workspace_scoped_rbac",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/workspaces/{workspaceId}": {
      "patch": {
        "operationId": "WorkspacesController_update",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "workspace_scoped_rbac",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "delete": {
        "operationId": "WorkspacesController_remove",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "workspace_scoped_rbac",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/workspaces/{workspaceId}/members/{userId}": {
      "put": {
        "operationId": "WorkspaceMembersController_assign",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "workspace_scoped_rbac",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "delete": {
        "operationId": "WorkspaceMembersController_remove",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "workspace_scoped_rbac",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/workspace-bindings": {
      "get": {
        "operationId": "WorkspaceBindingsController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "workspace_scoped_rbac",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations": {
      "get": {
        "operationId": "OrganizationsController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "org:read",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "post": {
        "operationId": "OrganizationsController_create",
        "tags": [
          "organizations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "multi_org",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}": {
      "patch": {
        "operationId": "OrganizationsController_rename",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "multi_org",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "delete": {
        "operationId": "OrganizationsController_remove",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "multi_org",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/authz-audit-logs": {
      "get": {
        "operationId": "AuthzAuditController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "audit_log:read",
        "x-requires-feature": "advanced_audit",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/api-keys/permissions": {
      "get": {
        "operationId": "ManagementApiKeysController_catalog",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "granular_api_keys",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/api-keys": {
      "get": {
        "operationId": "ManagementApiKeysController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "granular_api_keys",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "post": {
        "operationId": "ManagementApiKeysController_create",
        "tags": [
          "organizations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "granular_api_keys",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/api-keys/{keyId}": {
      "patch": {
        "operationId": "ManagementApiKeysController_update",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "granular_api_keys",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "delete": {
        "operationId": "ManagementApiKeysController_remove",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org:write",
        "x-requires-feature": "granular_api_keys",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/invitations": {
      "get": {
        "operationId": "InvitationsController_list",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "user_invitations",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      },
      "post": {
        "operationId": "InvitationsController_create",
        "tags": [
          "organizations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "user_invitations",
        "x-throttle": {
          "limit": 5,
          "ttlMs": 60000
        }
      }
    },
    "/api/organizations/{orgSlug}/invitations/{invitationId}": {
      "delete": {
        "operationId": "InvitationsController_revoke",
        "tags": [
          "organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permission": "org.member:manage",
        "x-requires-feature": "user_invitations",
        "x-throttle": {
          "limit": 30,
          "ttlMs": 60000
        }
      }
    },
    "/api/invitations/accept": {
      "post": {
        "operationId": "InvitationAcceptController_accept",
        "tags": [
          "invitations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "401": {
            "description": "Missing or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission, or the license lacks the required feature."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [
          {
            "managementApiKey": []
          },
          {
            "sessionCookie": []
          },
          {
            "sessionBearer": []
          }
        ],
        "x-permission": "org:read",
        "x-throttle": {
          "limit": 10,
          "ttlMs": 60000
        }
      }
    },
    "/api/invitations/preview": {
      "get": {
        "operationId": "InvitationOnboardingController_preview",
        "tags": [
          "invitations"
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [],
        "description": "Public by design: serves an anonymous pre-signup visitor following an invitation link.",
        "x-throttle": {
          "limit": 10,
          "ttlMs": 60000
        }
      }
    },
    "/api/invitations/signup": {
      "post": {
        "operationId": "InvitationOnboardingController_signup",
        "tags": [
          "invitations"
        ],
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "429": {
            "description": "Rate limit exceeded when throttling is enabled."
          }
        },
        "security": [],
        "description": "Public by design: completes signup for an anonymous pre-signup visitor; the invitation token is the authorization.",
        "x-throttle": {
          "limit": 5,
          "ttlMs": 60000
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "managementApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Polyant-Key"
      },
      "instanceApiKey": {
        "type": "http",
        "scheme": "bearer"
      },
      "internalSecret": {
        "type": "apiKey",
        "in": "header",
        "name": "x-internal-auth",
        "description": "A shared secret (AUTH_INTERNAL_SECRET) exchanged only between the web and engine services, sent as the x-internal-auth header. Not available to external callers."
      },
      "sessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "authjs.session-token",
        "description": "The Auth.js session cookie, set by the web app's login flow. A service principal (a management API key) cannot satisfy this scheme -- routes using it reject non-user principals."
      },
      "sessionBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "The Auth.js session token supplied in the Authorization: Bearer header. A service principal (a management API key) cannot satisfy this scheme -- routes using it require a human user principal."
      }
    }
  },
  "tags": [
    {
      "name": "health",
      "description": "Routes in the \"health\" family."
    },
    {
      "name": "memories",
      "description": "Routes in the \"memories\" family."
    },
    {
      "name": "instances",
      "description": "Routes in the \"instances\" family."
    },
    {
      "name": "conversations",
      "description": "Routes in the \"conversations\" family."
    },
    {
      "name": "analytics",
      "description": "Routes in the \"analytics\" family."
    },
    {
      "name": "tools",
      "description": "Routes in the \"tools\" family."
    },
    {
      "name": "governance",
      "description": "Routes in the \"governance\" family."
    },
    {
      "name": "organizations",
      "description": "Routes in the \"organizations\" family."
    },
    {
      "name": "webhooks",
      "description": "Routes in the \"webhooks\" family."
    },
    {
      "name": "hook-functions",
      "description": "Routes in the \"hook-functions\" family."
    },
    {
      "name": "audit-logs",
      "description": "Routes in the \"audit-logs\" family."
    },
    {
      "name": "attachments",
      "description": "Routes in the \"attachments\" family."
    },
    {
      "name": "workspaces",
      "description": "Routes in the \"workspaces\" family."
    },
    {
      "name": "oauth",
      "description": "Routes in the \"oauth\" family."
    },
    {
      "name": "v1",
      "description": "Routes in the \"v1\" family."
    },
    {
      "name": "channels",
      "description": "Routes in the \"channels\" family."
    },
    {
      "name": "skills",
      "description": "Routes in the \"skills\" family."
    },
    {
      "name": "users",
      "description": "Routes in the \"users\" family."
    },
    {
      "name": "me",
      "description": "Routes in the \"me\" family."
    },
    {
      "name": "auth",
      "description": "Routes in the \"auth\" family."
    },
    {
      "name": "activity-stream",
      "description": "Routes in the \"activity-stream\" family."
    },
    {
      "name": "invitations",
      "description": "Routes in the \"invitations\" family."
    }
  ]
}
