{
 "openapi": "3.1.0",
 "info": {
  "title": "Stateset next-temporal-rs Engine API",
  "version": "0.1.2",
  "description": "REST API for the Rust Temporal workflow engine: workflow start/status/cancel, multi-tenant brand/connector control plane, inbound channel webhooks, billing, and ops. Most /v1 endpoints require an x-api-key (or Bearer token); inbound webhooks are authenticated by per-provider signatures; health/metrics are public."
 },
 "servers": [
  {
   "url": "https://api.workstream.stateset.com"
  }
 ],
 "tags": [
  {
   "name": "Auth (WorkOS)"
  },
  {
   "name": "Bootstrap"
  },
  {
   "name": "Brands"
  },
  {
   "name": "Claim"
  },
  {
   "name": "Connectors"
  },
  {
   "name": "Dispatch"
  },
  {
   "name": "Fleet"
  },
  {
   "name": "Health"
  },
  {
   "name": "Inbound Events"
  },
  {
   "name": "Inbound Webhooks"
  },
  {
   "name": "MCP"
  },
  {
   "name": "Onboarding"
  },
  {
   "name": "Policy Sets"
  },
  {
   "name": "Scheduler"
  },
  {
   "name": "Workflow Templates"
  },
  {
   "name": "Workflow-Drafts"
  },
  {
   "name": "Workflow-Releases"
  },
  {
   "name": "Workflows"
  }
 ],
 "security": [
  {
   "ApiKeyAuth": []
  },
  {
   "BearerAuth": []
  }
 ],
 "paths": {
  "/v1/workflows/response/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start workflow",
    "operationId": "post_v1_workflows_response_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ResponseAutomationInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/response-automation-v2/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start rav2 workflow",
    "operationId": "post_v1_workflows_response_automation_v2_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ResponseAutomationV2Input"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/support-followup/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start support followup workflow",
    "operationId": "post_v1_workflows_support_followup_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/payment-recovery/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start payment recovery workflow",
    "operationId": "post_v1_workflows_payment_recovery_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/return-lifecycle/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start return lifecycle workflow",
    "operationId": "post_v1_workflows_return_lifecycle_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/subscription-retention/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start retention workflow",
    "operationId": "post_v1_workflows_subscription_retention_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/RetentionWorkflowInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/cohort-fanout/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start cohort fanout workflow",
    "operationId": "post_v1_workflows_cohort_fanout_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CohortFanoutInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/subscription-retention/trigger": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Trigger retention workflow",
    "operationId": "post_v1_workflows_subscription_retention_trigger",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/RetentionTriggerInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/warranty-automation-v2/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start warranty workflow",
    "operationId": "post_v1_workflows_warranty_automation_v2_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WarrantyWorkflowInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/warranty-automation-v2/trigger": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Trigger warranty workflow",
    "operationId": "post_v1_workflows_warranty_automation_v2_trigger",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WarrantyTriggerInput"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_slug}/warranty/inbound": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Ingest warranty webhook",
    "operationId": "post_v1_brands_brand_slug_warranty_inbound",
    "security": [
     {
      "ApiKeyAuth": [],
      "ZendeskWebhookSignature": []
     },
     {
      "BearerAuth": [],
      "ZendeskWebhookSignature": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WarrantyWebhookPayload"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/warranty-automation-v2/{workflow_id}/review": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Send warranty review signal",
    "operationId": "post_v1_workflows_warranty_automation_v2_workflow_id_review",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ReviewDecision"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/warranty-automation-v2/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel warranty",
    "operationId": "post_v1_workflows_warranty_automation_v2_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/warranty-automation-v2/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query warranty status",
    "operationId": "get_v1_workflows_warranty_automation_v2_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/scheduled-jobs": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Scheduler api",
    "operationId": "get_v1_brands_brand_id_scheduled_jobs",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   },
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Scheduler api",
    "operationId": "post_v1_brands_brand_id_scheduled_jobs",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/scheduled-jobs/run-due": {
   "post": {
    "tags": [
     "Scheduler"
    ],
    "summary": "Scheduler api",
    "operationId": "post_v1_scheduled_jobs_run_due",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/connector/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start connector workflow",
    "operationId": "post_v1_workflows_connector_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ConnectorWorkflowInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/sandbox-agent-loop/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start sandbox agent loop",
    "operationId": "post_v1_workflows_sandbox_agent_loop_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SandboxAgentLoopStartInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/active-horizon-agent/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/StartWorkflowResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "409": {
      "description": "Workflow release lifecycle or plan-hash conflict",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ActiveHorizonAgentStartInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/active-horizon-agent/validate": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Validate active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_validate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ActiveHorizonPreflightResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "409": {
      "description": "Workflow release lifecycle or plan-hash conflict",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ActiveHorizonAgentStartInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflow-releases/{release_id}/verify-test": {
   "post": {
    "tags": [
     "Workflow-Releases"
    ],
    "summary": "Verify workflow release test",
    "operationId": "post_v1_workflow_releases_release_id_verify_test",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowRecipeRelease"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "409": {
      "description": "Workflow release lifecycle or plan-hash conflict",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "release_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WorkflowReleaseTestInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflow-releases/{release_id}/approve": {
   "post": {
    "tags": [
     "Workflow-Releases"
    ],
    "summary": "Approve workflow release",
    "operationId": "post_v1_workflow_releases_release_id_approve",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowRecipeRelease"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "403": {
      "description": "Platform administrator or global workflow approver required",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "409": {
      "description": "Workflow release lifecycle or plan-hash conflict",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "release_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/workflow-releases/{release_id}/events": {
   "get": {
    "tags": [
     "Workflow-Releases"
    ],
    "summary": "List workflow release events",
    "operationId": "get_v1_workflow_releases_release_id_events",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/WorkflowRecipeReleaseEvent"
         }
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "release_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/workflow-drafts": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List workflow drafts",
    "operationId": "get_v1_brands_brand_id_workflow_drafts",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/WorkflowDraft"
         }
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   },
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Create workflow draft",
    "operationId": "post_v1_brands_brand_id_workflow_drafts",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "201": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowDraft"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CreateWorkflowDraftRequest"
       }
      }
     }
    }
   }
  },
  "/v1/workflow-drafts/{draft_id}": {
   "get": {
    "tags": [
     "Workflow-Drafts"
    ],
    "summary": "Get workflow draft",
    "operationId": "get_v1_workflow_drafts_draft_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowDraft"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "draft_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   },
   "patch": {
    "tags": [
     "Workflow-Drafts"
    ],
    "summary": "Update workflow draft",
    "operationId": "patch_v1_workflow_drafts_draft_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowDraft"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "409": {
      "description": "Workflow draft optimistic-version conflict",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "draft_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/UpdateWorkflowDraftRequest"
       }
      }
     }
    }
   }
  },
  "/v1/workflow-drafts/{draft_id}/releases": {
   "get": {
    "tags": [
     "Workflow-Drafts"
    ],
    "summary": "List workflow draft releases",
    "operationId": "get_v1_workflow_drafts_draft_id_releases",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/WorkflowRecipeRelease"
         }
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "draft_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/workflows/delivery-exception-callback/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start delivery exception callback",
    "operationId": "post_v1_workflows_delivery_exception_callback_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/order-fulfillment/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start order fulfillment",
    "operationId": "post_v1_workflows_order_fulfillment_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/order-fulfillment/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Order fulfillment status",
    "operationId": "get_v1_workflows_order_fulfillment_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/order-fulfillment/{workflow_id}/review": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Order fulfillment review",
    "operationId": "post_v1_workflows_order_fulfillment_workflow_id_review",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/order-fulfillment/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Order fulfillment cancel",
    "operationId": "post_v1_workflows_order_fulfillment_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/wholesale-order/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start wholesale order",
    "operationId": "post_v1_workflows_wholesale_order_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/wholesale-order/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Wholesale order status",
    "operationId": "get_v1_workflows_wholesale_order_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/wholesale-order/{workflow_id}/review": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Wholesale order review",
    "operationId": "post_v1_workflows_wholesale_order_workflow_id_review",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/wholesale-order/{workflow_id}/shipment": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Wholesale order shipment",
    "operationId": "post_v1_workflows_wholesale_order_workflow_id_shipment",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/wholesale-order/{workflow_id}/po-change": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Wholesale order po change",
    "operationId": "post_v1_workflows_wholesale_order_workflow_id_po_change",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/wholesale-order/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Wholesale order cancel",
    "operationId": "post_v1_workflows_wholesale_order_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/return/start": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Start return workflow",
    "operationId": "post_v1_workflows_return_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/return/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Return workflow status",
    "operationId": "get_v1_workflows_return_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/return/{workflow_id}/receipt": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Return workflow receipt",
    "operationId": "post_v1_workflows_return_workflow_id_receipt",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/return/{workflow_id}/inspection": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Return workflow inspection",
    "operationId": "post_v1_workflows_return_workflow_id_inspection",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/return/{workflow_id}/review": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Return workflow review",
    "operationId": "post_v1_workflows_return_workflow_id_review",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/return/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Return workflow cancel",
    "operationId": "post_v1_workflows_return_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/health": {
   "get": {
    "tags": [
     "Health"
    ],
    "summary": "Health",
    "operationId": "get_health",
    "security": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "503": {
      "description": "Unhealthy (DB/Temporal)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/healthz": {
   "get": {
    "tags": [
     "Health"
    ],
    "summary": "Healthz",
    "operationId": "get_healthz",
    "security": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/readyz": {
   "get": {
    "tags": [
     "Health"
    ],
    "summary": "Readyz",
    "operationId": "get_readyz",
    "security": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/metrics": {
   "get": {
    "tags": [
     "Health"
    ],
    "summary": "Metrics endpoint",
    "operationId": "get_metrics",
    "security": [],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/v1/mcp": {
   "post": {
    "tags": [
     "MCP"
    ],
    "summary": "Mcp",
    "operationId": "post_v1_mcp",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/mcp/workstream": {
   "post": {
    "tags": [
     "MCP"
    ],
    "summary": "Mcp",
    "operationId": "post_v1_mcp_workstream",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/claim/start": {
   "post": {
    "tags": [
     "Claim"
    ],
    "summary": "Claim",
    "operationId": "post_v1_claim_start",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/claim/verify": {
   "post": {
    "tags": [
     "Claim"
    ],
    "summary": "Claim",
    "operationId": "post_v1_claim_verify",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/onboarding/{brand_id}/test": {
   "post": {
    "tags": [
     "Onboarding"
    ],
    "summary": "Onboarding",
    "operationId": "post_v1_onboarding_brand_id_test",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/onboarding/{brand_id}/connect": {
   "post": {
    "tags": [
     "Onboarding"
    ],
    "summary": "Onboarding",
    "operationId": "post_v1_onboarding_brand_id_connect",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/response-automation-v2/{workflow_id}/review": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Send rav2 review signal",
    "operationId": "post_v1_workflows_response_automation_v2_workflow_id_review",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ReviewDecision"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/{workflow_id}/signal/review": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Send review signal",
    "operationId": "post_v1_workflows_workflow_id_signal_review",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ReviewDecision"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query workflow status",
    "operationId": "get_v1_workflows_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel workflow",
    "operationId": "post_v1_workflows_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/{workflow_id}/terminate": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Terminate workflow",
    "operationId": "post_v1_workflows_workflow_id_terminate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/response-automation-v2/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query rav2 status",
    "operationId": "get_v1_workflows_response_automation_v2_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/response-automation-v2/{workflow_id}/restart": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Restart rav2",
    "operationId": "post_v1_workflows_response_automation_v2_workflow_id_restart",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/{workflow_id}/events": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Stream workflow events",
    "operationId": "get_v1_workflows_workflow_id_events",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/sandbox-agent-loop/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query sandbox agent loop status",
    "operationId": "get_v1_workflows_sandbox_agent_loop_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query active horizon agent status",
    "operationId": "get_v1_workflows_active_horizon_agent_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ActiveHorizonAgentStatus"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/pause": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Pause active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_pause",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/resume": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Resume active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_resume",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/steer": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Steer active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_steer",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ActiveHorizonSteerInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/enqueue": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Enqueue active horizon agent task",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_enqueue",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/LongHorizonTask"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/reprioritize": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Reprioritize active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_reprioritize",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ActiveHorizonReprioritizeInput"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/extend-budget": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Extend active horizon agent budget",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_extend_budget",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ActiveHorizonBudgetExtension"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/active-horizon-agent/{workflow_id}/terminate": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Terminate active horizon agent",
    "operationId": "post_v1_workflows_active_horizon_agent_workflow_id_terminate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/sandbox-agent-loop/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel sandbox agent loop",
    "operationId": "post_v1_workflows_sandbox_agent_loop_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/delivery-exception-callback/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query delivery exception callback status",
    "operationId": "get_v1_workflows_delivery_exception_callback_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/delivery-exception-callback/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel delivery exception callback",
    "operationId": "post_v1_workflows_delivery_exception_callback_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/sandbox-agent-loop/{workflow_id}/terminate": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Terminate sandbox agent loop",
    "operationId": "post_v1_workflows_sandbox_agent_loop_workflow_id_terminate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/connector/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query connector status",
    "operationId": "get_v1_workflows_connector_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/snooze/{workflow_id}/status": {
   "get": {
    "tags": [
     "Workflows"
    ],
    "summary": "Query snooze status",
    "operationId": "get_v1_workflows_snooze_workflow_id_status",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowStatusResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflows/snooze/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel snooze",
    "operationId": "post_v1_workflows_snooze_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/snooze/{workflow_id}/terminate": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Terminate snooze",
    "operationId": "post_v1_workflows_snooze_workflow_id_terminate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/response-automation-v2/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel rav2",
    "operationId": "post_v1_workflows_response_automation_v2_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/response-automation-v2/{workflow_id}/terminate": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Terminate rav2",
    "operationId": "post_v1_workflows_response_automation_v2_workflow_id_terminate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/connector/{workflow_id}/cancel": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Cancel connector",
    "operationId": "post_v1_workflows_connector_workflow_id_cancel",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflows/connector/{workflow_id}/terminate": {
   "post": {
    "tags": [
     "Workflows"
    ],
    "summary": "Terminate connector",
    "operationId": "post_v1_workflows_connector_workflow_id_terminate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brands",
    "operationId": "get_v1_brands",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   },
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Create brand",
    "operationId": "post_v1_brands",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/BrandInput"
       }
      }
     }
    }
   }
  },
  "/v1/bootstrap/templates": {
   "get": {
    "tags": [
     "Bootstrap"
    ],
    "summary": "List bootstrap templates",
    "operationId": "get_v1_bootstrap_templates",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/connector-capabilities": {
   "get": {
    "tags": [
     "Connectors"
    ],
    "summary": "List connector capabilities",
    "operationId": "get_v1_connector_capabilities",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/bootstrap/brands": {
   "post": {
    "tags": [
     "Bootstrap"
    ],
    "summary": "Bootstrap brand",
    "operationId": "post_v1_bootstrap_brands",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/fleet/workflows": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "List fleet workflows",
    "operationId": "get_v1_fleet_workflows",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/fleet/outcomes": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "List fleet outcomes",
    "operationId": "get_v1_fleet_outcomes",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/fleet/scorecard": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "Get fleet quality scorecard",
    "operationId": "get_v1_fleet_scorecard",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/v1/fleet/outcomes/summary": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "Get fleet outcome summary",
    "operationId": "get_v1_fleet_outcomes_summary",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/v1/fleet/dispatch-dlq": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "List fleet dispatch dlq",
    "operationId": "get_v1_fleet_dispatch_dlq",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/fleet/billing": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "List fleet billing profiles",
    "operationId": "get_v1_fleet_billing",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/fleet/billing/periods": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "List fleet billing periods",
    "operationId": "get_v1_fleet_billing_periods",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/fleet/billing/reconciliation": {
   "get": {
    "tags": [
     "Fleet"
    ],
    "summary": "Get fleet billing reconciliation",
    "operationId": "get_v1_fleet_billing_reconciliation",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand",
    "operationId": "get_v1_brands_brand_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   },
   "patch": {
    "tags": [
     "Brands"
    ],
    "summary": "Update brand",
    "operationId": "patch_v1_brands_brand_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/BrandInput"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/billing": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand billing state",
    "operationId": "get_v1_brands_brand_id_billing",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   },
   "put": {
    "tags": [
     "Brands"
    ],
    "summary": "Upsert brand billing profile",
    "operationId": "put_v1_brands_brand_id_billing",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/billing/sync": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Sync brand billing events",
    "operationId": "post_v1_brands_brand_id_billing_sync",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/billing/contract": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand billing contract",
    "operationId": "get_v1_brands_brand_id_billing_contract",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   },
   "put": {
    "tags": [
     "Brands"
    ],
    "summary": "Upsert brand billing contract",
    "operationId": "put_v1_brands_brand_id_billing_contract",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/billing/periods": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand billing periods",
    "operationId": "get_v1_brands_brand_id_billing_periods",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/billing/periods/{period_id}/close": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Close brand billing period",
    "operationId": "post_v1_brands_brand_id_billing_periods_period_id_close",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "period_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/billing/rated-outcomes": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand rated outcomes",
    "operationId": "get_v1_brands_brand_id_billing_rated_outcomes",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/billing/reconciliation": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand billing reconciliation",
    "operationId": "get_v1_brands_brand_id_billing_reconciliation",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/connectors": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand connectors",
    "operationId": "get_v1_brands_brand_id_connectors",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/connectors/probe": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Probe connector config",
    "operationId": "post_v1_brands_brand_id_connectors_probe",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/workflow-bindings": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List workflow bindings",
    "operationId": "get_v1_brands_brand_id_workflow_bindings",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "description": "List every brand_workflow_bindings row for the brand (all template_keys and versions, ordered by priority ASC, created_at ASC). binding_config may hold connector KEYS but never secrets.\n\nNOTE: these rows are also writable via `PATCH /v1/brands/{brand_id}` with a `workflow_bindings` array, which DELETE-AND-REINSERTS ALL bindings for the brand (pre-existing behavior) and therefore clobbers rows created through this API. Use one path or the other for a given brand.",
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/workflow-bindings/{workflow_type}": {
   "put": {
    "tags": [
     "Brands"
    ],
    "summary": "Upsert workflow binding",
    "operationId": "put_v1_brands_brand_id_workflow_bindings_workflow_type",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowBindingRecord"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "409": {
      "description": "WORKFLOW_BINDING_TEMPLATE_CONFLICT \u2014 the brand already has a binding for this workflow_type under a different template_key. Retry with ?replace=true, or DELETE the existing binding first.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "description": "Create or update the brand's binding for {workflow_type}. Upserts on (brand_id, workflow_type, template_key, template_version).\n\nBecause template_key is part of that key, writing a DIFFERENT template_key for a workflow_type the brand already has would create a SECOND row \u2014 an ambiguity the dispatch read path refuses to arbitrate (it skips the auto-trigger entirely when more than one enabled row matches). Such a write returns 409 WORKFLOW_BINDING_TEMPLATE_CONFLICT naming the conflicting template_key, unless `?replace=true` is passed, which deletes the other-template_key rows in the same transaction. DELETE followed by PUT is the equivalent explicit path.\n\nFor workflow_type `payment-recovery` with `enabled: true`, `binding_config.connector_key_mail` is required and must be a non-blank string \u2014 without it the Stripe auto-trigger cannot send and would silently skip every event (400 otherwise).\n\nNOTE: `PATCH /v1/brands/{brand_id}` with a `workflow_bindings` array delete-and-reinserts ALL bindings for the brand and will clobber rows created here.",
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "workflow_type",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     },
     {
      "name": "replace",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean",
       "default": false
      },
      "description": "Delete the brand's existing bindings for this workflow_type under a DIFFERENT template_key, in the same transaction. Without it such a write is a 409 (see the endpoint description)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WorkflowBindingWrite"
       }
      }
     }
    }
   },
   "delete": {
    "tags": [
     "Brands"
    ],
    "summary": "Delete workflow binding",
    "operationId": "delete_v1_brands_brand_id_workflow_bindings_workflow_type",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WorkflowBindingDeleteResponse"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "description": "Delete the brand's bindings for {workflow_type}. `?template_key=` scopes the delete to one template; without it every row for the workflow_type is removed. Returns 200 {\"deleted\": N} (not a bare 204) so the caller can see how many rows the sweep took; 404 when nothing matched.\n\nNOTE: `PATCH /v1/brands/{brand_id}` with a `workflow_bindings` array delete-and-reinserts ALL bindings for the brand and will clobber rows created here.",
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "workflow_type",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     },
     {
      "name": "template_key",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Scope the delete to one template_key. Omitted, every binding for the workflow_type is deleted."
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/workflows": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand workflows",
    "operationId": "get_v1_brands_brand_id_workflows",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/workflows/breakdown": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand improvement breakdown",
    "operationId": "get_v1_brands_brand_id_workflows_breakdown",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/workflows/skip-samples": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand skip samples",
    "operationId": "get_v1_brands_brand_id_workflows_skip_samples",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/trial-report": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand trial report",
    "operationId": "get_v1_brands_brand_id_trial_report",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/config/drift": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Check brand config drift",
    "operationId": "get_v1_brands_brand_id_config_drift",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/config/simulate-skip": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Simulate skip check",
    "operationId": "post_v1_brands_brand_id_config_simulate_skip",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/reviews/pending": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Pending reviews",
    "operationId": "get_v1_brands_brand_id_reviews_pending",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/workflows/{workflow_id}": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand workflow run",
    "operationId": "get_v1_brands_brand_id_workflows_workflow_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "workflow_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/golden-cases": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand golden cases",
    "operationId": "get_v1_brands_brand_id_golden_cases",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/outcomes": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand outcomes",
    "operationId": "get_v1_brands_brand_id_outcomes",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   },
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Record brand outcome",
    "operationId": "post_v1_brands_brand_id_outcomes",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/outcomes/{outcome_id}": {
   "patch": {
    "tags": [
     "Brands"
    ],
    "summary": "Transition brand outcome",
    "operationId": "patch_v1_brands_brand_id_outcomes_outcome_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "outcome_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/outcomes/summary": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand outcome summary",
    "operationId": "get_v1_brands_brand_id_outcomes_summary",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/outcomes/scorecard": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand quality scorecard",
    "operationId": "get_v1_brands_brand_id_outcomes_scorecard",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/outcomes/trend": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand outcome trend",
    "operationId": "get_v1_brands_brand_id_outcomes_trend",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/connectors/{connector_id}/health": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Check connector health",
    "operationId": "post_v1_brands_brand_id_connectors_connector_id_health",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "connector_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/connectors/readiness": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Check brand readiness",
    "operationId": "get_v1_brands_brand_id_connectors_readiness",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/api-keys": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand api keys",
    "operationId": "get_v1_brands_brand_id_api_keys",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   },
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Create brand api key",
    "operationId": "post_v1_brands_brand_id_api_keys",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/api-keys/{key_id}/revoke": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Revoke brand api key",
    "operationId": "post_v1_brands_brand_id_api_keys_key_id_revoke",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "key_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/validate": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Validate brand",
    "operationId": "post_v1_brands_brand_id_validate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/activate": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Activate brand",
    "operationId": "post_v1_brands_brand_id_activate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/config": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get effective brand config",
    "operationId": "get_v1_brands_brand_id_config",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/config/apply": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Apply brand config",
    "operationId": "post_v1_brands_brand_id_config_apply",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/config/assist": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Config assist",
    "operationId": "post_v1_brands_brand_id_config_assist",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/config/draft": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Config draft",
    "operationId": "post_v1_brands_brand_id_config_draft",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/config/evaluate": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Config evaluate",
    "operationId": "post_v1_brands_brand_id_config_evaluate",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/config/evaluate-golden": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Config evaluate golden",
    "operationId": "post_v1_brands_brand_id_config_evaluate_golden",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/eval-cases": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Brand eval cases",
    "operationId": "get_v1_brands_brand_id_eval_cases",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/tickets/{ticket_id}/csat": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Record csat",
    "operationId": "post_v1_brands_brand_id_tickets_ticket_id_csat",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "ticket_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/config/versions": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List brand config versions",
    "operationId": "get_v1_brands_brand_id_config_versions",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/config/versions/{version}": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand config version",
    "operationId": "get_v1_brands_brand_id_config_versions_version",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "version",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/migration": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand migration state",
    "operationId": "get_v1_brands_brand_id_migration",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   },
   "patch": {
    "tags": [
     "Brands"
    ],
    "summary": "Update brand migration state",
    "operationId": "patch_v1_brands_brand_id_migration",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/parity": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get brand parity dashboard",
    "operationId": "get_v1_brands_brand_id_parity",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ]
   }
  },
  "/v1/dispatch/health": {
   "get": {
    "tags": [
     "Dispatch"
    ],
    "summary": "Get dispatch health dashboard",
    "operationId": "get_v1_dispatch_health",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    }
   }
  },
  "/v1/dispatch/guard": {
   "post": {
    "tags": [
     "Dispatch"
    ],
    "summary": "Run dispatch guard",
    "operationId": "post_v1_dispatch_guard",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/onboarding": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List onboarding runs",
    "operationId": "get_v1_brands_brand_id_onboarding",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   },
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Create onboarding run",
    "operationId": "post_v1_brands_brand_id_onboarding",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/onboarding/{run_id}": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "Get onboarding run",
    "operationId": "get_v1_brands_brand_id_onboarding_run_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "run_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   },
   "patch": {
    "tags": [
     "Brands"
    ],
    "summary": "Update onboarding run",
    "operationId": "patch_v1_brands_brand_id_onboarding_run_id",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "run_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflow-templates": {
   "get": {
    "tags": [
     "Workflow Templates"
    ],
    "summary": "List workflow templates",
    "operationId": "get_v1_workflow_templates",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   },
   "post": {
    "tags": [
     "Workflow Templates"
    ],
    "summary": "Create workflow template",
    "operationId": "post_v1_workflow_templates",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/workflow-templates/{template_key}": {
   "get": {
    "tags": [
     "Workflow Templates"
    ],
    "summary": "Get latest workflow template",
    "operationId": "get_v1_workflow_templates_template_key",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "template_key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/workflow-templates/{template_key}/{version}": {
   "get": {
    "tags": [
     "Workflow Templates"
    ],
    "summary": "Get workflow template",
    "operationId": "get_v1_workflow_templates_template_key_version",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "template_key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     },
     {
      "name": "version",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   },
   "patch": {
    "tags": [
     "Workflow Templates"
    ],
    "summary": "Update workflow template",
    "operationId": "patch_v1_workflow_templates_template_key_version",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "template_key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     },
     {
      "name": "version",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/policy-sets": {
   "get": {
    "tags": [
     "Policy Sets"
    ],
    "summary": "List policy sets",
    "operationId": "get_v1_policy_sets",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   },
   "post": {
    "tags": [
     "Policy Sets"
    ],
    "summary": "Create policy set",
    "operationId": "post_v1_policy_sets",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/policy-sets/{policy_set_key}": {
   "get": {
    "tags": [
     "Policy Sets"
    ],
    "summary": "Get latest policy set",
    "operationId": "get_v1_policy_sets_policy_set_key",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "policy_set_key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   }
  },
  "/v1/policy-sets/{policy_set_key}/{version}": {
   "get": {
    "tags": [
     "Policy Sets"
    ],
    "summary": "Get policy set",
    "operationId": "get_v1_policy_sets_policy_set_key_version",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "policy_set_key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     },
     {
      "name": "version",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ]
   },
   "patch": {
    "tags": [
     "Policy Sets"
    ],
    "summary": "Update policy set",
    "operationId": "patch_v1_policy_sets_policy_set_key_version",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "policy_set_key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     },
     {
      "name": "version",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/dispatch-dlq": {
   "get": {
    "tags": [
     "Brands"
    ],
    "summary": "List dispatch dlq",
    "operationId": "get_v1_brands_brand_id_dispatch_dlq",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "$ref": "#/components/parameters/Limit"
     },
     {
      "$ref": "#/components/parameters/Offset"
     },
     {
      "$ref": "#/components/parameters/StatusFilter"
     }
    ]
   }
  },
  "/v1/brands/{brand_id}/dispatch-dlq/{dlq_id}/retry": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Retry dlq item",
    "operationId": "post_v1_brands_brand_id_dispatch_dlq_dlq_id_retry",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "dlq_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  },
  "/v1/brands/{brand_id}/dispatch-dlq/{dlq_id}/resolve": {
   "post": {
    "tags": [
     "Brands"
    ],
    "summary": "Resolve dlq item",
    "operationId": "post_v1_brands_brand_id_dispatch_dlq_dlq_id_resolve",
    "security": [
     {
      "ApiKeyAuth": []
     },
     {
      "BearerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/GenericObject"
        }
       }
      }
     },
     "400": {
      "description": "Validation error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "401": {
      "description": "Unauthorized",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     },
     "500": {
      "description": "Internal error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ErrorResponse"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "brand_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "dlq_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/GenericObject"
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "ApiKeyAuth": {
    "type": "apiKey",
    "in": "header",
    "name": "x-api-key",
    "description": "Per-tenant / per-brand control-plane API key."
   },
   "BearerAuth": {
    "type": "http",
    "scheme": "bearer",
    "description": "Authorization: Bearer <token> (alternative to x-api-key)."
   },
   "WorkOSSession": {
    "type": "apiKey",
    "in": "cookie",
    "name": "wos-session",
    "description": "WorkOS browser session cookie (dashboard auth)."
   },
   "WebhookSignature": {
    "type": "apiKey",
    "in": "header",
    "name": "x-signature",
    "description": "Provider HMAC/signature (header name varies per provider). Verified per connector."
   },
   "ZendeskWebhookSignature": {
    "type": "apiKey",
    "in": "header",
    "name": "X-Zendesk-Webhook-Signature",
    "description": "Zendesk HMAC-SHA256 signature. X-Zendesk-Webhook-Signature-Timestamp is also required."
   },
   "RtsSharedSecret": {
    "type": "apiKey",
    "in": "header",
    "name": "x-yse-refuse-rts-secret",
    "description": "Shared secret for the YSE Refuse-RTS import (YSE_REFUSE_RTS_IMPORT_SECRET)."
   }
  },
  "parameters": {
   "Limit": {
    "name": "limit",
    "in": "query",
    "required": false,
    "schema": {
     "type": "integer",
     "default": 100,
     "maximum": 1000
    },
    "description": "Max items (capped at 1000)."
   },
   "Offset": {
    "name": "offset",
    "in": "query",
    "required": false,
    "schema": {
     "type": "integer",
     "default": 0
    }
   },
   "StatusFilter": {
    "name": "status",
    "in": "query",
    "required": false,
    "schema": {
     "type": "string"
    },
    "description": "Filter by status."
   }
  },
  "schemas": {
   "ErrorResponse": {
    "type": "object",
    "properties": {
     "error": {
      "type": "string",
      "description": "Stable error code"
     },
     "message": {
      "type": "string",
      "nullable": true
     },
     "details": {
      "type": "object",
      "nullable": true,
      "additionalProperties": true
     }
    },
    "required": [
     "error"
    ]
   },
   "StartWorkflowResponse": {
    "type": "object",
    "properties": {
     "workflow_id": {
      "type": "string"
     },
     "run_id": {
      "type": "string",
      "nullable": true
     }
    },
    "required": [
     "workflow_id"
    ]
   },
   "WorkflowStatusResponse": {
    "type": "object",
    "properties": {
     "status": {
      "type": "string"
     },
     "phase": {
      "type": "string",
      "nullable": true
     },
     "reviewed": {
      "type": "boolean",
      "nullable": true
     }
    },
    "description": "Shape varies by workflow type; common fields shown."
   },
   "ReviewDecision": {
    "type": "object",
    "properties": {
     "approved": {
      "type": "boolean"
     },
     "reason": {
      "type": "string",
      "nullable": true
     },
     "feedback": {
      "type": "string",
      "nullable": true
     },
     "edited_text": {
      "type": "string",
      "nullable": true
     }
    },
    "required": [
     "approved"
    ]
   },
   "ConnectorStep": {
    "type": "object",
    "properties": {
     "step_name": {
      "type": "string"
     },
     "connector_type": {
      "type": "string"
     },
     "direction": {
      "type": "string"
     },
     "action": {
      "type": "string"
     },
     "params": {
      "type": "object",
      "additionalProperties": true
     }
    },
    "required": [
     "step_name",
     "connector_type",
     "direction",
     "action"
    ]
   },
   "ConnectorWorkflowInput": {
    "type": "object",
    "properties": {
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "steps": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ConnectorStep"
      }
     },
     "context": {
      "type": "object",
      "additionalProperties": true
     }
    },
    "required": [
     "request_id",
     "brand_id",
     "steps"
    ]
   },
   "LongHorizonTask": {
    "type": "object",
    "properties": {
     "task_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
     },
     "description": {
      "type": "string",
      "maxLength": 2000
     },
     "workflow_type": {
      "type": "string",
      "enum": [
       "ConnectorWorkflow",
       "SandboxAgentLoopWorkflow",
       "ResponseAutomationV2Workflow",
       "DeliveryExceptionCallbackWorkflow",
       "ReturnLifecycleWorkflow",
       "PaymentRecoveryWorkflow",
       "SupportFollowupWorkflow",
       "OrderFulfillmentWorkflow",
       "WholesaleOrderWorkflow",
       "YseBeautyResponseWorkflow",
       "YseBeautyReplacementWorkflow",
       "YseBeautyRefuseRtsWorkflow",
       "YseBeautyRefuseRtsIntakeWorkflow",
       "YseBeautyRefuseRtsNoResponseWorkflow"
      ]
     },
     "payload": {
      "type": "object",
      "additionalProperties": true,
      "description": "Maximum serialized size: 262144 bytes."
     }
    },
    "required": [
     "task_id",
     "description",
     "workflow_type",
     "payload"
    ]
   },
   "CyberAuthorizationScope": {
    "type": "object",
    "properties": {
     "engagement_id": {
      "type": "string",
      "minLength": 3,
      "maxLength": 128
     },
     "authorized_assets": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
       "type": "string",
       "maxLength": 256
      }
     },
     "permitted_actions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5,
      "uniqueItems": true,
      "items": {
       "type": "string",
       "enum": [
        "alert_enrichment",
        "evidence_collection",
        "configuration_review",
        "vulnerability_validation",
        "remediation_planning"
       ]
      }
     },
     "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Must be in the future and no more than 30 days away."
     }
    },
    "required": [
     "engagement_id",
     "authorized_assets",
     "permitted_actions",
     "expires_at"
    ]
   },
   "ActiveHorizonAgentStartInput": {
    "type": "object",
    "properties": {
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "goal": {
      "type": "string"
     },
     "release_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
     },
     "source_draft_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
     },
     "source_draft_version": {
      "type": "integer",
      "nullable": true,
      "minimum": 1
     },
     "recipe_key": {
      "type": "string",
      "nullable": true,
      "maxLength": 128
     },
     "recipe_version": {
      "type": "integer",
      "nullable": true,
      "minimum": 1
     },
     "authorization_scope": {
      "$ref": "#/components/schemas/CyberAuthorizationScope"
     },
     "tasks": {
      "type": "array",
      "maxItems": 500,
      "items": {
       "$ref": "#/components/schemas/LongHorizonTask"
      }
     },
     "planner": {
      "$ref": "#/components/schemas/ConnectorStep"
     },
     "allowed_workflow_types": {
      "type": "array",
      "maxItems": 64,
      "items": {
       "type": "string",
       "enum": [
        "ConnectorWorkflow",
        "SandboxAgentLoopWorkflow",
        "ResponseAutomationV2Workflow",
        "DeliveryExceptionCallbackWorkflow",
        "ReturnLifecycleWorkflow",
        "PaymentRecoveryWorkflow",
        "SupportFollowupWorkflow",
        "OrderFulfillmentWorkflow",
        "WholesaleOrderWorkflow",
        "YseBeautyResponseWorkflow",
        "YseBeautyReplacementWorkflow",
        "YseBeautyRefuseRtsWorkflow",
        "YseBeautyRefuseRtsIntakeWorkflow",
        "YseBeautyRefuseRtsNoResponseWorkflow"
       ]
      }
     },
     "active_window_secs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400,
      "default": 3600,
      "description": "0 selects the default; otherwise 300..86400."
     },
     "max_turns": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500,
      "default": 50,
      "description": "0 selects the default; otherwise 1..500."
     },
     "max_failures": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "default": 5,
      "description": "0 selects the default; otherwise 1..100."
     },
     "turn_timeout_secs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1800,
      "default": 300,
      "description": "0 selects the default; otherwise 30..1800."
     },
     "checkpoint_every_turns": {
      "type": "integer",
      "minimum": 0,
      "maximum": 50,
      "default": 10,
      "description": "0 selects the default; otherwise 1..50."
     },
     "paused": {
      "type": "boolean",
      "default": false
     }
    },
    "required": [
     "brand_id",
     "request_id",
     "goal"
    ]
   },
   "ActiveHorizonAgentStatus": {
    "type": "object",
    "properties": {
     "release_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
     },
     "recipe_key": {
      "type": "string",
      "nullable": true
     },
     "recipe_version": {
      "type": "integer",
      "nullable": true
     },
     "goal": {
      "type": "string"
     },
     "status": {
      "type": "string"
     },
     "current_task_id": {
      "type": "string",
      "nullable": true
     },
     "generation": {
      "type": "integer"
     },
     "turns_completed": {
      "type": "integer"
     },
     "failures": {
      "type": "integer"
     },
     "elapsed_active_secs": {
      "type": "integer"
     },
     "active_window_secs": {
      "type": "integer"
     },
     "max_turns": {
      "type": "integer"
     },
     "tasks_remaining": {
      "type": "integer"
     },
     "paused": {
      "type": "boolean"
     },
     "cancelled": {
      "type": "boolean"
     },
     "steering_notes": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    },
    "required": [
     "goal",
     "status",
     "generation",
     "turns_completed",
     "failures",
     "elapsed_active_secs",
     "active_window_secs",
     "max_turns",
     "tasks_remaining",
     "paused",
     "cancelled",
     "steering_notes"
    ]
   },
   "ActiveHorizonPreflightResponse": {
    "type": "object",
    "properties": {
     "valid": {
      "type": "boolean"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_slug": {
      "type": "string"
     },
     "task_queue": {
      "type": "string"
     },
     "goal": {
      "type": "string"
     },
     "task_count": {
      "type": "integer",
      "minimum": 0
     },
     "recipe_key": {
      "type": "string",
      "nullable": true
     },
     "recipe_version": {
      "type": "integer",
      "nullable": true
     },
     "authorization_scope": {
      "type": "object",
      "nullable": true,
      "additionalProperties": true
     },
     "workflow_types": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "budgets": {
      "type": "object",
      "properties": {
       "active_window_secs": {
        "type": "integer"
       },
       "max_turns": {
        "type": "integer"
       },
       "max_failures": {
        "type": "integer"
       },
       "turn_timeout_secs": {
        "type": "integer"
       },
       "checkpoint_every_turns": {
        "type": "integer"
       }
      },
      "required": [
       "active_window_secs",
       "max_turns",
       "max_failures",
       "turn_timeout_secs",
       "checkpoint_every_turns"
      ]
     },
     "estimated_max_child_executions": {
      "type": "integer",
      "minimum": 0
     },
     "requires_operator_approval": {
      "type": "boolean"
     },
     "side_effects_possible": {
      "type": "boolean"
     },
     "release_id": {
      "type": "string",
      "format": "uuid"
     },
     "release_status": {
      "type": "string",
      "enum": [
       "validated",
       "tested",
       "approved",
       "active",
       "retired"
      ]
     },
     "plan_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
     },
     "created_by": {
      "type": "string"
     }
    },
    "required": [
     "valid",
     "brand_id",
     "brand_slug",
     "task_queue",
     "goal",
     "task_count",
     "workflow_types",
     "budgets",
     "estimated_max_child_executions",
     "requires_operator_approval",
     "side_effects_possible",
     "release_id",
     "release_status",
     "plan_hash",
     "created_by"
    ]
   },
   "WorkflowReleaseTestInput": {
    "type": "object",
    "properties": {
     "workflow_id": {
      "type": "string"
     },
     "run_id": {
      "type": "string",
      "nullable": true
     }
    },
    "required": [
     "workflow_id"
    ]
   },
   "WorkflowRecipeRelease": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "recipe_key": {
      "type": "string"
     },
     "recipe_version": {
      "type": "integer"
     },
     "validation_request_id": {
      "type": "string",
      "format": "uuid"
     },
     "source_draft_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
     },
     "source_draft_version": {
      "type": "integer",
      "nullable": true,
      "minimum": 1
     },
     "status": {
      "type": "string",
      "enum": [
       "validated",
       "tested",
       "approved",
       "active",
       "retired"
      ]
     },
     "plan_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
     },
     "validation": {
      "type": "object",
      "additionalProperties": true
     },
     "test_workflow_id": {
      "type": "string",
      "nullable": true
     },
     "test_run_id": {
      "type": "string",
      "nullable": true
     },
     "test_evidence": {
      "type": "object",
      "nullable": true,
      "additionalProperties": true
     },
     "created_by": {
      "type": "string"
     },
     "approved_by": {
      "type": "string",
      "nullable": true
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "approval_expires_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "launch_request_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
     },
     "launched_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time"
     },
     "updated_at": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "id",
     "brand_id",
     "recipe_key",
     "recipe_version",
     "validation_request_id",
     "status",
     "plan_hash",
     "validation",
     "created_by",
     "created_at",
     "updated_at"
    ]
   },
   "WorkflowRecipeReleaseEvent": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "release_id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "event_type": {
      "type": "string",
      "enum": [
       "validated",
       "tested",
       "approved",
       "launch_authorized",
       "started"
      ]
     },
     "from_status": {
      "type": "string",
      "nullable": true
     },
     "to_status": {
      "type": "string"
     },
     "actor": {
      "type": "string"
     },
     "plan_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
     },
     "metadata": {
      "type": "object",
      "additionalProperties": true
     },
     "occurred_at": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "id",
     "release_id",
     "brand_id",
     "event_type",
     "to_status",
     "actor",
     "plan_hash",
     "metadata",
     "occurred_at"
    ]
   },
   "CreateWorkflowDraftRequest": {
    "type": "object",
    "properties": {
     "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
     },
     "recipe_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
     },
     "recipe_version": {
      "type": "integer",
      "minimum": 1
     },
     "spec": {
      "type": "object",
      "additionalProperties": true,
      "description": "Non-executable draft specification; maximum encoded size 256 KiB."
     }
    },
    "required": [
     "title",
     "recipe_key",
     "recipe_version",
     "spec"
    ]
   },
   "UpdateWorkflowDraftRequest": {
    "type": "object",
    "properties": {
     "expected_version": {
      "type": "integer",
      "minimum": 1
     },
     "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
     },
     "recipe_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
     },
     "recipe_version": {
      "type": "integer",
      "minimum": 1
     },
     "spec": {
      "type": "object",
      "additionalProperties": true,
      "description": "Non-executable draft specification; maximum encoded size 256 KiB."
     }
    },
    "required": [
     "expected_version",
     "title",
     "recipe_key",
     "recipe_version",
     "spec"
    ]
   },
   "WorkflowDraft": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "title": {
      "type": "string"
     },
     "recipe_key": {
      "type": "string"
     },
     "recipe_version": {
      "type": "integer"
     },
     "spec": {
      "type": "object",
      "additionalProperties": true
     },
     "version": {
      "type": "integer",
      "minimum": 1
     },
     "created_by": {
      "type": "string"
     },
     "updated_by": {
      "type": "string"
     },
     "created_at": {
      "type": "string",
      "format": "date-time"
     },
     "updated_at": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "id",
     "brand_id",
     "title",
     "recipe_key",
     "recipe_version",
     "spec",
     "version",
     "created_by",
     "updated_by",
     "created_at",
     "updated_at"
    ]
   },
   "ActiveHorizonSteerInput": {
    "type": "object",
    "properties": {
     "note": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
     }
    },
    "required": [
     "note"
    ]
   },
   "ActiveHorizonReprioritizeInput": {
    "type": "object",
    "properties": {
     "task_ids": {
      "type": "array",
      "maxItems": 500,
      "items": {
       "type": "string"
      }
     }
    },
    "required": [
     "task_ids"
    ]
   },
   "ActiveHorizonBudgetExtension": {
    "type": "object",
    "properties": {
     "additional_window_secs": {
      "type": "integer",
      "minimum": 0
     },
     "additional_turns": {
      "type": "integer",
      "minimum": 0
     },
     "additional_failures": {
      "type": "integer",
      "minimum": 0
     }
    }
   },
   "ResponseAutomationV2Input": {
    "type": "object",
    "properties": {
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "workflow_id": {
      "type": "string",
      "nullable": true
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "ticket_id": {
      "type": "string"
     },
     "channel": {
      "type": "string"
     },
     "routing_mode": {
      "type": "string",
      "nullable": true
     },
     "dry_run": {
      "type": "boolean"
     },
     "payload": {
      "type": "object",
      "additionalProperties": true
     }
    },
    "required": [
     "request_id",
     "brand_id",
     "ticket_id",
     "channel"
    ]
   },
   "ResponseAutomationInput": {
    "type": "object",
    "properties": {
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "ticket_id": {
      "type": "string"
     },
     "channel": {
      "type": "string"
     }
    },
    "required": [
     "brand_id",
     "ticket_id"
    ],
    "description": "V1 ResponseAutomation (legacy/deprecated; prefer V2)."
   },
   "RetentionWorkflowInput": {
    "type": "object",
    "properties": {
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "subscription_id": {
      "type": "string"
     },
     "customer_email": {
      "type": "string"
     },
     "cancel_reason": {
      "type": "string",
      "nullable": true
     }
    },
    "required": [
     "brand_id",
     "subscription_id"
    ]
   },
   "RetentionTriggerInput": {
    "type": "object",
    "properties": {
     "request_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "subscription_id": {
      "type": "string"
     },
     "customer_email": {
      "type": "string"
     },
     "cancel_reason": {
      "type": "string",
      "nullable": true
     }
    },
    "required": [
     "brand_id",
     "subscription_id"
    ],
    "description": "Binding supplies the versioned retention config."
   },
   "WarrantyCustomer": {
    "type": "object",
    "properties": {
     "first_name": {
      "type": "string"
     },
     "last_name": {
      "type": "string"
     },
     "email": {
      "type": "string"
     },
     "phone": {
      "type": "string"
     }
    }
   },
   "WarrantyAddress": {
    "type": "object",
    "properties": {
     "address1": {
      "type": "string"
     },
     "address2": {
      "type": "string",
      "nullable": true
     },
     "city": {
      "type": "string"
     },
     "state": {
      "type": "string"
     },
     "zip": {
      "type": "string"
     },
     "country": {
      "type": "string"
     }
    }
   },
   "WarrantyWorkflowInput": {
    "type": "object",
    "properties": {
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "ticket_id": {
      "type": "string"
     },
     "channel": {
      "type": "string"
     },
     "subject": {
      "type": "string"
     },
     "message_body": {
      "type": "string"
     },
     "tags": {
      "type": "string"
     },
     "quantity": {
      "type": "integer"
     },
     "customer": {
      "$ref": "#/components/schemas/WarrantyCustomer"
     },
     "address": {
      "$ref": "#/components/schemas/WarrantyAddress"
     }
    },
    "required": [
     "request_id",
     "brand_id",
     "ticket_id"
    ]
   },
   "WarrantyTriggerInput": {
    "type": "object",
    "properties": {
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "ticket_id": {
      "type": "string"
     },
     "request_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true
     }
    },
    "required": [
     "brand_id",
     "ticket_id"
    ],
    "description": "Binding supplies the versioned warranty config."
   },
   "WarrantyWebhookPayload": {
    "type": "object",
    "properties": {
     "ticket_id": {
      "type": "string"
     },
     "subject": {
      "type": "string"
     },
     "message_body": {
      "type": "string"
     },
     "ticket_type": {
      "type": "string"
     },
     "first_name": {
      "type": "string"
     },
     "last_name": {
      "type": "string"
     },
     "address1": {
      "type": "string"
     },
     "city": {
      "type": "string"
     },
     "state": {
      "type": "string"
     },
     "zipCode": {
      "type": "string"
     },
     "country": {
      "type": "string"
     },
     "customer_email": {
      "type": "string"
     },
     "phone": {
      "type": "string"
     },
     "product": {
      "type": "string"
     },
     "osprey_product": {
      "type": "string"
     },
     "osprey_color": {
      "type": "string"
     },
     "color": {
      "type": "string"
     },
     "volume": {
      "type": "string"
     },
     "quantity": {
      "type": "string"
     },
     "tags": {
      "type": "string"
     }
    },
    "required": [
     "ticket_id"
    ],
    "description": "Flat Zendesk/HydraPak warranty ticket shape posted to the inbound receiver."
   },
   "CohortFanoutInput": {
    "type": "object",
    "properties": {
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     }
    },
    "description": "Fan-out of a workflow across a customer cohort. Shape per cohort config.",
    "additionalProperties": true
   },
   "SandboxSessionBudget": {
    "type": "object",
    "properties": {
     "iteration_limit": {
      "type": "integer",
      "minimum": 1,
      "nullable": true
     },
     "duration_limit_seconds": {
      "type": "integer",
      "minimum": 1,
      "nullable": true
     },
     "cost_cap_cents": {
      "type": "integer",
      "minimum": 1,
      "nullable": true
     }
    }
   },
   "SandboxSessionRotation": {
    "type": "object",
    "properties": {
     "pre_rotate_buffer_seconds": {
      "type": "integer",
      "minimum": 0,
      "nullable": true
     },
     "include_process_state": {
      "type": "boolean",
      "nullable": true
     }
    }
   },
   "SandboxSessionCreateInput": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "nullable": true
     },
     "description": {
      "type": "string",
      "nullable": true
     },
     "cpus": {
      "type": "string",
      "enum": [
       "",
       "250m",
       "500m",
       "1",
       "2"
      ],
      "default": ""
     },
     "memory": {
      "type": "string",
      "enum": [
       "",
       "256Mi",
       "512Mi",
       "1Gi",
       "2Gi",
       "4Gi"
      ],
      "default": ""
     },
     "isolation": {
      "type": "string",
      "enum": [
       "",
       "gvisor",
       "microvm"
      ],
      "default": "gvisor"
     },
     "sandbox_timeout_seconds": {
      "type": "integer",
      "minimum": 0
     },
     "image": {
      "type": "string",
      "nullable": true
     },
     "env": {
      "type": "object",
      "maxProperties": 64,
      "additionalProperties": {
       "type": "string",
       "maxLength": 10000
      }
     },
     "budget": {
      "$ref": "#/components/schemas/SandboxSessionBudget"
     },
     "rotation": {
      "$ref": "#/components/schemas/SandboxSessionRotation"
     },
     "client_id": {
      "type": "string",
      "nullable": true,
      "readOnly": true,
      "description": "Derived by the engine from the brand-bound workflow ID."
     }
    }
   },
   "SandboxAgentPlannerConfig": {
    "type": "object",
    "properties": {
     "objective": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
     },
     "connector_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "nullable": true
     },
     "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "default": "gpt-5.4"
     },
     "system_prompt": {
      "type": "string",
      "maxLength": 12000,
      "nullable": true
     },
     "max_iterations": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 10
     },
     "allowed_executables": {
      "type": "array",
      "minItems": 1,
      "maxItems": 32,
      "uniqueItems": true,
      "items": {
       "type": "string",
       "minLength": 1,
       "maxLength": 128
      }
     },
     "max_tokens": {
      "type": "integer",
      "minimum": 128,
      "maximum": 4096,
      "nullable": true
     },
     "max_total_tokens": {
      "type": "integer",
      "minimum": 128,
      "maximum": 200000,
      "nullable": true
     },
     "completion_criteria": {
      "$ref": "#/components/schemas/SandboxAgentCompletionCriteria"
     }
    },
    "required": [
     "objective",
     "allowed_executables"
    ],
    "additionalProperties": false,
    "description": "Bounded managed-LLM planner. Each turn may run one allowlisted direct executable or finish; shell interpreters are prohibited."
   },
   "SandboxAgentCompletionCriteria": {
    "type": "object",
    "properties": {
     "exit_code": {
      "type": "integer",
      "default": 0
     },
     "executable": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "nullable": true
     },
     "stdout_contains": {
      "type": "array",
      "maxItems": 16,
      "items": {
       "type": "string",
       "minLength": 1,
       "maxLength": 512
      }
     },
     "stderr_must_be_empty": {
      "type": "boolean",
      "default": false
     }
    },
    "additionalProperties": false,
    "description": "Engine-owned predicate over the latest sandbox result. Required for promotion of model-planned releases."
   },
   "SandboxAgentLoopInput": {
    "type": "object",
    "properties": {
     "session": {
      "$ref": "#/components/schemas/SandboxSessionCreateInput"
     },
     "commands": {
      "type": "array",
      "minItems": 0,
      "maxItems": 128,
      "items": {
       "type": "array",
       "minItems": 1,
       "maxItems": 64,
       "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 8192
       }
      }
     },
     "per_exec_timeout_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 600000
     },
     "agent": {
      "$ref": "#/components/schemas/SandboxAgentPlannerConfig"
     }
    },
    "required": [
     "session",
     "commands"
    ],
    "description": "Requires at least one bootstrap command or an agent planner."
   },
   "SandboxAgentLoopStartInput": {
    "type": "object",
    "properties": {
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "request_id": {
      "type": "string",
      "format": "uuid"
     },
     "loop": {
      "$ref": "#/components/schemas/SandboxAgentLoopInput"
     }
    },
    "required": [
     "brand_id",
     "request_id",
     "loop"
    ],
    "additionalProperties": false,
    "description": "Bounded sandbox agent-loop start input."
   },
   "YseWebhookPayload": {
    "type": "object",
    "properties": {
     "message": {
      "type": "object",
      "additionalProperties": true
     },
     "ticket": {
      "type": "object",
      "additionalProperties": true
     }
    },
    "required": [
     "message",
     "ticket"
    ],
    "description": "YSE Beauty (Gorgias) ticket webhook payload."
   },
   "RefuseRtsImport": {
    "type": "object",
    "properties": {
     "source": {
      "type": "string"
     },
     "source_sheet": {
      "type": "string"
     },
     "rows": {
      "type": "array",
      "items": {
       "type": "object",
       "additionalProperties": true
      }
     }
    },
    "description": "Refuse-RTS bulk import (one row per returned order PO)."
   },
   "BrandInput": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "tenant_id": {
      "type": "string",
      "format": "uuid"
     },
     "status": {
      "type": "string"
     },
     "routing_mode": {
      "type": "string"
     }
    },
    "additionalProperties": true,
    "description": "Brand create/update. Many optional config fields."
   },
   "WorkflowBindingWrite": {
    "type": "object",
    "properties": {
     "workflow_type": {
      "type": "string",
      "nullable": true,
      "description": "Optional; must equal the path value when present."
     },
     "template_key": {
      "type": "string"
     },
     "template_version": {
      "type": "integer",
      "default": 1
     },
     "task_queue": {
      "type": "string",
      "nullable": true,
      "description": "Defaults to the served task queue."
     },
     "binding_config": {
      "type": "object",
      "additionalProperties": true,
      "description": "Deterministic config for the bound workflow. May hold connector KEYS, never secrets. For an enabled payment-recovery binding, connector_key_mail is required and must be non-blank."
     },
     "priority": {
      "type": "integer",
      "default": 100
     },
     "enabled": {
      "type": "boolean",
      "default": true
     },
     "metadata": {
      "type": "object",
      "additionalProperties": true
     }
    },
    "required": [
     "template_key"
    ],
    "description": "Body of PUT /v1/brands/{brand_id}/workflow-bindings/{workflow_type}."
   },
   "WorkflowBindingRecord": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "brand_id": {
      "type": "string",
      "format": "uuid"
     },
     "workflow_type": {
      "type": "string"
     },
     "template_key": {
      "type": "string"
     },
     "template_version": {
      "type": "integer"
     },
     "task_queue": {
      "type": "string"
     },
     "binding_config": {
      "type": "object",
      "additionalProperties": true
     },
     "priority": {
      "type": "integer"
     },
     "enabled": {
      "type": "boolean"
     },
     "metadata": {
      "type": "object",
      "additionalProperties": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time"
     },
     "updated_at": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "id",
     "brand_id",
     "workflow_type",
     "template_key",
     "template_version",
     "enabled"
    ]
   },
   "WorkflowBindingDeleteResponse": {
    "type": "object",
    "properties": {
     "deleted": {
      "type": "integer",
      "description": "Number of rows removed."
     }
    },
    "required": [
     "deleted"
    ]
   },
   "GenericEvent": {
    "type": "object",
    "properties": {},
    "additionalProperties": true,
    "description": "Normalized inbound event payload."
   },
   "GenericObject": {
    "type": "object",
    "properties": {},
    "additionalProperties": true,
    "description": "Free-form JSON object (endpoint-specific shape)."
   }
  }
 }
}