{
  "openapi": "3.1.0",
  "info": {
    "title": "IOC Desk team API",
    "version": "0.5.1",
    "description": "Authenticated, single-team API used by the native desktop and browser. Send Authorization: Bearer <access-token>; never put credentials in URLs. Every operation rechecks identity kind, role, revocation, and applicable Enterprise entitlement. Human-invoked agents are advisory and cannot review, verify, or publish."
  },
  "servers": [
    {
      "url": "/",
      "description": "Use the origin of your self-hosted IOC Desk team server."
    }
  ],
  "security": [
    {
      "accessToken": []
    }
  ],
  "tags": [
    {
      "name": "Identity"
    },
    {
      "name": "Members"
    },
    {
      "name": "Workflows"
    },
    {
      "name": "Review"
    },
    {
      "name": "Publication"
    },
    {
      "name": "Feeds"
    },
    {
      "name": "Collaboration"
    },
    {
      "name": "Agents"
    },
    {
      "name": "Intelligence"
    },
    {
      "name": "Operations"
    }
  ],
  "paths": {
    "/api": {
      "get": {
        "operationId": "discoverApi",
        "summary": "Discover API and authenticated identity",
        "tags": [
          "Identity"
        ],
        "description": "Any valid current access token, including feed and external-agent tokens. This grants no access to other operations. The capability list describes server features, not grants to this token.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiDiscovery"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        }
      }
    },
    "/api/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "Download this OpenAPI contract",
        "tags": [
          "Identity"
        ],
        "description": "Any valid current access token, including feed and external-agent tokens. This grants no access to other operations.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "operationId": "getIdentity",
        "summary": "Read own identity and server license status",
        "tags": [
          "Identity"
        ],
        "description": "Any valid current access token, including feed and external-agent tokens. This grants no access to other operations. The checkout field is public purchase metadata for the matching publisher build, or null.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        }
      }
    },
    "/api/license/refresh": {
      "post": {
        "operationId": "refreshLicense",
        "summary": "Refresh the server subscription license",
        "tags": [
          "Operations"
        ],
        "description": "Human administrator. Developer test licenses require a new owner signature instead. One manual refresh runs at a time. An accepted refresh completes after a client disconnects.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "license": {
                      "$ref": "#/components/schemas/LicenseStatus"
                    },
                    "read_only": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "license",
                    "read_only"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "502": {
            "description": "Authority could not issue a verified current entitlement.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/users": {
      "get": {
        "operationId": "listUsers",
        "summary": "List stable team identities",
        "tags": [
          "Members"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    }
                  },
                  "required": [
                    "users"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createUser",
        "summary": "Create a human member and return its token once",
        "tags": [
          "Members"
        ],
        "description": "Human administrator; an active Enterprise entitlement is required. Reuse existing identities; duplicate active names are rejected.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUser"
              }
            }
          }
        }
      }
    },
    "/api/users/{id}": {
      "put": {
        "operationId": "changeUserRole",
        "summary": "Change a human member role",
        "tags": [
          "Members"
        ],
        "description": "Human administrator; an active Enterprise entitlement is required. Agent accounts must be managed in Agents.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamUserResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "viewer",
                      "reviewer",
                      "publisher",
                      "admin",
                      "feed_reader"
                    ]
                  }
                },
                "required": [
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": ""
          }
        ]
      },
      "delete": {
        "operationId": "revokeUser",
        "summary": "Revoke a member or agent while retaining attribution",
        "tags": [
          "Members"
        ],
        "description": "Human administrator; available after license expiry. The last active administrator is protected.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamUserResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": ""
          }
        ]
      }
    },
    "/api/users/{id}/rotate": {
      "post": {
        "operationId": "rotateAccessToken",
        "summary": "Replace an existing human or external-agent access token",
        "tags": [
          "Members"
        ],
        "description": "Human administrator; an active Enterprise entitlement is required. Managed agents have no exported token. Old tokens stop working immediately.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CredentialResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows": {
      "get": {
        "operationId": "listWorkflows",
        "summary": "List workflow names and revisions",
        "tags": [
          "Workflows"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Returns workflow summaries.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workflows": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowSummary"
                      }
                    }
                  },
                  "required": [
                    "workflows"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createWorkflow",
        "summary": "Create a reusable shared workflow",
        "tags": [
          "Workflows"
        ],
        "description": "Human administrator; an active Enterprise entitlement is required. The URL path segments \".\" and \"..\" cannot be workflow IDs.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "config": {
                    "$ref": "#/components/schemas/WorkflowConfig"
                  }
                },
                "required": [
                  "config"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/workflows/{id}": {
      "get": {
        "operationId": "getWorkflow",
        "summary": "Read workflow, current review, attribution, and gates",
        "tags": [
          "Workflows"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      },
      "put": {
        "operationId": "configureWorkflow",
        "summary": "Update workflow configuration at the expected revision",
        "tags": [
          "Workflows"
        ],
        "description": "Human administrator; an active Enterprise entitlement is required. ID is immutable; prepare a new complete snapshot after configuration changes.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 1
                  },
                  "config": {
                    "$ref": "#/components/schemas/WorkflowConfig"
                  }
                },
                "required": [
                  "expected_revision",
                  "config"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/prepare": {
      "post": {
        "operationId": "prepareWorkflow",
        "summary": "Import complete source snapshots",
        "tags": [
          "Review"
        ],
        "description": "Human reviewer, publisher, or administrator; active Enterprise required. Supply the current revision to avoid overwriting another analyst. Server time is authoritative; do not supply as_of.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareWorkflow"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/decisions": {
      "post": {
        "operationId": "decideIndicators",
        "summary": "Record human IOC decisions",
        "tags": [
          "Review"
        ],
        "description": "Human reviewer, publisher, or administrator; active Enterprise required. Supply the current revision to avoid overwriting another analyst.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecideWorkflow"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/renew": {
      "post": {
        "operationId": "renewIndicators",
        "summary": "Renew selected indicator validity",
        "tags": [
          "Review"
        ],
        "description": "Human reviewer, publisher, or administrator; active Enterprise required. Supply the current revision to avoid overwriting another analyst.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenewWorkflow"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/verify": {
      "post": {
        "operationId": "verifyIndicators",
        "summary": "Independently verify current decisions",
        "tags": [
          "Review"
        ],
        "description": "Human publisher or administrator; active Enterprise required. A person cannot independently verify their own decision. This optional evidence check is not required for publication.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyWorkflow"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/publish": {
      "post": {
        "operationId": "publishWorkflow",
        "summary": "Publish the exact gated reviewed candidate",
        "tags": [
          "Publication"
        ],
        "description": "Human publisher or administrator; active Enterprise required. Current publication gates must pass. May approve and publish their own reviewed work; independent decision verification is optional.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishWorkflow"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/validate": {
      "get": {
        "operationId": "validateWorkflow",
        "summary": "Read publication gates, approval status, and current candidate digest",
        "tags": [
          "Review"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Gate and digests are null before a review has been prepared.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "integer",
                      "format": "int64",
                      "minimum": 1
                    },
                    "gate": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": true
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "candidate_digest": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "expected_digest": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_request": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PublicationRequest"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "revision",
                    "gate",
                    "candidate_digest",
                    "expected_digest",
                    "publication_request"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/publication-requests": {
      "get": {
        "operationId": "listPublicationRequests",
        "summary": "Read the latest publication approval requests",
        "tags": [
          "Publication"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Returns the latest 100 requests, newest first, including resolved requests.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requests": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicationRequest"
                      },
                      "maxItems": 100
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "requests",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      },
      "post": {
        "operationId": "requestPublication",
        "summary": "Submit the exact reviewed candidate for Publisher approval",
        "tags": [
          "Publication"
        ],
        "description": "Human reviewer, publisher, or administrator; active Enterprise required. Supply the current revision to avoid overwriting another analyst. Saves an attributed pending request without changing the published feed. A Reviewer cannot approve it. Changes to the candidate make the request outdated.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestPublication"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/publication-requests/{request_id}/approve": {
      "post": {
        "operationId": "approvePublication",
        "summary": "Approve a pending request and publish its exact candidate",
        "tags": [
          "Publication"
        ],
        "description": "Human publisher or administrator; active Enterprise required. Current publication gates must pass. May approve and publish their own reviewed work; independent decision verification is optional. Requires the current revision and the pending request candidate digest. Approval and release publication are atomic; the response also includes release. A changed candidate cannot inherit approval of an older request. A lost-response replay requires the original resolver and same effective trimmed note; changed approval payloads return conflict.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovePublication"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          },
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Publication request ID returned by this workflow."
          }
        ]
      }
    },
    "/api/workflows/{id}/publication-requests/{request_id}/reject": {
      "post": {
        "operationId": "rejectPublication",
        "summary": "Reject a pending publication request with a reason",
        "tags": [
          "Publication"
        ],
        "description": "Human publisher or administrator; active Enterprise required. Requires the current revision and a pending request, but not passing publication gates. Records the resolver and reason. Does not change existing published feeds; the reviewer can prepare and submit a corrected candidate.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDetail"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectPublication"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          },
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Publication request ID returned by this workflow."
          }
        ]
      }
    },
    "/api/workflows/{id}/releases": {
      "get": {
        "operationId": "listReleases",
        "summary": "List immutable published releases",
        "tags": [
          "Publication"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "releases": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReleaseSummary"
                      }
                    }
                  },
                  "required": [
                    "releases"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/releases/{release_id}": {
      "get": {
        "operationId": "getRelease",
        "summary": "Read an immutable release",
        "tags": [
          "Publication"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "release": {
                      "$ref": "#/components/schemas/Release"
                    },
                    "actor_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "note": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "integer",
                      "format": "int64",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "release",
                    "actor_id",
                    "note",
                    "revision"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          },
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/releases/{release_id}/bundle": {
      "get": {
        "operationId": "downloadReleaseBundle",
        "summary": "Download the frozen release ZIP",
        "tags": [
          "Publication"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          },
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/feed/{format}": {
      "get": {
        "operationId": "getPublishedFeed",
        "summary": "Read the latest approved feed with ETag support",
        "tags": [
          "Feeds"
        ],
        "description": "Human or feed-reader token; external-agent tokens excluded. Returns only already-published immutable content; current candidate changes do not alter this feed.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              },
              "text/csv": {
                "schema": {}
              },
              "text/plain": {
                "schema": {}
              },
              "application/stix+json": {
                "schema": {}
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Content digest validator."
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "304": {
            "description": "The ETag matches; no response body."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "txt",
                "json",
                "stix",
                "delta"
              ]
            },
            "description": ""
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": ""
          }
        ]
      }
    },
    "/api/audit": {
      "get": {
        "operationId": "listTeamAudit",
        "summary": "Read persistent audit events",
        "tags": [
          "Collaboration"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Use next_after while has_more is true. Pages may stop before the requested count to keep full record details within 8 MiB, with one record guaranteed if events remain.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditEvent"
                      }
                    },
                    "next_after": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "events",
                    "next_after",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": ""
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/audit": {
      "get": {
        "operationId": "listWorkflowAudit",
        "summary": "Read persistent audit events",
        "tags": [
          "Collaboration"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Use next_after while has_more is true. Pages may stop before the requested count to keep full record details within 8 MiB, with one record guaranteed if events remain.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditEvent"
                      }
                    },
                    "next_after": {
                      "type": "integer",
                      "format": "int64"
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "events",
                    "next_after",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": ""
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": ""
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "description": ""
          }
        ]
      }
    },
    "/api/collaboration/sync": {
      "post": {
        "operationId": "syncCollaboration",
        "summary": "Heartbeat, current identity, and bounded live messages/activity/job status",
        "tags": [
          "Collaboration"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Poll about every two seconds. user is the current authenticated identity; clients should refresh role controls from it without discarding drafts. Reset cursors when changing rooms. A zero cursor returns the latest100 messages/events; presence expires after30 seconds. Live audit details are bounded to16KiB per event; full audit endpoints retain original details.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncRequest"
              }
            }
          }
        }
      }
    },
    "/api/collaboration/leave": {
      "post": {
        "operationId": "leaveCollaboration",
        "summary": "Remove this identity's specified presence session",
        "tags": [
          "Collaboration"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "left": {
                      "const": true
                    }
                  },
                  "required": [
                    "left"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "session_id"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/chat/messages": {
      "get": {
        "operationId": "getChatHistory",
        "summary": "Read older messages in one room",
        "tags": [
          "Collaboration"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Results are oldest first. Request the next older page with before=next_before.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messages": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Message"
                      }
                    },
                    "next_before": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "format": "int64"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "messages",
                    "next_before",
                    "has_more"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workflow_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Omit for the team room or across-team graph; do not send the literal string null."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": ""
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": ""
          }
        ]
      },
      "post": {
        "operationId": "sendChatMessage",
        "summary": "Send, mention people, reply, or explicitly ask one agent",
        "tags": [
          "Collaboration"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. New messages require Enterprise. Keep client_message_id and content unchanged on retry. Reply and IOC attachment must belong to the same room. Only explicit agent_id queues one agent response; an @name string alone does not. External agents cannot post unsolicited messages.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    },
                    "deduplicated": {
                      "type": "boolean"
                    },
                    "agent_job": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/AgentJob"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "deduplicated",
                    "agent_job"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessage"
              }
            }
          }
        }
      }
    },
    "/api/chat/messages/{id}": {
      "put": {
        "operationId": "editChatMessage",
        "summary": "Edit a message authored by the current human member",
        "description": "Only the original human author may edit. Requires an active Enterprise entitlement and a matching edit version. Agent-invoking messages are immutable. Trims whitespace and rejects an empty body, >4,000 characters, >16,000 UTF-8 bytes, and unsupported control characters. Emits a chat edit event and audit entry; does not overwrite earlier published evidence.",
        "tags": [
          "Collaboration"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Positive server-assigned message ID.",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "body",
                  "expected_edit_version"
                ],
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Up to 16,000 UTF-8 bytes; line breaks and tabs allowed."
                  },
                  "expected_edit_version": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": 0,
                    "description": "Version from the previously fetched message."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated message, or unchanged if the body did not change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "message",
                    "unchanged"
                  ],
                  "properties": {
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    },
                    "unchanged": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed payload, invalid identifier, or query credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account role, identity kind, browser origin, author, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Workflow or chat message not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Edit version changed, or agent-linked message cannot be modified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds the endpoint limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request must have application/json content type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Server is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/chat/read": {
      "post": {
        "operationId": "markChatRead",
        "summary": "Advance the current member’s per-room read cursor",
        "description": "Human viewer, reviewer, publisher, or administrator. Without last_read_message_id, the server acknowledges the latest message in this room. Requested cursors are capped to the room latest and never decrease. Does not mark other rooms read.",
        "tags": [
          "Collaboration"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "workflow_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "pattern": "^[A-Za-z0-9_.-]{1,128}$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Omit or use null for the shared team room; otherwise use a current workflow ID."
                  },
                  "last_read_message_id": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "format": "int64",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Nonnegative message cursor; omit to acknowledge the latest message."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Read cursor and refreshed room/notification state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "last_read_id": {
                      "type": "integer",
                      "format": "int64",
                      "minimum": 0
                    },
                    "rooms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChatRoomSummary"
                      }
                    },
                    "notifications": {
                      "type": "array",
                      "maxItems": 30,
                      "items": {
                        "$ref": "#/components/schemas/ChatNotification"
                      }
                    }
                  },
                  "required": [
                    "last_read_id",
                    "rooms",
                    "notifications"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed payload, invalid identifier, or query credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account role, identity kind, browser origin, author, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Workflow or chat message not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds the endpoint limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request must have application/json content type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Server is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/chat/rooms": {
      "get": {
        "operationId": "listChatRooms",
        "summary": "List team and workflow chat rooms with per-member unread counters",
        "description": "Human viewer, reviewer, publisher, or administrator. Includes the shared team room and all workflows accessible on this team server; read positions are specific to this member.",
        "tags": [
          "Collaboration"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "rooms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChatRoomSummary"
                      }
                    }
                  },
                  "required": [
                    "rooms"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed payload, invalid identifier, or query credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account role, identity kind, browser origin, author, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Server is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/chat/notifications": {
      "get": {
        "operationId": "listChatNotifications",
        "summary": "Get recent incoming notifications for one room",
        "description": "Human viewer, reviewer, publisher, or administrator. At most 30 latest incoming messages, mentions, or replies. Omit workflow_id to query the shared team room.",
        "tags": [
          "Collaboration"
        ],
        "parameters": [
          {
            "name": "workflow_id",
            "in": "query",
            "required": false,
            "description": "Workflow room; omit for shared team room.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "maxItems": 30,
                      "items": {
                        "$ref": "#/components/schemas/ChatNotification"
                      }
                    }
                  },
                  "required": [
                    "notifications"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Malformed payload, invalid identifier, or query credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account role, identity kind, browser origin, author, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Workflow or chat message not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Server is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/graph": {
      "get": {
        "operationId": "getIocGraph",
        "summary": "Read graph relationships, evidence, and human attribution",
        "tags": [
          "Collaboration"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded. Derived URL/email components are labeled. No external lookup occurs. Node/edge/workflow/response-size omissions are disclosed.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Graph"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workflow_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Omit for the team room or across-team graph; do not send the literal string null."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 256
            },
            "description": ""
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 25,
              "maximum": 500,
              "default": 250
            },
            "description": ""
          }
        ]
      }
    },
    "/api/agents": {
      "get": {
        "operationId": "listAgents",
        "summary": "List available named agents without provider secrets",
        "tags": [
          "Agents"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Agent"
                      }
                    }
                  },
                  "required": [
                    "agents"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createAgent",
        "summary": "Create a managed model or external service-agent identity",
        "tags": [
          "Agents"
        ],
        "description": "Human administrator; an active Enterprise entitlement is required. Managed keys are write-only. External agents receive assigned context through claim/complete/fail only.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "$ref": "#/components/schemas/Agent"
                    },
                    "token": {
                      "type": "string",
                      "description": "External agent only; shown once."
                    }
                  },
                  "required": [
                    "agent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentConfig"
              }
            }
          }
        }
      }
    },
    "/api/agents/{id}": {
      "put": {
        "operationId": "updateAgent",
        "summary": "Update, enable, or disable a named agent",
        "tags": [
          "Agents"
        ],
        "description": "Human administrator; an active Enterprise entitlement is required. Submit the complete configuration. Omitted non-secret settings take their defaults and kind is immutable. On a URL change, replace the existing key or clear it explicitly. Reconfiguration invalidates outstanding jobs.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "$ref": "#/components/schemas/Agent"
                    }
                  },
                  "required": [
                    "agent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentConfig"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": ""
          }
        ]
      }
    },
    "/api/agent-jobs": {
      "get": {
        "operationId": "listAgentJobs",
        "summary": "Read agent requests in the selected chat room",
        "tags": [
          "Agents"
        ],
        "description": "Human viewer, reviewer, publisher, or administrator. Agent and feed credentials are excluded.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AgentJob"
                      }
                    }
                  },
                  "required": [
                    "jobs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workflow_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Stable workflow identifier; use the value returned by /api/workflows.",
              "pattern": "^[A-Za-z0-9_.-]{1,128}$",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Omit for the team room or across-team graph; do not send the literal string null."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": ""
          }
        ]
      }
    },
    "/api/agent-jobs/{id}/cancel": {
      "post": {
        "operationId": "cancelAgentJob",
        "summary": "Cancel an explicit agent request",
        "tags": [
          "Agents"
        ],
        "description": "The requesting human or an administrator. Cancellation is available in read-only mode and discards late output. An already-started provider request may still incur charges.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "$ref": "#/components/schemas/AgentJob"
                    }
                  },
                  "required": [
                    "job"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_attempt": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  }
                },
                "required": [
                  "expected_attempt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": ""
          }
        ]
      }
    },
    "/api/agent-jobs/{id}/retry": {
      "post": {
        "operationId": "retryAgentJob",
        "summary": "Retry an explicit agent request",
        "tags": [
          "Agents"
        ],
        "description": "The requesting human or an administrator. Retry requires Enterprise and is limited to three attempts. Repeating the same expected_attempt is idempotent.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "$ref": "#/components/schemas/AgentJob"
                    }
                  },
                  "required": [
                    "job"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_attempt": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  }
                },
                "required": [
                  "expected_attempt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": ""
          }
        ]
      }
    },
    "/api/agent-jobs/claim": {
      "post": {
        "operationId": "claimAssignedAgentJob",
        "summary": "Claim one explicitly assigned external-agent job",
        "tags": [
          "Agents"
        ],
        "description": "An enabled external-agent identity with active Enterprise. Reuse client_claim_id after an unknown response. Context contains the human request, explicit reply ancestors, and attached IOC evidence. Idle returns job:null.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/AgentJob"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lease_token": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "lease_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "context": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "job"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_claim_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "client_claim_id"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/agent-jobs/{id}/complete": {
      "post": {
        "operationId": "completeAssignedAgentJob",
        "summary": "Post one answer under the active assigned lease",
        "tags": [
          "Agents"
        ],
        "description": "Assigned external-agent token, current lease and active Enterprise for new answers. An identical completed answer is idempotent. A changed answer for a completed lease returns 409.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "$ref": "#/components/schemas/AgentJob"
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    },
                    "deduplicated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "job",
                    "message",
                    "deduplicated"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lease_token": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "required": [
                  "lease_token",
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": ""
          }
        ]
      }
    },
    "/api/agent-jobs/{id}/fail": {
      "post": {
        "operationId": "failAssignedAgentJob",
        "summary": "Mark the assigned external-agent attempt failed",
        "tags": [
          "Agents"
        ],
        "description": "External-agent token for this job only. No automatic provider retry is performed.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "job": {
                      "$ref": "#/components/schemas/AgentJob"
                    }
                  },
                  "required": [
                    "job"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed request, invalid Host, or credentials supplied in a query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account kind/role, browser origin, or Enterprise entitlement does not permit this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, lease, attempt, or idempotency conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The request requires application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate or queue capacity limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "An internal error prevented the operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service is temporarily busy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Team admission retry delay in seconds when present."
              }
            }
          },
          "408": {
            "description": "JSON body read deadline elapsed before application processing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lease_token": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "error": {
                    "type": "string",
                    "description": "Brief private runner error, at most1,000 UTF-8 bytes. Public status uses a fixed sanitized explanation."
                  }
                },
                "required": [
                  "lease_token",
                  "error"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": ""
          }
        ]
      }
    },
    "/api/workflows/{id}/enrichment": {
      "get": {
        "operationId": "getWorkflowEnrichment",
        "summary": "Read the last shared advisory reputation report and lookup status",
        "description": "Authorized human viewers can read team-scoped results. The stale flag indicates that the workflow review changed after the external lookup.",
        "tags": [
          "Intelligence"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Existing workflow ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Saved report, provider configuration names, and active-job status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workflow_id": {
                      "type": "string"
                    },
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "job": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "startWorkflowEnrichment",
        "summary": "Start a bounded, human-consented reputation lookup for 1–100 indicator IDs",
        "description": "Requires a reviewer/publisher/admin and active Enterprise entitlement. Provider credentials are configured in the team server process environment, never supplied by the client. External lookups execute in the background without holding the team database lock. Results are advisory and cannot change decisions or publish a feed.",
        "tags": [
          "Intelligence"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Existing workflow ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_revision",
                  "ids",
                  "consent"
                ],
                "properties": {
                  "expected_revision": {
                    "type": "integer"
                  },
                  "ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true,
                    "items": {
                      "type": "string"
                    }
                  },
                  "consent": {
                    "type": "boolean",
                    "const": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Lookup admitted; poll GET for results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "accessToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "IOCDesk access token",
        "description": "An individual human, feed integration, or external-agent credential. Permission is checked for every operation."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "reviewer",
              "publisher",
              "admin",
              "feed_reader"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "human",
              "managed_agent",
              "external_agent"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "kind",
          "created_at",
          "revoked_at"
        ],
        "additionalProperties": false
      },
      "LicenseStatus": {
        "type": "object",
        "properties": {
          "pro": {
            "type": "boolean"
          },
          "label": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "pro",
          "label",
          "message",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "EnterpriseCheckout": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_slug": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "price_display": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "organization_id",
          "organization_slug",
          "product_id",
          "price_display"
        ],
        "additionalProperties": false
      },
      "Identity": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "license": {
            "$ref": "#/components/schemas/LicenseStatus"
          },
          "read_only": {
            "type": "boolean"
          },
          "team": {
            "type": "object",
            "additionalProperties": true
          },
          "checkout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnterpriseCheckout"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "user",
          "license",
          "read_only",
          "team",
          "checkout"
        ],
        "additionalProperties": false
      },
      "CreateUser": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "1–200 UTF-8 bytes without control characters; active names must be unique."
          },
          "role": {
            "type": "string",
            "enum": [
              "viewer",
              "reviewer",
              "publisher",
              "admin",
              "feed_reader"
            ]
          }
        },
        "required": [
          "name",
          "role"
        ],
        "additionalProperties": false
      },
      "CredentialResult": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "token": {
            "type": "string",
            "writeOnly": false,
            "description": "Returned once. Store privately; later reads never return it."
          }
        },
        "required": [
          "user",
          "token"
        ],
        "additionalProperties": true
      },
      "TeamUserResult": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user"
        ],
        "additionalProperties": false
      },
      "ReleasedIndicator": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ipv4",
              "ipv6",
              "domain",
              "url",
              "email",
              "md5",
              "sha1",
              "sha256",
              "sha512"
            ]
          },
          "value": {
            "type": "string"
          },
          "stix_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "modified_at": {
            "type": "string",
            "format": "date-time"
          },
          "valid_from": {
            "type": "string",
            "format": "date-time"
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "kind",
          "value",
          "stix_id",
          "created_at",
          "modified_at",
          "valid_from",
          "valid_until"
        ],
        "additionalProperties": false
      },
      "ReleaseDelta": {
        "type": "object",
        "properties": {
          "baseline_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "added": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReleasedIndicator"
            }
          },
          "updated": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReleasedIndicator"
            }
          },
          "removed": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "required": [
          "baseline_id",
          "added",
          "updated",
          "removed"
        ],
        "additionalProperties": false
      },
      "Release": {
        "type": "object",
        "properties": {
          "schema_version": {
            "const": 1
          },
          "id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string",
            "description": "Stable workflow identifier; use the value returned by /api/workflows.",
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "minLength": 1,
            "maxLength": 128
          },
          "client_id": {
            "type": "string"
          },
          "candidate_digest": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "indicators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReleasedIndicator"
            }
          },
          "delta": {
            "$ref": "#/components/schemas/ReleaseDelta"
          },
          "digest": {
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "id",
          "workflow_id",
          "client_id",
          "candidate_digest",
          "created_at",
          "indicators",
          "delta",
          "digest"
        ],
        "additionalProperties": false
      },
      "ReleaseSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "digest": {
            "type": "string"
          },
          "candidate_digest": {
            "type": "string"
          },
          "indicator_count": {
            "type": "integer",
            "format": "int64"
          },
          "actor_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "created_at",
          "digest",
          "candidate_digest",
          "indicator_count",
          "actor_id",
          "note",
          "revision"
        ],
        "additionalProperties": false
      },
      "WorkflowSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable workflow identifier; use the value returned by /api/workflows.",
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "minLength": 1,
            "maxLength": 128
          },
          "name": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "has_run": {
            "type": "boolean"
          },
          "latest_release_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pending_publication_request": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "revision",
          "updated_at",
          "has_run",
          "latest_release_id",
          "pending_publication_request"
        ],
        "additionalProperties": false
      },
      "FieldMapping": {
        "type": "object",
        "properties": {
          "value_field": {
            "type": "string"
          },
          "type_field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fixed_kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ipv4",
                  "ipv6",
                  "domain",
                  "url",
                  "email",
                  "md5",
                  "sha1",
                  "sha256",
                  "sha512"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "value_field"
        ],
        "additionalProperties": false,
        "description": "Choose exactly one type_field or fixed_kind. value_field and type_field must be distinct nonempty field names of at most 256 UTF-8 bytes.",
        "oneOf": [
          {
            "required": [
              "type_field"
            ],
            "properties": {
              "type_field": {
                "type": "string",
                "minLength": 1
              },
              "fixed_kind": {
                "type": "null"
              }
            }
          },
          {
            "required": [
              "fixed_kind"
            ],
            "properties": {
              "fixed_kind": {
                "type": "string",
                "enum": [
                  "ipv4",
                  "ipv6",
                  "domain",
                  "url",
                  "email",
                  "md5",
                  "sha1",
                  "sha256",
                  "sha512"
                ]
              },
              "type_field": {
                "type": "null"
              }
            }
          }
        ]
      },
      "WorkflowSource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable configured source identifier; use this same value as a prepare input name.",
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "minLength": 1,
            "maxLength": 128
          },
          "format": {
            "type": "string",
            "enum": [
              "text",
              "csv",
              "json"
            ]
          },
          "complete_snapshot": {
            "const": true
          },
          "mapping": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FieldMapping"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "format",
          "complete_snapshot"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "format": {
                  "const": "text"
                }
              }
            },
            "then": {
              "properties": {
                "mapping": {
                  "type": "null"
                }
              }
            },
            "else": {
              "required": [
                "mapping"
              ],
              "properties": {
                "mapping": {
                  "$ref": "#/components/schemas/FieldMapping"
                }
              }
            }
          }
        ]
      },
      "Profile": {
        "type": "object",
        "properties": {
          "schema_version": {
            "const": 1
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "allowed_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ipv4",
                "ipv6",
                "domain",
                "url",
                "email",
                "md5",
                "sha1",
                "sha256",
                "sha512"
              ]
            },
            "minItems": 1,
            "uniqueItems": true
          },
          "warning_lists": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarningList"
            },
            "maxItems": 100
          },
          "require_reason_for_warnings": {
            "type": "boolean"
          },
          "require_all_reviewed": {
            "type": "boolean"
          },
          "export": {
            "type": "object",
            "properties": {
              "defang": {
                "type": "boolean"
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "heading": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "field",
                    "heading"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 32
              }
            },
            "required": [
              "defang",
              "columns"
            ],
            "additionalProperties": false
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "WorkflowPolicy": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "description": "Stable client identifier for this workflow; 1–128 ASCII letters, digits, underscore, hyphen, or dot.",
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "minLength": 1,
            "maxLength": 128
          },
          "ttl_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3650
          },
          "max_removal_percent": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "allow_empty": {
            "type": "boolean"
          },
          "require_separate_publisher": {
            "type": "boolean",
            "description": "Legacy local-CLI guard: when true, use authenticated server publication. On the team server, Publisher/Administrator may approve and publish their own work; Reviewer submissions require their approval regardless of this flag."
          },
          "require_reason_for_kept": {
            "type": "boolean"
          },
          "block_import_issues": {
            "type": "boolean"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "WorkflowConfig": {
        "type": "object",
        "properties": {
          "schema_version": {
            "const": 1
          },
          "id": {
            "type": "string",
            "description": "Stable workflow identifier; use the value returned by /api/workflows.",
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "minLength": 1,
            "maxLength": 128
          },
          "name": {
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/Profile"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowSource"
            },
            "minItems": 1,
            "maxItems": 200
          },
          "policy": {
            "$ref": "#/components/schemas/WorkflowPolicy"
          }
        },
        "required": [
          "schema_version",
          "id",
          "name",
          "profile",
          "sources",
          "policy"
        ],
        "additionalProperties": false
      },
      "WorkflowDetail": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "config": {
            "$ref": "#/components/schemas/WorkflowConfig"
          },
          "config_stale": {
            "type": "boolean"
          },
          "reanalysis_required": {
            "type": "boolean"
          },
          "run": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "candidate_digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "gate": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_actors": {
            "type": "object",
            "additionalProperties": true
          },
          "decision_approvals": {
            "type": "object",
            "additionalProperties": true
          },
          "latest_release": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Release"
              },
              {
                "type": "null"
              }
            ]
          },
          "release": {
            "$ref": "#/components/schemas/Release"
          },
          "publication_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicationRequest"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "revision",
          "config",
          "config_stale",
          "reanalysis_required",
          "run",
          "candidate_digest",
          "expected_digest",
          "gate",
          "decision_actors",
          "decision_approvals",
          "latest_release",
          "publication_request"
        ],
        "additionalProperties": true
      },
      "PrepareWorkflow": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "inputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The corresponding configured source ID, not an arbitrary filename."
                },
                "content": {
                  "type": "string"
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "text",
                    "csv",
                    "json"
                  ]
                }
              },
              "required": [
                "name",
                "content",
                "format"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 200
          }
        },
        "required": [
          "expected_revision",
          "inputs"
        ],
        "additionalProperties": false,
        "description": "Provide each configured complete snapshot. Combined source content is limited to 20 MiB; HTTP JSON is limited to 32 MiB. Server time is authoritative: omit as_of."
      },
      "DecideWorkflow": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "minItems": 1,
            "maxItems": 50000,
            "uniqueItems": true
          },
          "state": {
            "type": "string",
            "enum": [
              "keep",
              "exclude",
              "needs_review"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "expected_revision",
          "ids",
          "state",
          "reason"
        ],
        "additionalProperties": false
      },
      "RenewWorkflow": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "minItems": 1,
            "maxItems": 50000,
            "uniqueItems": true
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "expected_revision",
          "ids",
          "reason"
        ],
        "additionalProperties": false
      },
      "VerifyWorkflow": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "expected_digest": {
            "type": "string"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "minItems": 1,
            "maxItems": 50000,
            "uniqueItems": true
          },
          "note": {
            "type": "string",
            "description": "At most 8,000 UTF-8 bytes."
          }
        },
        "required": [
          "expected_revision",
          "expected_digest",
          "ids"
        ],
        "additionalProperties": false
      },
      "PublishWorkflow": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "expected_digest": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "description": "At most 8,000 UTF-8 bytes."
          }
        },
        "required": [
          "expected_revision",
          "expected_digest"
        ],
        "additionalProperties": false
      },
      "Mention": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "human",
              "managed_agent",
              "external_agent"
            ]
          }
        },
        "required": [
          "user_id",
          "name",
          "kind"
        ],
        "additionalProperties": false
      },
      "Message": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "client_message_id": {
            "type": "string",
            "format": "uuid"
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "actor_id": {
            "type": "string",
            "format": "uuid"
          },
          "actor_name": {
            "type": "string"
          },
          "actor_kind": {
            "type": "string",
            "enum": [
              "human",
              "managed_agent",
              "external_agent"
            ]
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "indicator": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "ipv4",
                      "ipv6",
                      "domain",
                      "url",
                      "email",
                      "md5",
                      "sha1",
                      "sha256",
                      "sha512"
                    ]
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "value"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_to": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "mentions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mention"
            }
          },
          "agent_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "agent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentMessage"
              },
              {
                "type": "null"
              }
            ]
          },
          "edited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "edit_version": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Optimistic concurrency version for PUT /api/chat/messages/{id}."
          }
        },
        "required": [
          "id",
          "client_message_id",
          "workflow_id",
          "actor_id",
          "actor_name",
          "body",
          "created_at",
          "actor_kind",
          "indicator",
          "reply_to",
          "mentions",
          "agent_request",
          "agent",
          "edited_at",
          "edit_version"
        ],
        "additionalProperties": true
      },
      "SendMessage": {
        "type": "object",
        "properties": {
          "client_message_id": {
            "type": "string",
            "format": "uuid"
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "Plain text, at most 16,000 UTF-8 bytes. No unsupported controls."
          },
          "indicator_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_to": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "agent_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "mention_user_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 20,
            "uniqueItems": true
          }
        },
        "required": [
          "client_message_id",
          "body"
        ],
        "additionalProperties": false
      },
      "AgentConfig": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "1–200 UTF-8 bytes, trimmed, without control characters; active names must be unique."
          },
          "kind": {
            "type": "string",
            "enum": [
              "managed",
              "external"
            ]
          },
          "enabled": {
            "type": "boolean",
            "default": true
          },
          "description": {
            "type": "string",
            "description": "At most 2,000 UTF-8 bytes; tab and newlines are permitted."
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "Managed agents: HTTPS API base URL; HTTP allowed only on loopback. At most 2,048 UTF-8 bytes; no embedded credentials, query, or fragment."
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "1–200 UTF-8 bytes, trimmed, without control characters."
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "type": "string",
            "description": "At most 8,000 UTF-8 bytes; tab and newlines are permitted."
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string",
                "writeOnly": true,
                "description": "Write-only. After trimming, 1–8,192 printable ASCII bytes with no spaces. Omitted/null preserves the existing key; never returned.",
                "minLength": 1,
                "maxLength": 8192
              },
              {
                "type": "null"
              }
            ]
          },
          "clear_api_key": {
            "type": "boolean",
            "default": false
          },
          "max_output_tokens": {
            "type": "integer",
            "minimum": 128,
            "maximum": 4096,
            "default": 1024
          },
          "token_limit_field": {
            "type": "string",
            "enum": [
              "auto",
              "max_tokens",
              "max_completion_tokens"
            ],
            "default": "auto"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "kind": {
                  "const": "managed"
                }
              }
            },
            "then": {
              "required": [
                "endpoint",
                "model"
              ],
              "properties": {
                "endpoint": {
                  "type": "string",
                  "format": "uri"
                },
                "model": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "const": "external"
                }
              }
            },
            "then": {
              "properties": {
                "endpoint": {
                  "type": "null"
                },
                "model": {
                  "type": "null"
                },
                "api_key": {
                  "type": "null"
                }
              }
            }
          },
          {
            "if": {
              "required": [
                "clear_api_key"
              ],
              "properties": {
                "clear_api_key": {
                  "const": true
                }
              }
            },
            "then": {
              "properties": {
                "api_key": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "Agent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "managed",
              "external"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "type": "string",
            "description": "Included for human administrators only."
          },
          "api_key_configured": {
            "type": "boolean"
          },
          "config_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "max_output_tokens": {
            "type": "integer",
            "format": "int64"
          },
          "token_limit_field": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "name",
          "kind",
          "enabled",
          "api_key_configured",
          "config_revision"
        ],
        "additionalProperties": true
      },
      "AgentJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "agent_name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "trigger_message_id": {
            "type": "integer",
            "format": "int64"
          },
          "requested_by": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_message_id": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "context_revision": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "context_truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "agent_id",
          "workflow_id",
          "trigger_message_id",
          "requested_by",
          "status",
          "attempt"
        ],
        "additionalProperties": true
      },
      "SyncRequest": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "view": {
            "type": "string",
            "enum": [
              "overview",
              "review",
              "graph",
              "chat"
            ]
          },
          "selected_ioc": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "after_activity": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "after_message": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "typing": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "session_id",
          "view"
        ],
        "additionalProperties": false
      },
      "AuditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "actor_id": {
            "type": "string",
            "format": "uuid"
          },
          "actor_name": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "revision": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "content_hash": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          },
          "details_truncated": {
            "type": "boolean"
          },
          "details_bytes": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "id",
          "actor_id",
          "actor_name",
          "action",
          "created_at",
          "content_hash",
          "details"
        ],
        "additionalProperties": true
      },
      "SyncResult": {
        "type": "object",
        "properties": {
          "server_time": {
            "type": "string",
            "format": "date-time"
          },
          "enterprise": {
            "type": "boolean"
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "workflow_revision": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "activity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditEvent"
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "presence": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "next_activity": {
            "type": "integer",
            "format": "int64"
          },
          "next_message": {
            "type": "integer",
            "format": "int64"
          },
          "has_more": {
            "type": "boolean"
          },
          "activity_has_more": {
            "type": "boolean"
          },
          "messages_has_more": {
            "type": "boolean"
          },
          "messages_has_older": {
            "type": "boolean"
          },
          "agent_jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentJob"
            }
          },
          "agent_catalog_revision": {
            "type": "integer",
            "format": "int64"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "server_time",
          "enterprise",
          "activity",
          "messages",
          "presence",
          "next_activity",
          "next_message",
          "user"
        ],
        "additionalProperties": true
      },
      "GraphNode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ioc",
              "source",
              "workflow",
              "member",
              "host"
            ]
          },
          "label": {
            "type": "string"
          },
          "indicator_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "indicator_kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ipv4",
                  "ipv6",
                  "domain",
                  "url",
                  "email",
                  "md5",
                  "sha1",
                  "sha256",
                  "sha512"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "id",
          "kind",
          "label",
          "details"
        ],
        "additionalProperties": true
      },
      "GraphEdge": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string",
            "description": "Stable workflow identifier; use the value returned by /api/workflows.",
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "minLength": 1,
            "maxLength": 128
          },
          "evidence": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "id",
          "source",
          "target",
          "kind",
          "evidence"
        ],
        "additionalProperties": true
      },
      "Graph": {
        "type": "object",
        "properties": {
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Stable workflow identifier; use the value returned by /api/workflows.",
                "pattern": "^[A-Za-z0-9_.-]{1,128}$",
                "minLength": 1,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "workflow_revision": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GraphNode"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GraphEdge"
            }
          },
          "counts": {
            "type": "object",
            "additionalProperties": true
          },
          "truncated": {
            "type": "boolean"
          },
          "truncation": {
            "type": "object",
            "additionalProperties": true
          },
          "notice": {
            "type": "string"
          }
        },
        "required": [
          "nodes",
          "edges",
          "counts",
          "truncated",
          "truncation"
        ],
        "additionalProperties": true
      },
      "WarningList": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "At most 256 UTF-8 bytes."
          },
          "version": {},
          "description": {
            "type": "string",
            "description": "At most 64 KiB of UTF-8 text."
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "hostname",
              "cidr",
              "substring"
            ],
            "default": "string"
          },
          "list": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "At most 4,096 UTF-8 bytes."
            },
            "maxItems": 100000
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "AgentRequest": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "integer",
            "format": "int64"
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "job_id",
          "agent_id"
        ],
        "additionalProperties": false
      },
      "AgentMessage": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "managed",
              "external"
            ]
          },
          "job_id": {
            "type": "integer",
            "format": "int64"
          },
          "model": {
            "type": "string"
          },
          "triggered_by": {
            "type": "string",
            "format": "uuid"
          },
          "context_revision": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "truncated": {
            "type": "boolean",
            "description": "True if the generated answer was shortened to the chat limit; job.context_truncated describes context shortening separately."
          }
        },
        "required": [
          "agent_id",
          "kind",
          "job_id",
          "model",
          "triggered_by",
          "context_revision",
          "truncated"
        ],
        "additionalProperties": false
      },
      "ApiDiscovery": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "openapi": {
            "type": "string"
          },
          "identity": {
            "type": "string"
          },
          "authentication": {
            "type": "object",
            "properties": {
              "type": {
                "const": "bearer"
              },
              "header": {
                "const": "Authorization"
              },
              "tokens_in_urls": {
                "const": false
              }
            },
            "required": [
              "type",
              "header",
              "tokens_in_urls"
            ],
            "additionalProperties": false
          },
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "role": {
                "type": "string",
                "enum": [
                  "viewer",
                  "reviewer",
                  "publisher",
                  "admin",
                  "feed_reader"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "human",
                  "managed_agent",
                  "external_agent"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "role",
              "kind"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Server features, not the permissions granted to the current token. Each operation enforces its documented identity and role."
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "version",
          "openapi",
          "identity",
          "authentication",
          "user",
          "capabilities",
          "note"
        ],
        "additionalProperties": false
      },
      "PublicationRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "workflow_id": {
            "type": "string",
            "description": "Stable workflow identifier; use the value returned by /api/workflows.",
            "pattern": "^[A-Za-z0-9_.-]{1,128}$",
            "minLength": 1,
            "maxLength": 128
          },
          "requester_id": {
            "type": "string",
            "format": "uuid"
          },
          "requester_name": {
            "type": "string"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "requested_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "candidate_digest": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "outdated"
            ]
          },
          "resolved_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolver_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolution_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "release_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workflow_id",
          "requester_id",
          "requester_name",
          "requested_at",
          "requested_revision",
          "candidate_digest",
          "note",
          "status",
          "resolved_by",
          "resolver_name",
          "resolved_at",
          "resolution_note",
          "release_id"
        ],
        "additionalProperties": false
      },
      "RequestPublication": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "expected_digest": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "description": "Optional submission note, at most 8,000 UTF-8 bytes."
          }
        },
        "required": [
          "expected_revision",
          "expected_digest"
        ],
        "additionalProperties": false
      },
      "ApprovePublication": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "expected_digest": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "description": "Optional approval/publication note, at most 8,000 UTF-8 bytes."
          }
        },
        "required": [
          "expected_revision",
          "expected_digest"
        ],
        "additionalProperties": false
      },
      "RejectPublication": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "description": "Required rejection reason after trimming, at most 8,000 UTF-8 bytes."
          }
        },
        "required": [
          "expected_revision",
          "reason"
        ],
        "additionalProperties": false
      },
      "ChatRoomSummary": {
        "type": "object",
        "description": "One team or workflow discussion room, with read state specific to the requesting member.",
        "additionalProperties": false,
        "properties": {
          "room_key": {
            "type": "string",
            "description": "team for the shared room; workflow:<id> for a workflow room."
          },
          "workflow_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.-]{1,128}$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Omit or use null for the shared team room; otherwise use a current workflow ID."
          },
          "name": {
            "type": "string"
          },
          "last_message_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "last_read_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "unread": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "mentions": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "Unread mentions and replies to this member."
          }
        },
        "required": [
          "room_key",
          "workflow_id",
          "name",
          "last_message_id",
          "last_read_id",
          "unread",
          "mentions"
        ]
      },
      "ChatNotification": {
        "type": "object",
        "description": "An incoming message or mention in the requested room, including read/edit status.",
        "additionalProperties": false,
        "properties": {
          "message_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "actor_name": {
            "type": "string"
          },
          "preview": {
            "type": "string",
            "description": "Truncated message preview, at most 240 Unicode characters."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "unread": {
            "type": "boolean"
          },
          "mention": {
            "type": "boolean"
          },
          "reply": {
            "type": "boolean"
          },
          "edited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "message_id",
          "actor_name",
          "preview",
          "created_at",
          "unread",
          "mention",
          "reply",
          "edited_at"
        ]
      }
    }
  }
}
