{"openapi":"3.1.0","info":{"title":"AgNext BFF","description":"Backend-for-frontend for the etisalat AgNext Platform.","version":"0.1.0"},"paths":{"/healthz":{"get":{"tags":["health"],"summary":"Healthz","description":"Liveness probe — always returns 200 if process is up.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/healthz/agentcore":{"get":{"tags":["health"],"summary":"Healthz Agentcore","description":"Reports which dispatch path the BFF will take right now.\n\n`path` is derived purely from whether AGENTCORE_RUNTIME_ARN is set:\nthe DispatcherClient prefers boto3 invoke_agent_runtime when it has an\nARN, and falls back to posting over HTTP to the dispatcher ECS service\nvia Cloud Map otherwise. Sub-second — no external calls.","operationId":"healthz_agentcore_healthz_agentcore_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCorePathResponse"}}}}}}},"/healthz/documentdb":{"get":{"tags":["health"],"summary":"Healthz Documentdb","description":"Connects to DocumentDB the way chat state does and reports the result.\n\nUnauthenticated, so the response carries no hostnames or messages --\npymongo errors include the cluster topology. Those are logged instead.","operationId":"healthz_documentdb_healthz_documentdb_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDBResponse"}}}}}}},"/readyz":{"get":{"tags":["health"],"summary":"Readyz","description":"Readiness probe — checks downstream dependencies.\n\nNOTE: For now this just reports config readiness. Once services/clients\nare wired, replace the static \"ok\" values with actual ping calls (Mongo\nping, AgentCore /health, etc.) and return 503 if any are degraded.","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessResponse"}}}}}}},"/api/v1/workflows":{"get":{"tags":["workflows"],"summary":"List Workflows","operationId":"list_workflows_api_v1_workflows_get","parameters":[{"name":"intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by intent","title":"Intent"},"description":"Filter by intent"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowSummary"},"title":"Response List Workflows Api V1 Workflows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflows"],"summary":"Create Workflow","operationId":"create_workflow_api_v1_workflows_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}":{"get":{"tags":["workflows"],"summary":"Get Workflow","operationId":"get_workflow_api_v1_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Delete Workflow","operationId":"delete_workflow_api_v1_workflows__workflow_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/versions":{"post":{"tags":["workflows"],"summary":"Add Version","operationId":"add_version_api_v1_workflows__workflow_id__versions_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVersionBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/versions/{version}/approve":{"post":{"tags":["workflows"],"summary":"Approve Version","description":"Admin-only — approve a workflow version for execution.","operationId":"approve_version_api_v1_workflows__workflow_id__versions__version__approve_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Version Api V1 Workflows  Workflow Id  Versions  Version  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/executions":{"post":{"tags":["executions"],"summary":"Trigger Execution","description":"Trigger a workflow execution from an external event.\n\nReturns 202 immediately with the initial trace; the workflow may continue\nrunning asynchronously on AgentCore Runtime. Poll /executions/{id} for\nfull progress.","operationId":"trigger_execution_api_v1_executions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["executions"],"summary":"List Executions","description":"List recent executions visible to this caller.\n\nBehaviour by role:\n  - Tenant-admin / tenant-user → always scoped to user.tenant_id\n    (any ?tenant_id= query param is ignored for non-admins).\n  - Platform admin (no ?tenant_id=) → executions across ALL tenants.\n  - Platform admin (?tenant_id=<x>) → scoped to that tenant.","operationId":"list_executions_api_v1_executions_get","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionListItem"},"title":"Response List Executions Api V1 Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/executions/{execution_id}":{"get":{"tags":["executions"],"summary":"Get Execution","description":"Return the full execution doc + trace.\n\nPlatform admins may pass ?tenant_id=<other> to read another tenant's\nexecutions (used by the customer demo at /demo/itsm whose runs land\nunder sigma-itops). Tenant-admins are pinned to their own tenant.\n\nThe in-memory journal stores raw Python objects (datetime, enums, pydantic\nExecutionTrace instances). Use FastAPI's jsonable_encoder explicitly so we\ndon't trip on `response_model=dict` failing to coerce these recursively.","operationId":"get_execution_api_v1_executions__execution_id__get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/blocks":{"get":{"tags":["blocks"],"summary":"List Blocks","operationId":"list_blocks_api_v1_blocks_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(platform|tenant_mcp|tenant_agent)$"},{"type":"null"}],"title":"Source"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlockMetadata"},"title":"Response List Blocks Api V1 Blocks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/blocks/categories":{"get":{"tags":["blocks"],"summary":"List Categories","operationId":"list_categories_api_v1_blocks_categories_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlockCategory"},"title":"Response List Categories Api V1 Blocks Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/blocks/{block_id}":{"get":{"tags":["blocks"],"summary":"Get Block","operationId":"get_block_api_v1_blocks__block_id__get","parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockMetadata"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/whoami":{"get":{"tags":["admin"],"summary":"Whoami","description":"Echo the current admin user — useful for confirming auth in dev.","operationId":"whoami_api_v1_admin_whoami_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Whoami Api V1 Admin Whoami Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/tenants":{"get":{"tags":["admin"],"summary":"List Tenants","description":"Stub — in M4 this reads from a tenants collection in DocumentDB.","operationId":"list_tenants_api_v1_admin_tenants_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Tenants Api V1 Admin Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Onboard Tenant","description":"Stub — onboarding kicks off Terraform pipeline for tenant silo.","operationId":"onboard_tenant_api_v1_admin_tenants_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOnboardingBody"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Onboard Tenant Api V1 Admin Tenants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/audit":{"get":{"tags":["admin"],"summary":"Audit Query","description":"Stub — reads from CloudWatch Logs Insights / DocumentDB audit collection in M4.","operationId":"audit_query_api_v1_admin_audit_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Audit Query Api V1 Admin Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/flags":{"post":{"tags":["admin"],"summary":"Toggle Flag","description":"Stub — feature flags are env-var-driven for now (no runtime toggling).","operationId":"toggle_flag_api_v1_admin_flags_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagToggleBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Toggle Flag Api V1 Admin Flags Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/whoami":{"get":{"tags":["platform"],"summary":"Whoami","description":"Return identity + scope info from the validated JWT. Used by the frontend\nto drive the Header chip, scope label, and role-aware sidebar/routing.","operationId":"whoami_api_v1_whoami_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoAmI"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/tenants":{"get":{"tags":["platform"],"summary":"List Tenants","description":"List all tenants on the platform. Platform-ops only.\n\nProd: real tenants from agnext-prod-tenant-registry only.\nDev / pre-prod: hardcoded _TENANTS seed catalog.","operationId":"list_tenants_api_v1_platform_tenants_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantSummary"},"title":"Response List Tenants Api V1 Platform Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/fleet-tenants":{"get":{"tags":["platform"],"summary":"Fleet Tenants","description":"Cross-env tenant fleet view.\n\nAggregates tenant_registry rows from Dev, Pre-prod, Prod via cross-account\nassume-role (per-env). Each env is independently fault-tolerant: missing\nrole, missing table, or an unprovisioned account returns an empty slice\nwith an `error`/`status` field so the UI can distinguish \"0 tenants\" from\n\"env not deployed yet\". Platform-ops only.\n\nResponse shape:\n{\n  \"envs\":   [{env, account_id, status, tenant_count, error}, ...],\n  \"tenants\":[{tenant_id, name, sector, status, account_id, env, ...}, ...],\n  \"total\":  <int>\n}","operationId":"fleet_tenants_api_v1_platform_fleet_tenants_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Fleet Tenants Api V1 Platform Fleet Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/tenants/{tenant_id}":{"get":{"tags":["platform"],"summary":"Get Tenant","description":"Get a single tenant's detail. Platform-ops only.","operationId":"get_tenant_api_v1_platform_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/rollup":{"get":{"tags":["platform"],"summary":"Platform Rollup","description":"Aggregated fleet KPIs. Platform-ops only.\n\nReads the live fleet (local env's tenant_registry + any envs this control\nplane can cross-env hop into) rather than the hardcoded Dev-side sample\ntenants. On a freshly-provisioned env with 2 real tenants, Shoeb now sees\n\"2 / 2 / $0 / 100\", not the ghost 10-tenant Dev fixture.","operationId":"platform_rollup_api_v1_platform_rollup_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformRollup"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/security/sso":{"get":{"tags":["platform"],"summary":"Get Sso Config","description":"Return the active Cognito User Pool identity for this environment.\n\nReads from the BFF task-def's env vars (set per-env in Terraform):\n  - `COGNITO_USER_POOL_ID` (preferred) or `AGNEXT_COGNITO_USER_POOL_ID`\n  - `AWS_REGION`\n  - `AGNEXT_ENV`\n\nReplaces the previously hardcoded Dev pool ID on the Platform → Security\npage, so pre-prod and prod show their own pool identity.","operationId":"get_sso_config_api_v1_platform_security_sso_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SSOConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/users":{"get":{"tags":["platform-users"],"summary":"List Platform Users","operationId":"list_platform_users_api_v1_platform_users_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlatformUser"},"title":"Response List Platform Users Api V1 Platform Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/users/role-matrix":{"get":{"tags":["platform-users"],"summary":"Role Matrix","description":"Static role capability matrix — describes what each role can do.","operationId":"role_matrix_api_v1_platform_users_role_matrix_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoleCapability"},"title":"Response Role Matrix Api V1 Platform Users Role Matrix Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/users/invite":{"post":{"tags":["platform-users"],"summary":"Invite User","description":"Create a Cognito user + send invite email. The user lands as\nUserStatus=FORCE_CHANGE_PASSWORD until they sign in + reset.","operationId":"invite_user_api_v1_platform_users_invite_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__platform_users__InviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/ai-config":{"get":{"tags":["platform-ai-config"],"summary":"Get Ai Config","operationId":"get_ai_config_api_v1_platform_ai_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/operations":{"get":{"tags":["platform-operations"],"summary":"Get Operations","operationId":"get_operations_api_v1_platform_operations_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/usage-analytics":{"get":{"tags":["platform-operations"],"summary":"Get Usage Analytics","operationId":"get_usage_analytics_api_v1_platform_usage_analytics_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sectors":{"get":{"tags":["sectors"],"summary":"List Sectors","description":"List every sector SectorRegistry loaded from use_cases/*/sector.yaml.","operationId":"list_sectors_api_v1_sectors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SectorSummary"},"type":"array","title":"Response List Sectors Api V1 Sectors Get"}}}}}}},"/api/v1/tenant/workflows":{"get":{"tags":["tenant"],"summary":"List Workflows For Tenant","description":"List workflows visible to this caller.\n- Tenant-admin: only their tenant's workflows\n- Platform-ops: all workflows across all tenants","operationId":"list_workflows_for_tenant_api_v1_tenant_workflows_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowItem"},"title":"Response List Workflows For Tenant Api V1 Tenant Workflows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/deployments":{"get":{"tags":["tenant"],"summary":"List Deployments For Tenant","description":"Recent workflow execution history visible to this caller.\n\nMerges:\n  - Synthetic seeded execution history (steady-state demo data) — Dev / pre-prod ONLY\n  - In-memory \"Deploy\" journal from /api/v1/tenant/use-cases/{id}/deploy\n    (user-triggered demo deployments — these appear at the TOP of the list)\n\nOn prod: skip the synthetic seed so the Deployments page shows the honest\nempty state until real workflow executions land in the executions registry\n(`agnext-prod-usage-log-registry` + the live deploy journal).","operationId":"list_deployments_for_tenant_api_v1_tenant_deployments_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentItem"},"title":"Response List Deployments For Tenant Api V1 Tenant Deployments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/templates":{"get":{"tags":["tenant"],"summary":"List Templates","description":"8 sector-agnostic agent patterns. Same catalog for every tenant.","operationId":"list_templates_api_v1_tenant_templates_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TemplateItem"},"title":"Response List Templates Api V1 Tenant Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents":{"get":{"tags":["tenant"],"summary":"List Agents For Tenant","description":"List specialist agents owned by the tenant(s) this caller can see.\n\nMerges:\n  - Synthetic seeds (sector-default agents shipped with the platform)\n  - User-authored agents from the DDB agent registry (status != archived)","operationId":"list_agents_for_tenant_api_v1_tenant_agents_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentItem"},"title":"Response List Agents For Tenant Api V1 Tenant Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/custom":{"get":{"tags":["tenant"],"summary":"List Custom Agents","description":"List ONLY user-authored agents (excludes synthetic seeds).\n\nUsed by the Build → My Agents page to render the editable catalog.","operationId":"list_custom_agents_api_v1_tenant_agents_custom_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomAgentItem"},"title":"Response List Custom Agents Api V1 Tenant Agents Custom Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tenant"],"summary":"Create Custom Agent","description":"Create a new user-authored agent.\n\nThe caller's Cognito sub claim is recorded as `created_by`. Tenant\nisolation is enforced by AgentRegistry's partition key (cannot leak across\ntenants).","operationId":"create_custom_agent_api_v1_tenant_agents_custom_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAgentItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/custom/{agent_id}":{"get":{"tags":["tenant"],"summary":"Get Custom Agent","operationId":"get_custom_agent_api_v1_tenant_agents_custom__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAgentItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tenant"],"summary":"Update Custom Agent","operationId":"update_custom_agent_api_v1_tenant_agents_custom__agent_id__patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAgentItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenant"],"summary":"Delete Custom Agent","operationId":"delete_custom_agent_api_v1_tenant_agents_custom__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Custom Agent Api V1 Tenant Agents Custom  Agent Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/custom/fork/{starter_id}":{"post":{"tags":["tenant"],"summary":"Fork Starter Agent","description":"Fork a platform-shipped starter into the caller's tenant catalog.\n\nThe new agent lands as `status=draft` (tenant must explicitly Activate),\ninherits role + tools + model + system_prompt from the starter, and\nrecords `forked_from=<starter_id>` so the UI can show provenance.","operationId":"fork_starter_agent_api_v1_tenant_agents_custom_fork__starter_id__post","parameters":[{"name":"starter_id","in":"path","required":true,"schema":{"type":"string","title":"Starter Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAgentItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom":{"get":{"tags":["tenant"],"summary":"List Custom Workflows","operationId":"list_custom_workflows_api_v1_tenant_workflows_custom_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomWorkflowItem"},"title":"Response List Custom Workflows Api V1 Tenant Workflows Custom Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tenant"],"summary":"Create Custom Workflow","operationId":"create_custom_workflow_api_v1_tenant_workflows_custom_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomWorkflowItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom/check-intent":{"get":{"tags":["tenant"],"summary":"Check Intent Availability","description":"Live availability check for the wizard's intent field.\n\nFrontend hits this on debounced input. Cheap DDB query on this tenant's\nworkflows. Returns {available, existing_workflow?} — the wizard renders\na green ✓ or red ✗ inline, plus a link to edit the existing workflow.\n\nEmpty/short input returns available=true (neutral state, no noise).","operationId":"check_intent_availability_api_v1_tenant_workflows_custom_check_intent_get","parameters":[{"name":"intent","in":"query","required":true,"schema":{"type":"string","title":"Intent"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom/{workflow_id}":{"get":{"tags":["tenant"],"summary":"Get Custom Workflow","operationId":"get_custom_workflow_api_v1_tenant_workflows_custom__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomWorkflowItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tenant"],"summary":"Update Custom Workflow","operationId":"update_custom_workflow_api_v1_tenant_workflows_custom__workflow_id__patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomWorkflowItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenant"],"summary":"Delete Custom Workflow","operationId":"delete_custom_workflow_api_v1_tenant_workflows_custom__workflow_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Custom Workflow Api V1 Tenant Workflows Custom  Workflow Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom/fork/{starter_id}":{"post":{"tags":["tenant"],"summary":"Fork Starter Workflow","description":"Fork a platform-shipped starter workflow into the caller's tenant catalog.\n\nThe new workflow lands as `status=draft` and records\n`forked_from=<starter_id>` so the UI can show provenance.","operationId":"fork_starter_workflow_api_v1_tenant_workflows_custom_fork__starter_id__post","parameters":[{"name":"starter_id","in":"path","required":true,"schema":{"type":"string","title":"Starter Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomWorkflowItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/custom":{"get":{"tags":["tenant"],"summary":"List Custom Tools","description":"List ONLY user-authored tools (excludes the platform-shipped catalog).\n\nUsed by the Capabilities → Tools page to render the editable entries.\nThe read-only MCP catalog stays on GET /tenant/capabilities/tools.","operationId":"list_custom_tools_api_v1_tenant_tools_custom_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomToolItem"},"title":"Response List Custom Tools Api V1 Tenant Tools Custom Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tenant"],"summary":"Create Custom Tool","description":"Create a new user-authored tool.\n\nThe caller's Cognito sub claim is recorded as `created_by`. Tenant\nisolation is enforced by ToolRegistry's partition key (cannot leak\nacross tenants). With api_key_value, the key is stored in Secrets\nManager first (tenant admins only) and rolled back if the save fails.","operationId":"create_custom_tool_api_v1_tenant_tools_custom_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomToolItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/custom/{tool_id}":{"get":{"tags":["tenant"],"summary":"Get Custom Tool","operationId":"get_custom_tool_api_v1_tenant_tools_custom__tool_id__get","parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomToolItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tenant"],"summary":"Update Custom Tool","description":"Update a tool. With api_key_value the managed secret is created or\nrotated; without it the secret is left untouched. Switching to a manual\n(Advanced) secret, or away from key auth, retires the managed secret.","operationId":"update_custom_tool_api_v1_tenant_tools_custom__tool_id__patch","parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomToolItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenant"],"summary":"Delete Custom Tool","description":"Delete a tool. A BFF-managed API key is scheduled for deletion\n(7-day recovery); a manually referenced secret is left alone.","operationId":"delete_custom_tool_api_v1_tenant_tools_custom__tool_id__delete","parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Custom Tool Api V1 Tenant Tools Custom  Tool Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/guardrails":{"get":{"tags":["tenant"],"summary":"List Guardrails For Tenant","description":"List Bedrock Guardrails associated with the tenant(s) this caller can see.\n\nStrategy:\n  1. Pull live Bedrock guardrails (best-effort, may be empty if no model access)\n  2. Augment with per-tenant synthetic guardrails labeled `source: 'synthetic'`","operationId":"list_guardrails_for_tenant_api_v1_tenant_guardrails_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GuardrailItem"},"title":"Response List Guardrails For Tenant Api V1 Tenant Guardrails Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/observability/traces":{"get":{"tags":["tenant"],"summary":"List Traces For Tenant","description":"Recent traces from CloudWatch Logs Insights over AgentCore vended logs.\n\nReturns live rows from the Insights query by default. If the query errors or\nreturns nothing we fall back to the synthetic seeds unless the deploy sets\nAGNEXT_OBSERVABILITY_USE_SYNTHETIC=true (force synth) or\nAGNEXT_OBSERVABILITY_USE_SYNTHETIC=never (empty on failure instead of synth).","operationId":"list_traces_for_tenant_api_v1_tenant_observability_traces_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TraceItem"},"title":"Response List Traces For Tenant Api V1 Tenant Observability Traces Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/guardrails/live":{"get":{"tags":["guardrails"],"summary":"List Live Guardrails","description":"Live enforced state for this tenant: the platform baseline (locked)\nplus this tenant's own custom policies (editable), each attributed to\nwho created it and its current approval status.","operationId":"list_live_guardrails_api_v1_tenant_guardrails_live_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GuardrailPolicy"},"title":"Response List Live Guardrails Api V1 Tenant Guardrails Live Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/guardrails/workflow-options":{"get":{"tags":["guardrails"],"summary":"List Workflow Options","operationId":"list_workflow_options_api_v1_tenant_guardrails_workflow_options_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowOption"},"title":"Response List Workflow Options Api V1 Tenant Guardrails Workflow Options Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/guardrails/custom":{"post":{"tags":["guardrails"],"summary":"Create Custom Guardrail","description":"Admin: live immediately. End-user: saved as `pending` for approval.","operationId":"create_custom_guardrail_api_v1_tenant_guardrails_custom_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailRuleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailPolicy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/guardrails/custom/{policy_id}":{"put":{"tags":["guardrails"],"summary":"Update Custom Guardrail","description":"Admin: edit any custom rule (an active rule gets a new published\nversion). End-user: only their own pending/rejected rules, which go\n(back) to pending.","operationId":"update_custom_guardrail_api_v1_tenant_guardrails_custom__policy_id__put","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailRuleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailPolicy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["guardrails"],"summary":"Delete Custom Guardrail","description":"Tenant admins only. Removes the Bedrock guardrail, then the rule.","operationId":"delete_custom_guardrail_api_v1_tenant_guardrails_custom__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Custom Guardrail Api V1 Tenant Guardrails Custom  Policy Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/guardrails/playground":{"post":{"tags":["guardrails"],"summary":"Test Guardrail","description":"Try a saved rule (policy_id) or an unsaved draft (rule) on sample text.\nNothing is enforced or saved. Blocking rules run through Bedrock\nApplyGuardrail; response modifiers are evaluated in-process.","operationId":"test_guardrail_api_v1_tenant_guardrails_playground_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-hub/items":{"get":{"tags":["approval-hub"],"summary":"List Approval Items","operationId":"list_approval_items_api_v1_approval_hub_items_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["pending","decided","all"],"type":"string","default":"pending","title":"Status"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalItemOut"},"title":"Response List Approval Items Api V1 Approval Hub Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["approval-hub"],"summary":"Submit Approval Item","description":"Queue a resource for review. Normally called for you — creating a\nguardrail as an end-user submits it automatically.","operationId":"submit_approval_item_api_v1_approval_hub_items_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-hub/pending-count":{"get":{"tags":["approval-hub"],"summary":"Pending Count","operationId":"pending_count_api_v1_approval_hub_pending_count_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pending Count Api V1 Approval Hub Pending Count Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-hub/items/{item_id}":{"get":{"tags":["approval-hub"],"summary":"Get Approval Item","operationId":"get_approval_item_api_v1_approval_hub_items__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-hub/items/{item_id}/approve":{"post":{"tags":["approval-hub"],"summary":"Approve Item","operationId":"approve_item_api_v1_approval_hub_items__item_id__approve_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-hub/items/{item_id}/reject":{"post":{"tags":["approval-hub"],"summary":"Reject Item","operationId":"reject_item_api_v1_approval_hub_items__item_id__reject_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications":{"get":{"tags":["approval-hub"],"summary":"List Notifications","operationId":"list_notifications_api_v1_notifications_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationOut"},"title":"Response List Notifications Api V1 Notifications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/read":{"post":{"tags":["approval-hub"],"summary":"Mark Notifications Read","operationId":"mark_notifications_read_api_v1_notifications_read_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkReadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Notifications Read Api V1 Notifications Read Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/plan/maturity/framework":{"get":{"tags":["plan"],"summary":"Get Maturity Framework","description":"Return the 15-dimension questionnaire framework dynamically from JSON data.","operationId":"get_maturity_framework_api_v1_tenant_plan_maturity_framework_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Maturity Framework Api V1 Tenant Plan Maturity Framework Get"}}}}}}},"/api/v1/tenant/plan/maturity":{"get":{"tags":["plan"],"summary":"Get Maturity","operationId":"get_maturity_api_v1_tenant_plan_maturity_get","parameters":[{"name":"segment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformMaturity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["plan"],"summary":"Submit Maturity Assessment","description":"Calculate and save a new 15-dimension maturity assessment for the tenant.","operationId":"submit_maturity_assessment_api_v1_tenant_plan_maturity_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentSubmission"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaturityAssessment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/plan/business-cases":{"get":{"tags":["plan"],"summary":"List Business Cases","description":"Business case catalog.\n\nTenant-admin: filtered to their sector (with status reflecting their adoption).\nPlatform-ops: full catalog across all sectors (no per-tenant status).\nOverride via ?sector=BFSI to inspect another catalog.","operationId":"list_business_cases_api_v1_tenant_plan_business_cases_get","parameters":[{"name":"sector","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BusinessCase"},"title":"Response List Business Cases Api V1 Tenant Plan Business Cases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/plan/roi-defaults":{"get":{"tags":["plan"],"summary":"Get Roi Defaults","description":"Return ROI calculator defaults for the user's sector (or specified).","operationId":"get_roi_defaults_api_v1_tenant_plan_roi_defaults_get","parameters":[{"name":"sector","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoiDefaults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/plan/roadmap":{"get":{"tags":["plan"],"summary":"Get Roadmap","description":"Return tenant's roadmap(s).\n\nTenant-admin: their own roadmap (list of 1).\nPlatform-ops: all tenants' roadmaps.","operationId":"get_roadmap_api_v1_tenant_plan_roadmap_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantRoadmap"},"title":"Response Get Roadmap Api V1 Tenant Plan Roadmap Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/billing/usage":{"get":{"tags":["billing"],"summary":"Get Usage","description":"Current-cycle usage for the caller's tenant(s).\n\nEach per-tenant build is time-bounded (see `_PER_TENANT_TIMEOUT_SEC`). On\nprod with an unseeded `agnext-prod-usage-log-registry`, slow DDB / Cost\nExplorer round-trips used to hang the page; now we fall back to zeros so\nthe UI gets a clean empty state instead of an infinite loader.","operationId":"get_usage_api_v1_tenant_billing_usage_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/billing-config":{"get":{"tags":["billing-costs"],"summary":"List Config","operationId":"list_config_api_v1_platform_billing_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConfigItem"},"title":"Response List Config Api V1 Platform Billing Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/billing-config/{config_key}":{"put":{"tags":["billing-costs"],"summary":"Update Config","operationId":"update_config_api_v1_platform_billing_config__config_key__put","parameters":[{"name":"config_key","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Config Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/model-rates":{"get":{"tags":["billing-costs"],"summary":"List Rates","operationId":"list_rates_api_v1_platform_model_rates_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelRate"},"title":"Response List Rates Api V1 Platform Model Rates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/model-rates/{model_id}":{"put":{"tags":["billing-costs"],"summary":"Update Rate","operationId":"update_rate_api_v1_platform_model_rates__model_id__put","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Model Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/billing-costs":{"get":{"tags":["billing-costs"],"summary":"Get Cost Report","description":"Per-tenant P&L this cycle.\n\nOn real activity, aggregates `agnext-{env}-usage-log-registry` per-tenant\nrows + `agnext-{env}-tenant-registry` for display names + account IDs\n+ `agnext-{env}-model-rates-registry` for cost basis.\n\nOn prod with no activity yet: return a clean empty CostReport instead of\nscanning the empty table + hitting AWS Cost Explorer for a $0 bill (which\ncan hang on cold accounts).","operationId":"get_cost_report_api_v1_platform_billing_costs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/billing-costs/{tenant_id}":{"get":{"tags":["billing-costs"],"summary":"Get Tenant Cost","operationId":"get_tenant_cost_api_v1_platform_billing_costs__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCost"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/use-cases":{"get":{"tags":["use-cases"],"summary":"List Use Cases","description":"Sector-filtered starter kit catalog.\n\nTenant-admin: filtered to their sector by default (override with ?sector=...).\nPlatform-ops: full catalog (override with ?sector=...).","operationId":"list_use_cases_api_v1_tenant_use_cases_get","parameters":[{"name":"sector","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UseCaseWithStatus"},"title":"Response List Use Cases Api V1 Tenant Use Cases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/use-cases/{use_case_id}/deploy":{"post":{"tags":["use-cases"],"summary":"Deploy Use Case","description":"Deploy a starter kit into the calling tenant.\n\nTwo-phase:\n  1. Record in the in-memory deployment journal (visible in /tenant/deployments)\n  2. Actually invoke the sector-specific workflow via the dispatcher client,\n     using a realistic demo payload for the use case. Returns the agent trace.","operationId":"deploy_use_case_api_v1_tenant_use_cases__use_case_id__deploy_post","parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","title":"Use Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/use-cases/custom":{"get":{"tags":["use-cases"],"summary":"List Custom Use Cases","operationId":"list_custom_use_cases_api_v1_tenant_use_cases_custom_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomUseCaseItem"},"title":"Response List Custom Use Cases Api V1 Tenant Use Cases Custom Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["use-cases"],"summary":"Create Custom Use Case","operationId":"create_custom_use_case_api_v1_tenant_use_cases_custom_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseCaseCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUseCaseItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/use-cases/custom/{use_case_id}":{"get":{"tags":["use-cases"],"summary":"Get Custom Use Case","operationId":"get_custom_use_case_api_v1_tenant_use_cases_custom__use_case_id__get","parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","title":"Use Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUseCaseItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["use-cases"],"summary":"Update Custom Use Case","operationId":"update_custom_use_case_api_v1_tenant_use_cases_custom__use_case_id__patch","parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","title":"Use Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseCaseUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUseCaseItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["use-cases"],"summary":"Delete Custom Use Case","operationId":"delete_custom_use_case_api_v1_tenant_use_cases_custom__use_case_id__delete","parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","title":"Use Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Custom Use Case Api V1 Tenant Use Cases Custom  Use Case Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/use-cases/custom/fork/{starter_id}":{"post":{"tags":["use-cases"],"summary":"Fork Starter Use Case","description":"Fork a sector starter kit into the caller's tenant catalog.\n\nThe new use case lands as `status=draft`, inherits sector + workflow +\ntools + typical agents from the starter, and records\n`forked_from=<starter_id>` so the UI can show provenance.","operationId":"fork_starter_use_case_api_v1_tenant_use_cases_custom_fork__starter_id__post","parameters":[{"name":"starter_id","in":"path","required":true,"schema":{"type":"string","title":"Starter Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUseCaseItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/capabilities/tools":{"get":{"tags":["capabilities"],"summary":"List Tools","operationId":"list_tools_api_v1_tenant_capabilities_tools_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ToolItem"},"title":"Response List Tools Api V1 Tenant Capabilities Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/capabilities/knowledge":{"get":{"tags":["capabilities"],"summary":"List Knowledge","description":"Real knowledge bases per tenant in scope; sector seeds only for tenants that\nhave none yet (or when the KB registry can't be read).","operationId":"list_knowledge_api_v1_tenant_capabilities_knowledge_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseItem"},"title":"Response List Knowledge Api V1 Tenant Capabilities Knowledge Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/capabilities/prompts":{"get":{"tags":["capabilities"],"summary":"List Prompts","operationId":"list_prompts_api_v1_tenant_capabilities_prompts_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptItem"},"title":"Response List Prompts Api V1 Tenant Capabilities Prompts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/test":{"post":{"tags":["capabilities"],"summary":"Test Tool","description":"Run a single test call of a catalog or custom tool (anyone in the tenant, viewers too).","operationId":"test_tool_api_v1_tenant_tools_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/{tool_id}/signature":{"get":{"tags":["capabilities"],"summary":"Tool Signature","description":"Form fields for a built-in tool, introspected from its Python function.","operationId":"tool_signature_api_v1_tenant_tools__tool_id__signature_get","parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSignature"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/gateway/describe":{"post":{"tags":["capabilities"],"summary":"Describe Gateway Tool","description":"Operations + input schemas for a mapped catalog tool, so the popup can\nrender a form. enabled=false means the Test Tool will dry-run it.","operationId":"describe_gateway_tool_api_v1_tenant_tools_gateway_describe_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayDescribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayDescribeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/test":{"post":{"tags":["agents"],"summary":"Test Agent","description":"Run one conversation turn against the agent's real model + tools.","operationId":"test_agent_api_v1_tenant_agents_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs":{"get":{"tags":["knowledge"],"summary":"List Kbs","operationId":"list_kbs_api_v1_tenant_knowledge_kbs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Kbs Api V1 Tenant Knowledge Kbs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["knowledge"],"summary":"Create Kb","operationId":"create_kb_api_v1_tenant_knowledge_kbs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Kb Api V1 Tenant Knowledge Kbs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}":{"get":{"tags":["knowledge"],"summary":"Get Kb","operationId":"get_kb_api_v1_tenant_knowledge_kbs__kb_id__get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Kb Api V1 Tenant Knowledge Kbs  Kb Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["knowledge"],"summary":"Update Kb","operationId":"update_kb_api_v1_tenant_knowledge_kbs__kb_id__patch","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Kb Api V1 Tenant Knowledge Kbs  Kb Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["knowledge"],"summary":"Delete Kb","operationId":"delete_kb_api_v1_tenant_knowledge_kbs__kb_id__delete","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Kb Api V1 Tenant Knowledge Kbs  Kb Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents":{"get":{"tags":["knowledge"],"summary":"List Documents","operationId":"list_documents_api_v1_tenant_knowledge_kbs__kb_id__documents_get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Documents Api V1 Tenant Knowledge Kbs  Kb Id  Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/{doc_id}":{"get":{"tags":["knowledge"],"summary":"Get Document","operationId":"get_document_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Document Api V1 Tenant Knowledge Kbs  Kb Id  Documents  Doc Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["knowledge"],"summary":"Delete Document","operationId":"delete_document_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__delete","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Document Api V1 Tenant Knowledge Kbs  Kb Id  Documents  Doc Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/{doc_id}/download":{"get":{"tags":["knowledge"],"summary":"Download Document","description":"The stored file as an attachment (viewers too: reading is allowed).","operationId":"download_document_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__download_get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/{doc_id}/preview":{"get":{"tags":["knowledge"],"summary":"Preview Document","description":"Readable content for the preview: Markdown/text, CSV rows, or format \"pdf\" (show the download).","operationId":"preview_document_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__preview_get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Document Api V1 Tenant Knowledge Kbs  Kb Id  Documents  Doc Id  Preview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/upload-url":{"post":{"tags":["knowledge"],"summary":"Upload Url","operationId":"upload_url_api_v1_tenant_knowledge_kbs__kb_id__documents_upload_url_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Url Api V1 Tenant Knowledge Kbs  Kb Id  Documents Upload Url Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/{doc_id}/content":{"put":{"tags":["knowledge"],"summary":"Upload Content","description":"Direct upload (local backend only; with Bedrock the browser posts to S3).","operationId":"upload_content_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__content_put","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Content Api V1 Tenant Knowledge Kbs  Kb Id  Documents  Doc Id  Content Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/{doc_id}/complete":{"post":{"tags":["knowledge"],"summary":"Complete Upload","operationId":"complete_upload_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__complete_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Complete Upload Api V1 Tenant Knowledge Kbs  Kb Id  Documents  Doc Id  Complete Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/text":{"post":{"tags":["knowledge"],"summary":"Add Text","operationId":"add_text_api_v1_tenant_knowledge_kbs__kb_id__documents_text_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextDoc"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Text Api V1 Tenant Knowledge Kbs  Kb Id  Documents Text Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/faq":{"post":{"tags":["knowledge"],"summary":"Add Faq","operationId":"add_faq_api_v1_tenant_knowledge_kbs__kb_id__documents_faq_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaqDocs"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Faq Api V1 Tenant Knowledge Kbs  Kb Id  Documents Faq Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/url":{"post":{"tags":["knowledge"],"summary":"Add Url","operationId":"add_url_api_v1_tenant_knowledge_kbs__kb_id__documents_url_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlDoc"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Url Api V1 Tenant Knowledge Kbs  Kb Id  Documents Url Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/{doc_id}/refresh":{"post":{"tags":["knowledge"],"summary":"Refresh Url","operationId":"refresh_url_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__refresh_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refresh Url Api V1 Tenant Knowledge Kbs  Kb Id  Documents  Doc Id  Refresh Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/kbs/{kb_id}/documents/{doc_id}/retry":{"post":{"tags":["knowledge"],"summary":"Retry Document","operationId":"retry_document_api_v1_tenant_knowledge_kbs__kb_id__documents__doc_id__retry_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","title":"Kb Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Document Api V1 Tenant Knowledge Kbs  Kb Id  Documents  Doc Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/knowledge/query":{"post":{"tags":["knowledge"],"summary":"Query","description":"Test search (viewers too: reading is allowed).","operationId":"query_api_v1_tenant_knowledge_query_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Query Api V1 Tenant Knowledge Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/index":{"post":{"tags":["demo-website"],"summary":"Start Index","description":"Start crawling a website into a new knowledge base (AI Studio \"Index\" workflow).","operationId":"start_index_api_v1_demo_website_index_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Index Api V1 Demo Website Index Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/index/status":{"get":{"tags":["demo-website"],"summary":"Index Status","description":"Progress of the crawl; when it's done, a knowledge-base token and site details.","operationId":"index_status_api_v1_demo_website_index_status_get","parameters":[{"name":"run_token","in":"query","required":true,"schema":{"type":"string","title":"Run Token"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Index Status Api V1 Demo Website Index Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/ask":{"post":{"tags":["demo-website"],"summary":"Ask","description":"Answer a question from the visitor's website knowledge base (AI Studio \"Ask\" workflow).","operationId":"ask_api_v1_demo_website_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ask Api V1 Demo Website Ask Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/kbs":{"post":{"tags":["demo-website"],"summary":"Saved Kbs","description":"Current state of the knowledge bases this visitor saved (one entry per token, same order):\nready (can chat), expired (token too old: remove only) or gone (deleted / never existed).","operationId":"saved_kbs_api_v1_demo_website_kbs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedKbs"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Saved Kbs Api V1 Demo Website Kbs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/kb":{"get":{"tags":["demo-website"],"summary":"Open Kb","description":"Site details to reopen a saved (or admin-picked) knowledge base in the chat.","operationId":"open_kb_api_v1_demo_website_kb_get","parameters":[{"name":"kb_token","in":"query","required":true,"schema":{"type":"string","title":"Kb Token"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Open Kb Api V1 Demo Website Kb Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/kbs/remove":{"post":{"tags":["demo-website"],"summary":"Remove Saved Kb","description":"Delete the visitor's own knowledge base. An expired token still proves it was theirs.","operationId":"remove_saved_kb_api_v1_demo_website_kbs_remove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveKb"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Remove Saved Kb Api V1 Demo Website Kbs Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/admin/kbs":{"post":{"tags":["demo-website"],"summary":"Admin List Kbs","description":"Every knowledge base in the demo tenant, newest first, each with a token to chat with it.","operationId":"admin_list_kbs_api_v1_demo_website_admin_kbs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin List Kbs Api V1 Demo Website Admin Kbs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/website/admin/kbs/remove":{"post":{"tags":["demo-website"],"summary":"Admin Remove Kb","operationId":"admin_remove_kb_api_v1_demo_website_admin_kbs_remove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRemove"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Remove Kb Api V1 Demo Website Admin Kbs Remove Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/test/plan":{"post":{"tags":["workflows"],"summary":"Plan Workflow Test","description":"Decide how this workflow can be tested and list its stages.","operationId":"plan_workflow_test_api_v1_tenant_workflows_test_plan_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRef"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTestPlan"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/test/orchestrator":{"post":{"tags":["workflows"],"summary":"Run Orchestrator Test","description":"Send a test event through dispatcher → AgentCore runtime → sector orchestrator.","operationId":"run_orchestrator_test_api_v1_tenant_workflows_test_orchestrator_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestratorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestratorResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/test/stage":{"post":{"tags":["workflows"],"summary":"Run Stage Test","description":"Run one stage of the workflow on Bedrock (agent stages) and return its output.","operationId":"run_stage_test_api_v1_tenant_workflows_test_stage_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts":{"get":{"tags":["prompts"],"summary":"List Prompts","operationId":"list_prompts_api_v1_tenant_prompts_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"include_starters","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Starters"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptSummary"},"title":"Response List Prompts Api V1 Tenant Prompts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["prompts"],"summary":"Create Prompt","operationId":"create_prompt_api_v1_tenant_prompts_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/fork/{starter_id}":{"post":{"tags":["prompts"],"summary":"Fork Starter Prompt","operationId":"fork_starter_prompt_api_v1_tenant_prompts_fork__starter_id__post","parameters":[{"name":"starter_id","in":"path","required":true,"schema":{"type":"string","title":"Starter Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/{prompt_id}":{"get":{"tags":["prompts"],"summary":"Get Prompt","operationId":"get_prompt_api_v1_tenant_prompts__prompt_id__get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["prompts"],"summary":"Update Prompt","operationId":"update_prompt_api_v1_tenant_prompts__prompt_id__patch","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/{prompt_id}/archive":{"post":{"tags":["prompts"],"summary":"Archive Prompt","operationId":"archive_prompt_api_v1_tenant_prompts__prompt_id__archive_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/{prompt_id}/restore":{"post":{"tags":["prompts"],"summary":"Restore Prompt","operationId":"restore_prompt_api_v1_tenant_prompts__prompt_id__restore_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/{prompt_id}/versions/{version}":{"get":{"tags":["prompts"],"summary":"Get Prompt Version","operationId":"get_prompt_version_api_v1_tenant_prompts__prompt_id__versions__version__get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/{prompt_id}/versions":{"post":{"tags":["prompts"],"summary":"Create Prompt Version","operationId":"create_prompt_version_api_v1_tenant_prompts__prompt_id__versions_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__prompts__VersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/{prompt_id}/versions/{version}/publish":{"post":{"tags":["prompts"],"summary":"Publish Prompt Version","operationId":"publish_prompt_version_api_v1_tenant_prompts__prompt_id__versions__version__publish_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/{prompt_id}/diff":{"get":{"tags":["prompts"],"summary":"Diff Prompt Versions","operationId":"diff_prompt_versions_api_v1_tenant_prompts__prompt_id__diff_get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","title":"Prompt Id"}},{"name":"from_version","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"From Version"}},{"name":"to_version","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"To Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/prompts/enhance":{"post":{"tags":["prompts"],"summary":"Enhance Prompt","operationId":"enhance_prompt_api_v1_tenant_prompts_enhance_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptEnhanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptEnhanceResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/custom/{asset_id}/versions":{"get":{"tags":["asset-versions"],"summary":"List Agent Versions","operationId":"list_agent_versions_api_v1_tenant_agents_custom__asset_id__versions_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["asset-versions"],"summary":"Create Agent Version","operationId":"create_agent_version_api_v1_tenant_agents_custom__asset_id__versions_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__asset_versions__VersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/custom/{asset_id}/versions/{ref}":{"get":{"tags":["asset-versions"],"summary":"Get Agent Version","operationId":"get_agent_version_api_v1_tenant_agents_custom__asset_id__versions__ref__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/custom/{asset_id}/versions/{version}/publish":{"post":{"tags":["asset-versions"],"summary":"Publish Agent Version","operationId":"publish_agent_version_api_v1_tenant_agents_custom__asset_id__versions__version__publish_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionHead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/agents/custom/{asset_id}/diff":{"get":{"tags":["asset-versions"],"summary":"Diff Agent Versions","operationId":"diff_agent_versions_api_v1_tenant_agents_custom__asset_id__diff_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/custom/{asset_id}/versions":{"get":{"tags":["asset-versions"],"summary":"List Tool Versions","operationId":"list_tool_versions_api_v1_tenant_tools_custom__asset_id__versions_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["asset-versions"],"summary":"Create Tool Version","operationId":"create_tool_version_api_v1_tenant_tools_custom__asset_id__versions_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__asset_versions__VersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/custom/{asset_id}/versions/{ref}":{"get":{"tags":["asset-versions"],"summary":"Get Tool Version","operationId":"get_tool_version_api_v1_tenant_tools_custom__asset_id__versions__ref__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/custom/{asset_id}/versions/{version}/publish":{"post":{"tags":["asset-versions"],"summary":"Publish Tool Version","operationId":"publish_tool_version_api_v1_tenant_tools_custom__asset_id__versions__version__publish_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionHead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/tools/custom/{asset_id}/diff":{"get":{"tags":["asset-versions"],"summary":"Diff Tool Versions","operationId":"diff_tool_versions_api_v1_tenant_tools_custom__asset_id__diff_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom/{asset_id}/versions":{"get":{"tags":["asset-versions"],"summary":"List Workflow Versions","operationId":"list_workflow_versions_api_v1_tenant_workflows_custom__asset_id__versions_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["asset-versions"],"summary":"Create Workflow Version","operationId":"create_workflow_version_api_v1_tenant_workflows_custom__asset_id__versions_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__asset_versions__VersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom/{asset_id}/versions/{ref}":{"get":{"tags":["asset-versions"],"summary":"Get Workflow Version","operationId":"get_workflow_version_api_v1_tenant_workflows_custom__asset_id__versions__ref__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom/{asset_id}/versions/{version}/publish":{"post":{"tags":["asset-versions"],"summary":"Publish Workflow Version","operationId":"publish_workflow_version_api_v1_tenant_workflows_custom__asset_id__versions__version__publish_post","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionHead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/workflows/custom/{asset_id}/diff":{"get":{"tags":["asset-versions"],"summary":"Diff Workflow Versions","operationId":"diff_workflow_versions_api_v1_tenant_workflows_custom__asset_id__diff_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/agents/{agent_id}/run":{"post":{"tags":["studio"],"summary":"Run Agent","operationId":"run_agent_api_v1_tenant_studio_agents__agent_id__run_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__studio__AgentRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/runs":{"post":{"tags":["studio"],"summary":"Start Run","description":"Start a run on the server; poll GET /tenant/studio/runs/{run_id}. Anyone in the tenant\nmay run saved versions; an unsaved draft only whoever may edit the target.","operationId":"start_run_api_v1_tenant_studio_runs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Run Api V1 Tenant Studio Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["studio"],"summary":"List Runs","operationId":"list_runs_api_v1_tenant_studio_runs_get","parameters":[{"name":"target","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Runs Api V1 Tenant Studio Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/runs/stats":{"get":{"tags":["studio"],"summary":"Run Stats","description":"Per target (\"workflow:<id>\"): runs in the last 24 h, their cost, and the last run,\nfor the Workflows page. Anyone in the tenant can read it.","operationId":"run_stats_api_v1_tenant_studio_runs_stats_get","parameters":[{"name":"target_type","in":"query","required":false,"schema":{"enum":["workflow","agent"],"type":"string","default":"workflow","title":"Target Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Stats Api V1 Tenant Studio Runs Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/runs/{run_id}":{"get":{"tags":["studio"],"summary":"Get Run","operationId":"get_run_api_v1_tenant_studio_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"since_seq","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Since Seq"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Run Api V1 Tenant Studio Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/runs/{run_id}/cancel":{"post":{"tags":["studio"],"summary":"Cancel Run","operationId":"cancel_run_api_v1_tenant_studio_runs__run_id__cancel_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Run Api V1 Tenant Studio Runs  Run Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/validate":{"post":{"tags":["studio"],"summary":"Validate","description":"Live editor check: spec shape, embedded schemas, graph rules and expressions.","operationId":"validate_api_v1_tenant_studio_validate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Validate Api V1 Tenant Studio Validate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/palette":{"get":{"tags":["studio"],"summary":"Palette","description":"Node types for the canvas, IF operators, expression roots and the model catalog.","operationId":"palette_api_v1_tenant_studio_palette_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Palette Api V1 Tenant Studio Palette Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/models":{"get":{"tags":["studio"],"summary":"Bedrock Models","description":"Bedrock chat models this AWS account can use, for the agent and prompt model\npickers. `source` is \"seed\" (just the two default models) when Bedrock can't be\nlisted. `defaults` are the primary / fast tier models.","operationId":"bedrock_models_api_v1_tenant_studio_models_get","parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Bedrock Models Api V1 Tenant Studio Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/node-io":{"get":{"tags":["studio"],"summary":"Node Io","description":"What an Agent node takes and returns (the version it would run), so the canvas\ncan show parameter details and a sample input.","operationId":"node_io_api_v1_tenant_studio_node_io_get","parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","title":"Type"}},{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}},{"name":"version","in":"query","required":false,"schema":{"type":"string","default":"published","title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Node Io Api V1 Tenant Studio Node Io Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/test-cases":{"get":{"tags":["studio"],"summary":"List Test Cases","operationId":"list_test_cases_api_v1_tenant_studio_test_cases_get","parameters":[{"name":"target","in":"query","required":true,"schema":{"type":"string","title":"Target"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Test Cases Api V1 Tenant Studio Test Cases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["studio"],"summary":"Create Test Case","operationId":"create_test_case_api_v1_tenant_studio_test_cases_post","parameters":[{"name":"target","in":"query","required":true,"schema":{"type":"string","title":"Target"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCaseBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Test Case Api V1 Tenant Studio Test Cases Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/test-cases/{case_id}":{"put":{"tags":["studio"],"summary":"Update Test Case","operationId":"update_test_case_api_v1_tenant_studio_test_cases__case_id__put","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","title":"Target"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCaseBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Test Case Api V1 Tenant Studio Test Cases  Case Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["studio"],"summary":"Delete Test Case","operationId":"delete_test_case_api_v1_tenant_studio_test_cases__case_id__delete","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","title":"Target"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Test Case Api V1 Tenant Studio Test Cases  Case Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/checks":{"post":{"tags":["studio"],"summary":"Start Check","description":"Run every test case against the candidate and the published version (background).","operationId":"start_check_api_v1_tenant_studio_checks_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCheckRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Check Api V1 Tenant Studio Checks Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/studio/checks/{check_id}":{"get":{"tags":["studio"],"summary":"Get Check","operationId":"get_check_api_v1_tenant_studio_checks__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Check Api V1 Tenant Studio Checks  Check Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/govern/audit/events":{"get":{"tags":["govern"],"summary":"List Audit Events","operationId":"list_audit_events_api_v1_govern_audit_events_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"action_prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Action Prefix"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Until"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditEventOut"},"title":"Response List Audit Events Api V1 Govern Audit Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/govern/command-center/kpis":{"get":{"tags":["govern"],"summary":"Command Center Kpis","description":"Command Center hero KPIs — will aggregate from\n`agnext-{env}-usage-log-registry` + `agnext-{env}-usage-snapshots-registry`\nonce those registries start populating. Returns [] today so the UI falls\nthrough to its mock seed on Dev / pre-prod and shows honest empty state on\nprod (no CloudFront 404 → 200/HTML rewrite surface area).","operationId":"command_center_kpis_api_v1_govern_command_center_kpis_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Command Center Kpis Api V1 Govern Command Center Kpis Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/govern/command-center/maturity":{"get":{"tags":["govern"],"summary":"Command Center Maturity","description":"Maturity matrix per capability module — will aggregate from\n`agnext-{env}-usage-log-registry` + `agnext-{env}-usage-snapshots-registry`\nonce those registries start populating.","operationId":"command_center_maturity_api_v1_govern_command_center_maturity_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Command Center Maturity Api V1 Govern Command Center Maturity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/govern/cost/by-model":{"get":{"tags":["govern"],"summary":"Cost By Model","description":"Cost rollup by foundation model — will aggregate from\n`agnext-{env}-usage-log-registry` + `agnext-{env}-usage-snapshots-registry`\nonce those registries start populating.","operationId":"cost_by_model_api_v1_govern_cost_by_model_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Cost By Model Api V1 Govern Cost By Model Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/govern/cost/optimizations":{"get":{"tags":["govern"],"summary":"Cost Optimizations","description":"FinOps optimization recommendations — will aggregate from\n`agnext-{env}-usage-log-registry` + `agnext-{env}-usage-snapshots-registry`\nonce those registries start populating.","operationId":"cost_optimizations_api_v1_govern_cost_optimizations_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Cost Optimizations Api V1 Govern Cost Optimizations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/govern/compliance/frameworks":{"get":{"tags":["govern"],"summary":"Compliance Frameworks","description":"Compliance framework coverage (SOC 2, ISO 27001, UAE PDPL etc.) — will\ncome from `agnext-{env}-compliance-controls-registry` once that registry\nstarts populating.","operationId":"compliance_frameworks_api_v1_govern_compliance_frameworks_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Compliance Frameworks Api V1 Govern Compliance Frameworks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/inbox":{"get":{"tags":["inbox"],"summary":"List Inbox","operationId":"list_inbox_api_v1_tenant_inbox_get","parameters":[{"name":"sector","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InboxEvent"},"title":"Response List Inbox Api V1 Tenant Inbox Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/onboarding":{"get":{"tags":["platform-tenants"],"summary":"List Tenants","description":"Merge seed list + DDB-stored. Platform-ops only.","operationId":"list_tenants_api_v1_platform_onboarding_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantRecord"},"title":"Response List Tenants Api V1 Platform Onboarding Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/onboarding/{tenant_id}":{"get":{"tags":["platform-tenants"],"summary":"Get Tenant","operationId":"get_tenant_api_v1_platform_onboarding__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["platform-tenants"],"summary":"Deactivate Tenant","description":"Mark a tenant as INACTIVE (hides it from the UI).\n\nNOTE: This does NOT close the underlying AWS account — that's a manual\nControl Tower procedure (account leaves the org, takes ~90 days for\nfull closure). Use this to remove failed/test tenants from view.","operationId":"deactivate_tenant_api_v1_platform_onboarding__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deactivate Tenant Api V1 Platform Onboarding  Tenant Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/onboarding/provision":{"post":{"tags":["platform-tenants"],"summary":"Provision Tenant","description":"Start Account Factory provisioning + run post-provision sector-pack hooks.\n\nTwo modes:\n  * `full`  — real Account Factory (async 15-30 min). Sector-pack hooks\n              run later, when `/status` observes SUCCEEDED (or via manual\n              `/finalize` if the polling client isn't around).\n  * `fast`  — skip Account Factory; land the tenant in the shared cell\n              (no new AWS account created). Sector-pack hooks run inline\n              so the tenant is usable in seconds. For pilot iteration.\n\nReturns immediately with status=provisioning; poll\n`/platform/onboarding/{tenant_id}/status` for completion.","operationId":"provision_tenant_api_v1_platform_onboarding_provision_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/onboarding/{tenant_id}/finalize":{"post":{"tags":["platform-tenants"],"summary":"Finalize Tenant","description":"Manually trigger post-provision hooks for a tenant.\n\nUsed when Account Factory completes but the polling client isn't around to\ntrigger hooks automatically, or when a hook failed and we want to retry\nafter fixing whatever went wrong. Safe to re-run.","operationId":"finalize_tenant_api_v1_platform_onboarding__tenant_id__finalize_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/onboarding/{tenant_id}/status":{"get":{"tags":["platform-tenants"],"summary":"Get Tenant Status","description":"Poll Account Factory record. Promotes tenant to status=ready when SC reports SUCCEEDED.","operationId":"get_tenant_status_api_v1_platform_onboarding__tenant_id__status_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/subscription":{"get":{"tags":["tenant-subscription"],"summary":"Get Subscription","description":"Return this tenant's subscription/bundle info.\n\nFalls back to sensible defaults (voice + chat_workflow) when the tenant\nrow is not in the registry — keeps existing pilot tenants unaffected.","operationId":"get_subscription_api_v1_tenant_subscription_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/users":{"get":{"tags":["tenant-users"],"summary":"List Tenant Users","operationId":"list_tenant_users_api_v1_tenant_users_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantUser"},"title":"Response List Tenant Users Api V1 Tenant Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/users/invite":{"post":{"tags":["tenant-users"],"summary":"Invite Tenant User","operationId":"invite_tenant_user_api_v1_tenant_users_invite_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__tenant_users__InviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/users/{user_id}/role":{"put":{"tags":["tenant-users"],"summary":"Set User Role","operationId":"set_user_role_api_v1_tenant_users__user_id__role_put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleChangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/users/{user_id}/disable":{"post":{"tags":["tenant-users"],"summary":"Disable User","operationId":"disable_user_api_v1_tenant_users__user_id__disable_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/users/{user_id}/enable":{"post":{"tags":["tenant-users"],"summary":"Enable User","operationId":"enable_user_api_v1_tenant_users__user_id__enable_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/scenarios":{"get":{"tags":["demo"],"summary":"List Demo Scenarios","description":"List ITSM demo scenarios visible to this caller.\n\nNo auth. Customer profile is the default. Lab requires the shared key.\nThe response shape is identical across profiles — only the set changes.","operationId":"list_demo_scenarios_api_v1_demo_scenarios_get","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"customer_wed","title":"Profile"}},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/execute":{"post":{"tags":["demo"],"summary":"Execute Demo Scenario","description":"Run a whitelisted ITSM demo scenario through the real dispatcher.\n\nThe scenario_id must exist AND be visible to the resolved profile.\nMismatches return 404 — we never echo back data the caller wasn't\nentitled to see.","operationId":"execute_demo_scenario_api_v1_demo_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteDemoRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/ceo/scenarios":{"get":{"tags":["demo-ceo"],"summary":"List Ceo Scenarios","description":"Preset scenarios for the CEO demo dropdown.\n\nShape mirrors what the static HTML expects: `{\"ceo\": [{id, name, summary,\npayload}, ...]}`. Other sectors return empty arrays so the same dropdown\nscaffold works if we later expose Government / BFSI etc. presets here.","operationId":"list_ceo_scenarios_api_v1_demo_ceo_scenarios_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Ceo Scenarios Api V1 Demo Ceo Scenarios Get"}}}}}}},"/api/v1/demo/ceo/run":{"post":{"tags":["demo-ceo"],"summary":"Run Ceo Pipeline","description":"Dispatch a CEO directive through the real UniversalDispatcher.\n\nSync route — dispatcher.run() runs in FastAPI's threadpool. Returns the\ndispatcher's dict verbatim so the HTML client can read `sector`, `intent`,\nand `trace[]` (with per-stage `agent_traces` and `result_summary`).","operationId":"run_ceo_pipeline_api_v1_demo_ceo_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__demo_ceo__RunPipelineRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Ceo Pipeline Api V1 Demo Ceo Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/smb/starters":{"get":{"tags":["demo-smb"],"summary":"List Starters","description":"Chip suggestions shown above the chat input.\n\nEach starter maps to one of the 10 intents Lokesh built into the bot,\npicked to demo the sales-funnel arc: awareness → info → qualify → capture.","operationId":"list_starters_api_v1_demo_smb_starters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Starters Api V1 Demo Smb Starters Get"}}}}}}},"/api/v1/demo/smb/chat":{"post":{"tags":["demo-smb"],"summary":"Send Chat","description":"One conversational turn against the SMB Lex bot.\n\nSession state lives in Lex (per session_id). Client is expected to hold\nonto the session_id we return and pass it back on subsequent turns so\nslot elicitation flows work across messages.","operationId":"send_chat_api_v1_demo_smb_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__demo_smb__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatReply"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/network-diagnosis/diagnose":{"post":{"tags":["demo-network-diagnosis"],"summary":"Diagnose","description":"Run the 6-agent LangGraph pipeline for a customer complaint.\n\nResponse shape matches what `use_cases/network_diagnosis/demo_ui/app.js`\nexpects: {execution_path, skipped_stages, intake, diagnostics, self_healing,\ndecision, technician_dispatch, communication, ticket_id, customer_response,\n...}.","operationId":"diagnose_api_v1_demo_network_diagnosis_diagnose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnoseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Diagnose Api V1 Demo Network Diagnosis Diagnose Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/network-diagnosis/chat":{"post":{"tags":["demo-network-diagnosis"],"summary":"Chat","description":"Chat entry point — runs the same 6-agent LangGraph pipeline as /diagnose\nbut returns a chat-shaped payload the transformed /chat SPA route can render.\n\n- Extracts an inline `[Customer id: XXX]` marker so the free-text flow\n  still binds to a specific PPF subscriber.\n- Returns customer-facing `reply` and full-fat `trace` for the right-side\n  trace panel. `retrieved_runbooks` is surfaced at top-level for the\n  \"Runbook consulted\" audit affordance in the UI. The `reply` text\n  itself never contains runbook filenames.","operationId":"chat_api_v1_demo_network_diagnosis_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__demo_network_diagnosis__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Chat Api V1 Demo Network Diagnosis Chat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/network-diagnosis/complaints":{"get":{"tags":["demo-network-diagnosis"],"summary":"List Complaints","description":"Latest N complaints from DynamoDB, newest first.\n\nPowers the \"Live Complaints\" feed on the KPI dashboard — as chat customers\ninteract with the /chat surface, rows appear at the top of this list.","operationId":"list_complaints_api_v1_demo_network_diagnosis_complaints_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Complaints Api V1 Demo Network Diagnosis Complaints Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/network-diagnosis/kpi":{"get":{"tags":["demo-network-diagnosis"],"summary":"Kpi","description":"Aggregate KPI metrics computed from the latest complaints window.\n\nQuery: last 50 rows in the `ppf-telecom` partition (newest first).\nAggregation rules — see docstring at bottom of the function.\nReturns numbers the kpi.tsx dashboard renders.","operationId":"kpi_api_v1_demo_network_diagnosis_kpi_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Kpi Api V1 Demo Network Diagnosis Kpi Get"}}}}}}},"/api/v1/demo/network-diagnosis/health":{"get":{"tags":["demo-network-diagnosis"],"summary":"Health","operationId":"health_api_v1_demo_network_diagnosis_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Demo Network Diagnosis Health Get"}}}}}}},"/api/v1/demo/moj/health":{"get":{"tags":["demo-moj"],"summary":"Health","description":"Liveness + Bedrock status. Mirrors server.py /api/health.","operationId":"health_api_v1_demo_moj_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Api V1 Demo Moj Health Get"}}}}}}},"/api/v1/demo/moj/chat":{"post":{"tags":["demo-moj"],"summary":"Chat","description":"Bedrock-grounded answer with pre-defined fallback.\n\nOrder per server.py:\n  1. must_refuse(query)              → predefined refusal\n  2. ask_bedrock(...)                → Bedrock answer (if successful)\n  3. JudicialChatbotTool.query(...)  → predefined fallback","operationId":"chat_api_v1_demo_moj_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__demo_moj__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Chat Api V1 Demo Moj Chat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/dp_world/health":{"get":{"tags":["demo-dp-world"],"summary":"Health","description":"Liveness & health status for DP World demo.","operationId":"health_api_v1_demo_dp_world_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Api V1 Demo Dp World Health Get"}}}}}}},"/api/v1/demo/dp_world/state":{"get":{"tags":["demo-dp-world"],"summary":"Get State","description":"Return full current demo state.","operationId":"get_state_api_v1_demo_dp_world_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get State Api V1 Demo Dp World State Get"}}}}}}},"/api/v1/demo/dp_world/scene":{"post":{"tags":["demo-dp-world"],"summary":"Set Scene","description":"Jump to a specific scenario scene.","operationId":"set_scene_api_v1_demo_dp_world_scene_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SceneRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Scene Api V1 Demo Dp World Scene Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/dp_world/backfill":{"post":{"tags":["demo-dp-world"],"summary":"Approve Backfill","description":"Approve human-in-the-loop backfill reassignment.","operationId":"approve_backfill_api_v1_demo_dp_world_backfill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Approve Backfill Api V1 Demo Dp World Backfill Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/dp_world/reset":{"post":{"tags":["demo-dp-world"],"summary":"Reset State","description":"Reset demo state to initial seed.","operationId":"reset_state_api_v1_demo_dp_world_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset State Api V1 Demo Dp World Reset Post"}}}}}}},"/api/v1/demo/dp_world/agent/run":{"post":{"tags":["demo-dp-world"],"summary":"Run Agent","description":"Execute a named specialist agent.","operationId":"run_agent_api_v1_demo_dp_world_agent_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__demo_dp_world__AgentRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Agent Api V1 Demo Dp World Agent Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/dp_world/chat":{"post":{"tags":["demo-dp-world"],"summary":"Chat","description":"Squad Copilot grounded answer.","operationId":"chat_api_v1_demo_dp_world_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__demo_dp_world__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Chat Api V1 Demo Dp World Chat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/smb-kpi/run-pipeline":{"post":{"tags":["demo-smb-kpi"],"summary":"Run Pipeline","description":"Full 4-stage SMB outbound lead-gen pipeline.\n\nResponse shape mirrors what `use_cases/smb/demo_ui/server.py` returns\n(via `PipelineResponse`), so the deployed app.js works unchanged aside\nfrom the URL path swap.","operationId":"run_pipeline_api_v1_demo_smb_kpi_run_pipeline_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__demo_smb_kpi__RunPipelineRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Pipeline Api V1 Demo Smb Kpi Run Pipeline Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/smb-kpi/assistant-chat":{"post":{"tags":["demo-smb-kpi"],"summary":"Assistant Chat","operationId":"assistant_chat_api_v1_demo_smb_kpi_assistant_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Assistant Chat Api V1 Demo Smb Kpi Assistant Chat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/smb-kpi/health":{"get":{"tags":["demo-smb-kpi"],"summary":"Health","operationId":"health_api_v1_demo_smb_kpi_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Demo Smb Kpi Health Get"}}}}}}},"/api/v1/demo/feedback/":{"post":{"tags":["demo-feedback"],"summary":"Submit Feedback","operationId":"submit_feedback_api_v1_demo_feedback__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Submit Feedback Api V1 Demo Feedback  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/feedback":{"post":{"tags":["demo-feedback"],"summary":"Submit Feedback","operationId":"submit_feedback_api_v1_demo_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Submit Feedback Api V1 Demo Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/demo/feedback/health":{"get":{"tags":["demo-feedback"],"summary":"Health","operationId":"health_api_v1_demo_feedback_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Demo Feedback Health Get"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Login Api V1 Auth Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/set-password":{"post":{"tags":["auth"],"summary":"Set Password","description":"Respond to a NEW_PASSWORD_REQUIRED challenge from /auth/login.","operationId":"set_password_api_v1_auth_set_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Password Api V1 Auth Set Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-mfa-setup":{"post":{"tags":["auth"],"summary":"Verify Mfa Setup","description":"Second step of TOTP enrollment.\n\nFlow (owned by this endpoint):\n  1. verify_software_token(Session, UserCode) → Status=SUCCESS, new Session\n  2. admin_respond_to_auth_challenge(ChallengeName=MFA_SETUP, Session=new)\n     → either an AuthenticationResult (IdToken) or the next challenge","operationId":"verify_mfa_setup_api_v1_auth_verify_mfa_setup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyMfaSetupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Verify Mfa Setup Api V1 Auth Verify Mfa Setup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/respond-to-mfa":{"post":{"tags":["auth"],"summary":"Respond To Mfa","description":"Submit a TOTP (SOFTWARE_TOKEN_MFA) or SMS (SMS_MFA) one-time code.\n\nSOFTWARE_TOKEN_MFA is the live path today. SMS_MFA is kept wired so the\nfrontend's \"enter MFA code\" view keeps working if a pool flips to SMS; no\npool has it enabled right now.","operationId":"respond_to_mfa_api_v1_auth_respond_to_mfa_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondToMfaRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Respond To Mfa Api V1 Auth Respond To Mfa Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/discover":{"get":{"tags":["auth-discover"],"summary":"Discover","operationId":"discover_api_v1_auth_discover_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Discover Api V1 Auth Discover Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/uaepass/exchange":{"post":{"tags":["auth"],"summary":"Canonical Exchange","operationId":"canonical_exchange_api_v1_auth_uaepass_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/uaepass/exchange":{"post":{"tags":["auth"],"summary":"Compat Exchange","operationId":"compat_exchange_api_v1_uaepass_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/uaepass/profile/{customer_id}":{"get":{"tags":["auth"],"summary":"Get Profile","operationId":"get_profile_api_v1_auth_uaepass_profile__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/uaepass/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_uaepass_logout_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UaePassLogoutRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassLogoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/customer/lookup":{"post":{"tags":["business-one"],"summary":"Lookup","description":"Step 1 — look the customer up, and issue an OTP only if they exist.\n\nA miss returns customerExists=false with no reference, so the client can say\nso directly instead of showing a code screen that can never succeed.","operationId":"lookup_api_v1_business_one_customer_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/customer/verify":{"post":{"tags":["business-one"],"summary":"Verify","description":"Step 2 — verify the code, create the Business One profile, return masked data.","operationId":"verify_api_v1_business_one_customer_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedCustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/customer/memory":{"get":{"tags":["business-one"],"summary":"Get Customer Memory","description":"Returns the founder's long-term and short-term memory profile.","operationId":"get_customer_memory_api_v1_business_one_customer_memory_get","parameters":[{"name":"customerId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["business-one"],"summary":"Update Customer Memory","description":"Updates founder long-term memory.","operationId":"update_customer_memory_api_v1_business_one_customer_memory_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemoryBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/customer/licence":{"get":{"tags":["business-one"],"summary":"Get Issued Licence","description":"The founder's issued licence draft, or null when they have none.","operationId":"get_issued_licence_api_v1_business_one_customer_licence_get","parameters":[{"name":"customerId","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Customerid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["business-one"],"summary":"Save Issued Licence","description":"Keep the founder's licence once it is issued.","operationId":"save_issued_licence_api_v1_business_one_customer_licence_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedLicenceBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["business-one"],"summary":"Reset Issued Licence","description":"Demo reset: forget the founder's licence so the first-time journey can be\nrun again. Refused in production, where a licence is not ours to delete.","operationId":"reset_issued_licence_api_v1_business_one_customer_licence_delete","parameters":[{"name":"customerId","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Customerid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/advisor":{"post":{"tags":["business-one-voice"],"summary":"Handle Voice Advisor Turn","description":"Direct, stateful Voice AI Advisor powered by LangGraph BusinessOneSupervisor.\n\nMaintains long-term founder memory, detects new business ventures dynamically,\nand returns high-quality neural audio.","operationId":"handle_voice_advisor_turn_api_v1_business_one_voice_advisor_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceAdvisorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/stt":{"post":{"tags":["business-one-voice"],"summary":"Handle Grok Stt","description":"Production-grade speech recognition powered by official xAI Grok STT API (grok-voice-transcribe-2.0).\n\nTranscribes user microphone audio with 100% precision for Emirati Arabic (ar-ae) and English.","operationId":"handle_grok_stt_api_v1_business_one_voice_stt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrokSttRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/turn":{"post":{"tags":["business-one-voice"],"summary":"Handle Voice Conversation Turn","description":"Production-grade conversation turn: Grok STT -> LangGraph Supervisor -> Grok Neural TTS.\n\n1. If user audio is provided: Transcribes using Grok STT API (grok-voice-transcribe-2.0).\n2. Identifies language (ar-ae or en) and business setup intent.\n3. Executes LangGraph BusinessOneSupervisor for stateful multi-agent intelligence.\n4. Synthesizes Sara's spoken response using Grok Neural Voice (liora).\n5. Returns exact transcribed user_text and Sara's agent response with audio for Conversation History.","operationId":"handle_voice_conversation_turn_api_v1_business_one_voice_turn_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/xaia/status":{"get":{"tags":["business-one-voice"],"summary":"Get Voice Status","description":"Which voice provider the Voice Advisor should render, and whether XAIA is ready.\n\nReveals no ids or credentials — only booleans the UI needs to pick a mode.","operationId":"get_voice_status_api_v1_business_one_voice_xaia_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XaiaVoiceStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/xaia/call":{"post":{"tags":["business-one-voice"],"summary":"Place Call","description":"Have Sara call the founder's phone through the configured XAIA workflow.\n\nConsent + DNC are checked before XAIA is contacted; a failure here never\nrings the founder's phone.","operationId":"place_call_api_v1_business_one_voice_xaia_call_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XaiaCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XaiaCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/xaia/calls/{thread_id}":{"get":{"tags":["business-one-voice"],"summary":"Get Call","description":"Live status + transcript for one of the founder's calls.\n\nPolled by the Voice Advisor while the call is in progress; the first poll\nthat sees ``ended`` closes the row in VoiceCallRegistry.","operationId":"get_call_api_v1_business_one_voice_xaia_calls__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"include_transcript","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Transcript"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XaiaCallDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/xaia/inbound":{"post":{"tags":["business-one-voice"],"summary":"Inbound Call Ended","description":"XAIA's call-ended webhook: store the call and its transcript, once.","operationId":"inbound_call_ended_api_v1_business_one_voice_xaia_inbound_post","parameters":[{"name":"secret","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XaiaCallEvent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundCallAck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/business-one/voice/xaia/inbound/latest":{"get":{"tags":["business-one-voice"],"summary":"Latest Inbound Call","description":"The latest inbound call for the Voice Advisor page.\n\nThe founder's own latest call (caller number = the phone on their\nprofile). Outside production, the latest call to the number when they\nhave none, so a demo works from any phone.","operationId":"latest_inbound_call_api_v1_business_one_voice_xaia_inbound_latest_get","parameters":[{"name":"customerId","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Customerid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestInboundCall"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/uaepass/exchange":{"post":{"tags":["auth"],"summary":"Canonical Exchange","operationId":"canonical_exchange_api_auth_uaepass_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/uaepass/exchange":{"post":{"tags":["auth"],"summary":"Compat Exchange","operationId":"compat_exchange_api_uaepass_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassExchangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/uaepass/profile/{customer_id}":{"get":{"tags":["auth"],"summary":"Get Profile","operationId":"get_profile_api_auth_uaepass_profile__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/uaepass/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_auth_uaepass_logout_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UaePassLogoutRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UaePassLogoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tts/voices":{"get":{"tags":["TTS"],"summary":"List Grok Voices","description":"List available official xAI Grok neural voices.","operationId":"list_grok_voices_api_v1_tts_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/tts":{"post":{"tags":["TTS"],"summary":"Synthesize Grok Voice","description":"Synthesize speech using xAI Grok ultra-low-latency neural TTS.\n\nReturns base64 MP3 audio payload for instant browser playback.","operationId":"synthesize_grok_voice_api_v1_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsSynthesisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tts/voices":{"get":{"tags":["TTS"],"summary":"List Grok Voices","description":"List available official xAI Grok neural voices.","operationId":"list_grok_voices_api_tts_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tts":{"post":{"tags":["TTS"],"summary":"Synthesize Grok Voice","description":"Synthesize speech using xAI Grok ultra-low-latency neural TTS.\n\nReturns base64 MP3 audio payload for instant browser playback.","operationId":"synthesize_grok_voice_api_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsSynthesisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}/messages":{"post":{"tags":["conversations"],"summary":"Send Message","description":"Send a message on a conversation; return the assistant's reply.","operationId":"send_message_api_v1_conversations__conversation_id__messages_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"sigma-itops","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/market-intel/analyze":{"post":{"tags":["market-intel"],"summary":"Analyze Idea","description":"Evaluates business idea viability using MarketIntelligenceAgent.\n\nPublic preview route — no auth required. This is a top-of-funnel\ndiscovery step (SMB owners exploring ideas before signing in via\nUAE Pass). Per-IP hourly limit protects against LLM-cost abuse.","operationId":"analyze_idea_api_v1_market_intel_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdeaBriefInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViabilityMemoOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/market-intel/analyze":{"post":{"tags":["market-intel"],"summary":"Analyze Idea","description":"Evaluates business idea viability using MarketIntelligenceAgent.\n\nPublic preview route — no auth required. This is a top-of-funnel\ndiscovery step (SMB owners exploring ideas before signing in via\nUAE Pass). Per-IP hourly limit protects against LLM-cost abuse.","operationId":"analyze_idea_api_market_intel_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdeaBriefInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViabilityMemoOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/licensing/trade-name/check":{"post":{"tags":["licensing"],"summary":"Check Trade Name","description":"Check trade-name availability with DET and suggested alternatives.\n\nPublic preview route — no auth. Users trying a business idea shouldn't\nbe forced through UAE Pass just to see if the trade name is free.\nPer-IP hourly limit protects the DET/LLM cost path.","operationId":"check_trade_name_api_v1_licensing_trade_name_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeNameCheckInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeNameCheckOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/licensing/voucher":{"post":{"tags":["licensing"],"summary":"Get Payment Voucher","description":"Get official government payment voucher breakdown for trade license.","operationId":"get_payment_voucher_api_v1_licensing_voucher_post","parameters":[{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","default":"DED_MAINLAND","title":"Jurisdiction"}},{"name":"trade_name","in":"query","required":false,"schema":{"type":"string","default":"My Business","title":"Trade Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentVoucherOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["licensing"],"summary":"Get Payment Voucher","description":"Get official government payment voucher breakdown for trade license.","operationId":"get_payment_voucher_api_v1_licensing_voucher_get","parameters":[{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","default":"DED_MAINLAND","title":"Jurisdiction"}},{"name":"trade_name","in":"query","required":false,"schema":{"type":"string","default":"My Business","title":"Trade Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentVoucherOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/licensing/payment/pay":{"post":{"tags":["licensing"],"summary":"Execute License Payment","description":"Execute license voucher payment and generate issued official commercial license.\n\nMock — returns fake transaction + license numbers. No real payment settlement.","operationId":"execute_license_payment_api_v1_licensing_payment_pay_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentExecutionInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentExecutionOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/licensing/trade-name/check":{"post":{"tags":["licensing"],"summary":"Check Trade Name","description":"Check trade-name availability with DET and suggested alternatives.\n\nPublic preview route — no auth. Users trying a business idea shouldn't\nbe forced through UAE Pass just to see if the trade name is free.\nPer-IP hourly limit protects the DET/LLM cost path.","operationId":"check_trade_name_api_licensing_trade_name_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeNameCheckInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeNameCheckOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/licensing/voucher":{"post":{"tags":["licensing"],"summary":"Get Payment Voucher","description":"Get official government payment voucher breakdown for trade license.","operationId":"get_payment_voucher_api_licensing_voucher_post","parameters":[{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","default":"DED_MAINLAND","title":"Jurisdiction"}},{"name":"trade_name","in":"query","required":false,"schema":{"type":"string","default":"My Business","title":"Trade Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentVoucherOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["licensing"],"summary":"Get Payment Voucher","description":"Get official government payment voucher breakdown for trade license.","operationId":"get_payment_voucher_api_licensing_voucher_get","parameters":[{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","default":"DED_MAINLAND","title":"Jurisdiction"}},{"name":"trade_name","in":"query","required":false,"schema":{"type":"string","default":"My Business","title":"Trade Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentVoucherOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/licensing/payment/pay":{"post":{"tags":["licensing"],"summary":"Execute License Payment","description":"Execute license voucher payment and generate issued official commercial license.\n\nMock — returns fake transaction + license numbers. No real payment settlement.","operationId":"execute_license_payment_api_licensing_payment_pay_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentExecutionInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentExecutionOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/voice/catalog":{"get":{"tags":["voice"],"summary":"List Tenant Catalog","description":"Sector-filtered view of the platform voice catalog for a tenant admin.\n\nSame rows the platform admin sees under ``/platform/voice/catalog``, but\nfiltered to entries that the tenant is entitled to:\n  * ``sectors == []`` — available to every tenant.\n  * ``sectors`` contains the tenant's own sector — targeted.\n\nAny authenticated tenant user (TenantAdmin or plain) can call this — it\nreveals catalog metadata only, no XAIA credentials.","operationId":"list_tenant_catalog_api_v1_tenant_voice_catalog_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(workflow|phone_group)$"},{"type":"null"}],"title":"Kind"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CatalogEntry"},"title":"Response List Tenant Catalog Api V1 Tenant Voice Catalog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/voice/catalog":{"get":{"tags":["voice"],"summary":"List Catalog","operationId":"list_catalog_api_v1_platform_voice_catalog_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(workflow|phone_group)$"},{"type":"null"}],"title":"Kind"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CatalogEntry"},"title":"Response List Catalog Api V1 Platform Voice Catalog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/voice/catalog/workflows":{"post":{"tags":["voice"],"summary":"Register Workflow","operationId":"register_workflow_api_v1_platform_voice_catalog_workflows_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogWorkflowRegisterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/voice/catalog/phone-groups":{"post":{"tags":["voice"],"summary":"Register Phone Group","operationId":"register_phone_group_api_v1_platform_voice_catalog_phone_groups_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPhoneGroupRegisterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/voice/catalog/{catalog_key}":{"delete":{"tags":["voice"],"summary":"Delete Catalog Entry","operationId":"delete_catalog_entry_api_v1_platform_voice_catalog__catalog_key__delete","parameters":[{"name":"catalog_key","in":"path","required":true,"schema":{"type":"string","title":"Catalog Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Catalog Entry Api V1 Platform Voice Catalog  Catalog Key  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/voice/catalog/import-from-xaia":{"post":{"tags":["voice"],"summary":"Import Workflow From Xaia","description":"Call XAIA to fetch a workflow's metadata + external_inputs, then register it.\n\nConvenience endpoint so a platform admin can paste a XAIA workflow_id and\nget the schema auto-filled rather than hand-typing every ``external_inputs``\nentry.","operationId":"import_workflow_from_xaia_api_v1_platform_voice_catalog_import_from_xaia_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/voice/verify-key":{"post":{"tags":["voice"],"summary":"Verify Key","description":"Prove the platform XAIA key works. Not tenant-specific — but only\ntenant admins should hit it, so we gate on any authenticated user.","operationId":"verify_key_api_v1_tenant_voice_verify_key_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/voice/xaia/phone-groups":{"get":{"tags":["voice"],"summary":"List Phone Groups","description":"Live list of XAIA phone-number-groups this tenant can pick from.\n\nDrives the Voice Config page's dropdown so admins can't type a dead UUID.","operationId":"list_phone_groups_api_v1_tenant_voice_xaia_phone_groups_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberGroup"},"title":"Response List Phone Groups Api V1 Tenant Voice Xaia Phone Groups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/voice/config":{"get":{"tags":["voice"],"summary":"Get Config","operationId":"get_config_api_v1_tenant_voice_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantVoiceConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["voice"],"summary":"Upsert Config","operationId":"upsert_config_api_v1_tenant_voice_config_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantVoiceConfigUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantVoiceConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/voice/outbound-call":{"post":{"tags":["voice"],"summary":"Outbound Call","description":"Place a call via XAIA and remember it in the tenant's history.\n\nRole gate: viewers may not place calls (write action, bills minutes).\nConsent + DNC are checked before hitting XAIA; a failure here never\ncontacts the customer. Every attempt (including refusals) lands in\nthe audit log so compliance can account for every minute consumed.","operationId":"outbound_call_api_v1_tenant_voice_outbound_call_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/voice/calls":{"get":{"tags":["voice"],"summary":"List Calls","description":"Call history for the tenant.\n\nVisibility rules:\n* **tenant-admin / platform-ops**: all calls in the tenant.\n* **tenant-user** (end user): only calls they placed themselves — their\n  own `triggered_by` matches `user.email`. Keeps call content scoped to\n  the person who owns it; cross-user visibility is explicitly a\n  supervisor/admin function.\n* **tenant-viewer**: all calls, read-only (auditor / observer role).","operationId":"list_calls_api_v1_tenant_voice_calls_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CallRow"},"title":"Response List Calls Api V1 Tenant Voice Calls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenant/voice/calls/{thread_id}":{"get":{"tags":["voice"],"summary":"Get Call","operationId":"get_call_api_v1_tenant_voice_calls__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"include_transcript","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Transcript"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIConfigResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/AIProvider"},"type":"array","title":"Providers"},"feature_assignments":{"items":{"$ref":"#/components/schemas/FeatureAssignment"},"type":"array","title":"Feature Assignments"},"guardrails":{"items":{"$ref":"#/components/schemas/GuardrailToggle"},"type":"array","title":"Guardrails"},"calls_by_feature_30d":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Calls By Feature 30D"},"cost_trend_30d":{"items":{"$ref":"#/components/schemas/CostPoint"},"type":"array","title":"Cost Trend 30D"},"avg_daily_cost":{"type":"number","title":"Avg Daily Cost"}},"type":"object","required":["providers","feature_assignments","guardrails","calls_by_feature_30d","cost_trend_30d","avg_daily_cost"],"title":"AIConfigResponse"},"AIFeatureAdoptionRow":{"properties":{"feature":{"type":"string","title":"Feature"},"users_using":{"type":"integer","title":"Users Using"},"workflows_using":{"type":"integer","title":"Workflows Using"},"calls_30d":{"type":"integer","title":"Calls 30D"},"trend":{"type":"string","title":"Trend"}},"type":"object","required":["feature","users_using","workflows_using","calls_30d","trend"],"title":"AIFeatureAdoptionRow"},"AIProvider":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"is_byok":{"type":"boolean","title":"Is Byok"},"models":{"items":{"type":"string"},"type":"array","title":"Models"},"api_key_label":{"type":"string","title":"Api Key Label"},"api_key_valid":{"type":"boolean","title":"Api Key Valid"},"usage_calls_30d":{"type":"integer","title":"Usage Calls 30D"},"usage_cost_usd_30d":{"type":"number","title":"Usage Cost Usd 30D"}},"type":"object","required":["provider_id","name","status","is_byok","models","api_key_label","api_key_valid","usage_calls_30d","usage_cost_usd_30d"],"title":"AIProvider"},"AIProviderStatus":{"properties":{"provider":{"type":"string","title":"Provider"},"status":{"type":"string","title":"Status"},"latency_p50_s":{"type":"number","title":"Latency P50 S"},"error_rate_pct":{"type":"number","title":"Error Rate Pct"}},"type":"object","required":["provider","status","latency_p50_s","error_rate_pct"],"title":"AIProviderStatus"},"AddVersionBody":{"properties":{"definition":{"$ref":"#/components/schemas/WorkflowDefinition"}},"type":"object","required":["definition"],"title":"AddVersionBody"},"AdminRemove":{"properties":{"kb_id":{"type":"string","maxLength":100,"minLength":3,"pattern":"^[A-Za-z0-9_\\-]+$","title":"Kb Id"},"key":{"type":"string","maxLength":200,"minLength":1,"title":"Key"}},"type":"object","required":["kb_id","key"],"title":"AdminRemove"},"AdminRequest":{"properties":{"key":{"type":"string","maxLength":200,"minLength":1,"title":"Key"}},"type":"object","required":["key"],"title":"AdminRequest"},"AgentCorePathResponse":{"properties":{"path":{"type":"string","title":"Path"},"runtime_arn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime Arn"},"env":{"type":"string","title":"Env"},"dispatcher_endpoint":{"type":"string","title":"Dispatcher Endpoint"}},"type":"object","required":["path","runtime_arn","env","dispatcher_endpoint"],"title":"AgentCorePathResponse"},"AgentCreateRequest":{"properties":{"name":{"type":"string","maxLength":80,"minLength":2,"title":"Name"},"role":{"type":"string","maxLength":240,"title":"Role","default":""},"system_prompt":{"type":"string","maxLength":8000,"title":"System Prompt","default":""},"model_tier":{"type":"string","enum":["fast","primary"],"title":"Model Tier","default":"primary"},"model_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model Id"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"knowledge_bases":{"items":{"type":"string"},"type":"array","maxItems":5,"title":"Knowledge Bases"},"memory_strategy":{"type":"string","enum":["none","short-term","long-term"],"title":"Memory Strategy","default":"none"},"version":{"type":"string","title":"Version","default":"v1.0.0"},"status":{"type":"string","enum":["draft","active","archived"],"title":"Status","default":"draft"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"prompt_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Prompt Id"}},"type":"object","required":["name"],"title":"AgentCreateRequest","description":"Payload for POST /tenant/agents — user-authored agent creation."},"AgentItem":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"tenant_id":{"type":"string","title":"Tenant Id"},"sector_hint":{"type":"string","title":"Sector Hint"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"model":{"type":"string","title":"Model"},"workflows_used_in":{"items":{"type":"string"},"type":"array","title":"Workflows Used In"},"source":{"type":"string","enum":["synthetic","live"],"title":"Source","default":"synthetic"},"forked_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"prompt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Id"},"prompt_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prompt Version"}},"type":"object","required":["agent_id","name","role","tenant_id","sector_hint","tools","model"],"title":"AgentItem"},"AgentRunError":{"properties":{"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"}},"type":"object","required":["type","message"],"title":"AgentRunError"},"AgentRunResult":{"properties":{"run_id":{"type":"string","title":"Run Id"},"agent_id":{"type":"string","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"status":{"type":"string","enum":["success","error"],"title":"Status"},"output":{"title":"Output"},"text":{"type":"string","title":"Text","default":""},"structured":{"type":"boolean","title":"Structured","default":false},"model_id":{"type":"string","title":"Model Id","default":""},"model_calls":{"type":"integer","title":"Model Calls","default":0},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Reason"},"tool_calls":{"items":{"$ref":"#/components/schemas/AgentToolCallOut"},"type":"array","title":"Tool Calls"},"tools_unavailable":{"items":{"type":"string"},"type":"array","title":"Tools Unavailable"},"knowledge_unavailable":{"items":{"type":"string"},"type":"array","title":"Knowledge Unavailable"},"citations":{"items":{"$ref":"#/components/schemas/KnowledgeCitationOut"},"type":"array","title":"Citations"},"retrievals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Retrievals"},"writes":{"additionalProperties":true,"type":"object","title":"Writes"},"prompt":{"additionalProperties":true,"type":"object","title":"Prompt"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"tokens_in":{"type":"integer","title":"Tokens In","default":0},"tokens_out":{"type":"integer","title":"Tokens Out","default":0},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"latency_ms":{"type":"integer","title":"Latency Ms","default":0},"error":{"anyOf":[{"$ref":"#/components/schemas/AgentRunError"},{"type":"null"}]},"validation_errors":{"items":{"type":"string"},"type":"array","title":"Validation Errors"},"spans":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Spans"}},"type":"object","required":["run_id","agent_id","agent_name","status"],"title":"AgentRunResult"},"AgentTestError":{"properties":{"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"}},"type":"object","required":["type","message"],"title":"AgentTestError"},"AgentTestRequest":{"properties":{"agent_id":{"type":"string","maxLength":200,"minLength":1,"title":"Agent Id"},"source":{"type":"string","enum":["starter","custom"],"title":"Source"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","maxItems":40,"minItems":1,"title":"Messages"},"allow_tools":{"type":"boolean","title":"Allow Tools","default":true},"max_tool_rounds":{"type":"integer","maximum":8.0,"minimum":1.0,"title":"Max Tool Rounds","default":5},"prompt_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Prompt Version"}},"type":"object","required":["agent_id","source","messages"],"title":"AgentTestRequest"},"AgentTestResult":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"status":{"type":"string","enum":["success","error"],"title":"Status"},"reply":{"type":"string","title":"Reply","default":""},"model_label":{"type":"string","title":"Model Label"},"model_id":{"type":"string","title":"Model Id"},"system_prompt_source":{"type":"string","enum":["defined","generated"],"title":"System Prompt Source"},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Reason"},"latency_ms":{"type":"integer","title":"Latency Ms","default":0},"model_calls":{"type":"integer","title":"Model Calls","default":0},"usage":{"$ref":"#/components/schemas/AgentTestUsage"},"tool_calls":{"items":{"$ref":"#/components/schemas/AgentToolCall"},"type":"array","title":"Tool Calls"},"tools_available":{"items":{"type":"string"},"type":"array","title":"Tools Available"},"tools_unavailable":{"items":{"type":"string"},"type":"array","title":"Tools Unavailable"},"knowledge_bases":{"items":{"type":"string"},"type":"array","title":"Knowledge Bases"},"citations":{"items":{"$ref":"#/components/schemas/KnowledgeCitation"},"type":"array","title":"Citations"},"guardrail_intervened":{"type":"boolean","title":"Guardrail Intervened","default":false},"error":{"anyOf":[{"$ref":"#/components/schemas/AgentTestError"},{"type":"null"}]},"prompt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Id"},"prompt_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prompt Version"},"prompt_is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prompt Is Published"},"prompt_warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Warning"},"tested_at":{"type":"string","title":"Tested At"}},"type":"object","required":["agent_id","agent_name","status","model_label","model_id","system_prompt_source","tested_at"],"title":"AgentTestResult"},"AgentTestUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","default":0}},"type":"object","title":"AgentTestUsage"},"AgentToolCall":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"tool_name":{"type":"string","title":"Tool Name"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"status":{"type":"string","enum":["success","error"],"title":"Status"},"mode":{"type":"string","enum":["live","simulated","gateway","knowledge"],"title":"Mode"},"summary":{"type":"string","title":"Summary"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status"},"latency_ms":{"type":"integer","title":"Latency Ms","default":0},"response":{"title":"Response"},"error":{"anyOf":[{"$ref":"#/components/schemas/AgentTestError"},{"type":"null"}]}},"type":"object","required":["tool_id","tool_name","input","status","mode","summary"],"title":"AgentToolCall"},"AgentToolCallOut":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"name":{"type":"string","title":"Name"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"status":{"type":"string","title":"Status"},"mode":{"type":"string","title":"Mode"},"output":{"title":"Output"},"error":{"anyOf":[{"$ref":"#/components/schemas/AgentRunError"},{"type":"null"}]},"latency_ms":{"type":"integer","title":"Latency Ms","default":0}},"type":"object","required":["tool_id","name","status","mode"],"title":"AgentToolCallOut"},"AgentTraceEntry":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"step":{"type":"string","title":"Step"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"duration_sec":{"type":"number","title":"Duration Sec"},"input_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Preview"},"output_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Preview"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"operation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},"type":"object","required":["agent_id","step","timestamp","duration_sec"],"title":"AgentTraceEntry","description":"A single agent action in the execution trace."},"AgentUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":2},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Role"},"system_prompt":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"System Prompt"},"model_tier":{"anyOf":[{"type":"string","enum":["fast","primary"]},{"type":"null"}],"title":"Model Tier"},"model_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model Id"},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools"},"knowledge_bases":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":5},{"type":"null"}],"title":"Knowledge Bases"},"memory_strategy":{"anyOf":[{"type":"string","enum":["none","short-term","long-term"]},{"type":"null"}],"title":"Memory Strategy"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["draft","active","archived"]},{"type":"null"}],"title":"Status"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"prompt_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Prompt Id"}},"type":"object","title":"AgentUpdateRequest","description":"Payload for PATCH /tenant/agents/{agent_id} — all fields optional."},"AlertHistoryRow":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"alert":{"type":"string","title":"Alert"},"severity":{"type":"string","title":"Severity"},"status":{"type":"string","title":"Status"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"}},"type":"object","required":["timestamp","alert","severity","status"],"title":"AlertHistoryRow"},"ApprovalEvent":{"properties":{"action":{"type":"string","enum":["submitted","approved","rejected"],"title":"Action"},"actor":{"type":"string","title":"Actor"},"actor_role":{"type":"string","title":"Actor Role","default":""},"timestamp":{"type":"string","title":"Timestamp"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["action","actor","timestamp"],"title":"ApprovalEvent"},"ApprovalItemOut":{"properties":{"item_id":{"type":"string","title":"Item Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"item_type":{"type":"string","title":"Item Type"},"item_type_label":{"type":"string","title":"Item Type Label"},"resource_id":{"type":"string","title":"Resource Id"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary","default":""},"payload":{"additionalProperties":true,"type":"object","title":"Payload","default":{}},"status":{"type":"string","enum":["pending","approved","rejected","withdrawn"],"title":"Status"},"submitted_by":{"type":"string","title":"Submitted By"},"submitted_by_role":{"type":"string","title":"Submitted By Role","default":""},"submitted_at":{"type":"string","title":"Submitted At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By"},"decided_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By Role"},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided At"},"decision_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Reason"}},"type":"object","required":["item_id","tenant_id","item_type","item_type_label","resource_id","title","status","submitted_by","submitted_at"],"title":"ApprovalItemOut"},"AskRequest":{"properties":{"kb_token":{"type":"string","maxLength":2000,"minLength":10,"title":"Kb Token"},"question":{"type":"string","maxLength":1000,"minLength":1,"title":"Question"},"history":{"items":{"$ref":"#/components/schemas/ChatTurn"},"type":"array","maxItems":12,"title":"History"},"lang":{"type":"string","pattern":"^(en|ar)$","title":"Lang","default":"en"},"key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Key"}},"type":"object","required":["kb_token","question"],"title":"AskRequest"},"AssessmentSubmission":{"properties":{"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"answers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Answers"},"notes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["answers"],"title":"AssessmentSubmission"},"AssistantChatRequest":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"additionalProperties":true,"type":"object","title":"AssistantChatRequest","description":"Passthrough — Lokesh's customer-assistant workflow takes free-form dicts."},"AuditEventOut":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"category":{"type":"string","title":"Category"},"severity":{"type":"string","title":"Severity"},"description":{"type":"string","title":"Description"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"},"event_id":{"type":"string","title":"Event Id","default":""},"tenant_id":{"type":"string","title":"Tenant Id","default":""},"action":{"type":"string","title":"Action","default":""},"actor":{"type":"string","title":"Actor","default":""},"actor_role":{"type":"string","title":"Actor Role","default":""},"resource_type":{"type":"string","title":"Resource Type","default":""},"resource_id":{"type":"string","title":"Resource Id","default":""},"resource_name":{"type":"string","title":"Resource Name","default":""},"outcome":{"type":"string","title":"Outcome","default":""},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["timestamp","category","severity","description"],"title":"AuditEventOut"},"BackfillRequest":{"properties":{"approver":{"type":"string","title":"Approver","default":"Sultan Al Dhaheri (e& Delivery Lead)"}},"type":"object","title":"BackfillRequest"},"BillingUsageResponse":{"properties":{"tenants":{"items":{"$ref":"#/components/schemas/TenantUsage"},"type":"array","title":"Tenants"},"is_platform_view":{"type":"boolean","title":"Is Platform View"}},"type":"object","required":["tenants","is_platform_view"],"title":"BillingUsageResponse"},"BlockCategory":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"type":"string","title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","icon"],"title":"BlockCategory","description":"Top-level category in the palette."},"BlockConfigField":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"}},"type":"object","required":["name","type"],"title":"BlockConfigField"},"BlockConnection":{"properties":{"from_block":{"type":"string","title":"From Block"},"from_output":{"type":"string","title":"From Output"},"to_block":{"type":"string","title":"To Block"},"to_input":{"type":"string","title":"To Input"}},"type":"object","required":["from_block","from_output","to_block","to_input"],"title":"BlockConnection","description":"Edge in the workflow DAG — connects one block's output to another's input."},"BlockInput":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"required":{"type":"boolean","title":"Required","default":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"}},"type":"object","required":["name","type"],"title":"BlockInput"},"BlockMetadata":{"properties":{"block_id":{"type":"string","title":"Block Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"icon":{"type":"string","title":"Icon","default":"📦"},"version":{"type":"string","title":"Version","default":"v1"},"source":{"type":"string","title":"Source"},"owner_tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Tenant Id"},"inputs":{"items":{"$ref":"#/components/schemas/BlockInput"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/BlockOutput"},"type":"array","title":"Outputs"},"config_fields":{"items":{"$ref":"#/components/schemas/BlockConfigField"},"type":"array","title":"Config Fields"},"permissions_required":{"items":{"type":"string"},"type":"array","title":"Permissions Required"},"approved":{"type":"boolean","title":"Approved","default":true},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved At"}},"type":"object","required":["block_id","name","description","category","source"],"title":"BlockMetadata","description":"A single building block in the workflow palette."},"BlockOutput":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","type"],"title":"BlockOutput"},"BusinessCase":{"properties":{"case_id":{"type":"string","title":"Case Id"},"name":{"type":"string","title":"Name"},"sector":{"type":"string","title":"Sector"},"description":{"type":"string","title":"Description"},"annual_value_usd":{"type":"integer","title":"Annual Value Usd"},"payback_months":{"type":"integer","title":"Payback Months"},"effort":{"type":"string","enum":["small","medium","large"],"title":"Effort"},"impact":{"type":"string","enum":["high","medium","low"],"title":"Impact"},"status":{"type":"string","enum":["available","in_pilot","deployed"],"title":"Status"},"kpis":{"items":{"type":"string"},"type":"array","title":"Kpis"},"dependencies":{"items":{"type":"string"},"type":"array","title":"Dependencies"},"source":{"type":"string","enum":["ava-lift","agnext-original"],"title":"Source"}},"type":"object","required":["case_id","name","sector","description","annual_value_usd","payback_months","effort","impact","status","kpis","dependencies","source"],"title":"BusinessCase"},"CallDetail":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"phone_number":{"type":"string","title":"Phone Number"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"triggered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By"},"triggered_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By Role"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Category"},"transcript_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript Available"},"workflow_inputs":{"additionalProperties":true,"type":"object","title":"Workflow Inputs"},"xaia_status":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Xaia Status"},"transcript":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Transcript"}},"type":"object","required":["thread_id","workflow_id","phone_number","status"],"title":"CallDetail"},"CallRow":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"phone_number":{"type":"string","title":"Phone Number"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"triggered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By"},"triggered_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By Role"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Category"},"transcript_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript Available"}},"type":"object","required":["thread_id","workflow_id","phone_number","status"],"title":"CallRow"},"CatalogEntry":{"properties":{"catalog_key":{"type":"string","title":"Catalog Key"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"workflow_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Version"},"external_inputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"External Inputs"},"sectors":{"items":{"type":"string"},"type":"array","title":"Sectors"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"phone_number_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number Group Id"},"group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"},"xaia_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xaia Project Id"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"assigned_tenants":{"items":{"type":"string"},"type":"array","title":"Assigned Tenants"},"added_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added By"},"added_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["catalog_key","kind","status"],"title":"CatalogEntry"},"CatalogPhoneGroupRegisterRequest":{"properties":{"phone_number_group_id":{"type":"string","title":"Phone Number Group Id"},"group_name":{"type":"string","title":"Group Name"},"xaia_project_id":{"type":"string","title":"Xaia Project Id"},"country":{"type":"string","title":"Country","default":""},"assigned_tenants":{"items":{"type":"string"},"type":"array","title":"Assigned Tenants"}},"type":"object","required":["phone_number_group_id","group_name","xaia_project_id"],"title":"CatalogPhoneGroupRegisterRequest"},"CatalogWorkflowRegisterRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"external_inputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"External Inputs"},"workflow_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Version"},"sectors":{"items":{"type":"string"},"type":"array","title":"Sectors"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["workflow_id","workflow_name"],"title":"CatalogWorkflowRegisterRequest"},"ChatMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":8000,"minLength":1,"title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatReply":{"properties":{"session_id":{"type":"string","title":"Session Id"},"content":{"type":"string","title":"Content"},"intent":{"type":"string","title":"Intent"},"intent_state":{"type":"string","title":"Intent State"},"dialog_action":{"type":"string","title":"Dialog Action"},"slots":{"additionalProperties":true,"type":"object","title":"Slots"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["session_id","content","intent","intent_state","dialog_action","slots","confidence"],"title":"ChatReply"},"ChatTurn":{"properties":{"role":{"type":"string","pattern":"^(user|assistant)$","title":"Role"},"content":{"type":"string","maxLength":2000,"title":"Content"}},"type":"object","required":["role","content"],"title":"ChatTurn"},"ChatWorkflowCostStack":{"properties":{"direct_llm_aed":{"type":"number","title":"Direct Llm Aed"},"dedicated_aws_aed":{"type":"number","title":"Dedicated Aws Aed"},"shared_alloc_aed":{"type":"number","title":"Shared Alloc Aed"},"total_aws_aed":{"type":"number","title":"Total Aws Aed"},"margin_aed":{"type":"number","title":"Margin Aed"},"aws_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Account Id"}},"type":"object","required":["direct_llm_aed","dedicated_aws_aed","shared_alloc_aed","total_aws_aed","margin_aed"],"title":"ChatWorkflowCostStack","description":"Platform-admin-only breakdown. Populated only when the requester is\nplatform-ops — never sent to a tenant."},"ChatWorkflowUsage":{"properties":{"call_count":{"type":"integer","title":"Call Count"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_aed":{"type":"number","title":"Total Aed"},"cost_stack":{"anyOf":[{"$ref":"#/components/schemas/ChatWorkflowCostStack"},{"type":"null"}]}},"type":"object","required":["call_count","total_tokens","total_aed"],"title":"ChatWorkflowUsage","description":"Cost-plus (AWS + margin) for chat + workflow LLM calls this cycle.\n\nAggregated from `agnext-dev-usage-log`. Tenant sees just the AED total and\ncounts — never the underlying tokens × rate math or our margin.\nPlatform admins additionally get `cost_stack` inline."},"ConfigItem":{"properties":{"config_key":{"type":"string","title":"Config Key"},"value":{"type":"string","title":"Value"},"description":{"type":"string","title":"Description","default":""},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","required":["config_key","value"],"title":"ConfigItem"},"ConfigUpdate":{"properties":{"value":{"type":"string","title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["value"],"title":"ConfigUpdate"},"ContractCard-Input":{"properties":{"setup_fee_aed":{"type":"number","title":"Setup Fee Aed","default":5000.0},"term_months":{"type":"integer","title":"Term Months","default":24},"tier":{"type":"string","title":"Tier","default":"standard"},"concurrent_sessions":{"type":"integer","title":"Concurrent Sessions","default":15},"voice_overage_aed_per_min":{"type":"number","title":"Voice Overage Aed Per Min","default":1.3},"chat_overage_aed_per_1k_tokens":{"type":"number","title":"Chat Overage Aed Per 1K Tokens","default":0.02}},"type":"object","title":"ContractCard","description":"Commercial terms captured at onboarding. All values are AED unless noted."},"ContractCard-Output":{"properties":{"term_months":{"type":"integer","title":"Term Months"},"renews_on":{"type":"string","title":"Renews On"},"setup_fee_aed":{"type":"number","title":"Setup Fee Aed"},"setup_fee_paid":{"type":"boolean","title":"Setup Fee Paid"},"concurrent_sessions":{"type":"integer","title":"Concurrent Sessions"}},"type":"object","required":["term_months","renews_on","setup_fee_aed","setup_fee_paid","concurrent_sessions"],"title":"ContractCard"},"ContractInfo":{"properties":{"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"term_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Term Months"},"setup_fee_aed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setup Fee Aed"},"voice_overage_aed_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Voice Overage Aed Per Min"},"chat_overage_aed_per_1k_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Chat Overage Aed Per 1K Tokens"},"concurrent_sessions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concurrent Sessions"}},"type":"object","title":"ContractInfo"},"CostPoint":{"properties":{"day":{"type":"integer","title":"Day"},"cost_usd":{"type":"number","title":"Cost Usd"}},"type":"object","required":["day","cost_usd"],"title":"CostPoint"},"CostReport":{"properties":{"cycle_key":{"type":"string","title":"Cycle Key"},"generated_at":{"type":"string","title":"Generated At"},"fx_usd_to_aed":{"type":"number","title":"Fx Usd To Aed"},"margin_target":{"type":"number","title":"Margin Target"},"tenants":{"items":{"$ref":"#/components/schemas/TenantCost"},"type":"array","title":"Tenants"},"fleet_total_cost_aed":{"type":"number","title":"Fleet Total Cost Aed"},"fleet_total_billed_aed":{"type":"number","title":"Fleet Total Billed Aed"},"fleet_avg_margin_pct":{"type":"number","title":"Fleet Avg Margin Pct"},"dev_account_bill_aed":{"type":"number","title":"Dev Account Bill Aed"},"aws_data_lag_note":{"type":"string","title":"Aws Data Lag Note","default":"AWS Cost Explorer data typically lags 24-48h."}},"type":"object","required":["cycle_key","generated_at","fx_usd_to_aed","margin_target","tenants","fleet_total_cost_aed","fleet_total_billed_aed","fleet_avg_margin_pct","dev_account_bill_aed"],"title":"CostReport"},"CreateWorkflowBody":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"intent":{"type":"string","minLength":1,"title":"Intent","description":"Dispatcher intent string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"definition":{"$ref":"#/components/schemas/WorkflowDefinition"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["name","intent","definition"],"title":"CreateWorkflowBody"},"CustomAgentItem":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"system_prompt":{"type":"string","title":"System Prompt"},"model_tier":{"type":"string","title":"Model Tier"},"model_id":{"type":"string","title":"Model Id","default":""},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"knowledge_bases":{"items":{"type":"string"},"type":"array","title":"Knowledge Bases"},"memory_strategy":{"type":"string","title":"Memory Strategy"},"version":{"type":"string","title":"Version"},"status":{"type":"string","title":"Status"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"forked_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From"},"prompt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"source":{"type":"string","const":"custom","title":"Source","default":"custom"}},"type":"object","required":["agent_id","tenant_id","name","role","system_prompt","model_tier","tools","memory_strategy","version","status","tags"],"title":"CustomAgentItem","description":"User-authored agent (DDB-backed). Distinct from AgentItem which is the\nlegacy synthetic-seed shape used by the read-only list view."},"CustomToolItem":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"tool_type":{"type":"string","title":"Tool Type"},"endpoint":{"type":"string","title":"Endpoint"},"auth_type":{"type":"string","title":"Auth Type"},"input_schema":{"type":"string","title":"Input Schema"},"output_schema":{"type":"string","title":"Output Schema"},"http_config":{"additionalProperties":true,"type":"object","title":"Http Config"},"secret_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Last4"},"secret_managed":{"type":"boolean","title":"Secret Managed","default":false},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"source":{"type":"string","const":"custom","title":"Source","default":"custom"}},"type":"object","required":["tool_id","tenant_id","name","description","category","tool_type","endpoint","auth_type","input_schema","output_schema","tags","status","version"],"title":"CustomToolItem","description":"User-authored tool (DDB-backed). Distinct from ToolItem in\ncapabilities.py which is the read-only, code-defined MCP catalog shape."},"CustomUseCaseItem":{"properties":{"use_case_id":{"type":"string","title":"Use Case Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"sector":{"type":"string","title":"Sector"},"description":{"type":"string","title":"Description"},"template_workflow_id":{"type":"string","title":"Template Workflow Id"},"workflow_ids":{"items":{"type":"string"},"type":"array","title":"Workflow Ids"},"required_tools":{"items":{"type":"string"},"type":"array","title":"Required Tools"},"typical_agents":{"items":{"type":"string"},"type":"array","title":"Typical Agents"},"complexity":{"type":"string","title":"Complexity"},"version":{"type":"string","title":"Version"},"status":{"type":"string","title":"Status"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"forked_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"source":{"type":"string","const":"custom","title":"Source","default":"custom"}},"type":"object","required":["use_case_id","tenant_id","name","sector","description","template_workflow_id","workflow_ids","required_tools","typical_agents","complexity","version","status","tags"],"title":"CustomUseCaseItem"},"CustomWorkflowItem":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"intent":{"type":"string","title":"Intent"},"intent_description":{"type":"string","title":"Intent Description","default":""},"example_events":{"items":{"type":"string"},"type":"array","title":"Example Events","default":[]},"sector":{"type":"string","title":"Sector"},"status":{"type":"string","title":"Status"},"stages":{"items":{"type":"string"},"type":"array","title":"Stages"},"agents_used":{"items":{"type":"string"},"type":"array","title":"Agents Used"},"tools_used":{"items":{"type":"string"},"type":"array","title":"Tools Used"},"complexity":{"type":"string","title":"Complexity"},"version":{"type":"string","title":"Version"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"forked_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"source":{"type":"string","const":"custom","title":"Source","default":"custom"},"editable_in_form":{"type":"boolean","title":"Editable In Form","default":true},"form":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Form"},"published_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Published Version"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"}},"type":"object","required":["workflow_id","tenant_id","name","description","intent","sector","status","stages","agents_used","tools_used","complexity","version","tags"],"title":"CustomWorkflowItem"},"DataPointOutput":{"properties":{"claim":{"type":"string","title":"Claim"},"value":{"type":"string","title":"Value"},"source_url":{"type":"string","title":"Source Url","default":"https://www.dubaipulse.gov.ae/"},"retrieved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retrieved At"}},"type":"object","required":["claim","value"],"title":"DataPointOutput"},"DeployResponse":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"status":{"type":"string","enum":["in_progress","succeeded","failed"],"title":"Status"},"started_at":{"type":"string","title":"Started At"},"message":{"type":"string","title":"Message"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"final_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Status"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"workflow_trace":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Workflow Trace","default":[]},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"agent_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Count"}},"type":"object","required":["execution_id","workflow_id","workflow_name","tenant_id","status","started_at","message"],"title":"DeployResponse"},"DeploymentItem":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"intent":{"type":"string","title":"Intent"},"status":{"type":"string","enum":["succeeded","failed","in_progress"],"title":"Status"},"duration_ms":{"type":"integer","title":"Duration Ms"},"started_at":{"type":"string","title":"Started At"},"triggered_by":{"type":"string","title":"Triggered By"},"source":{"type":"string","enum":["synthetic","live"],"title":"Source","default":"synthetic"}},"type":"object","required":["execution_id","workflow_id","workflow_name","tenant_id","intent","status","duration_ms","started_at","triggered_by"],"title":"DeploymentItem"},"DiagnoseRequest":{"properties":{"raw_message":{"type":"string","maxLength":4000,"minLength":1,"title":"Raw Message"},"customer_id":{"type":"string","maxLength":64,"title":"Customer Id","default":"CUST-HU-DEMO-01"}},"type":"object","required":["raw_message"],"title":"DiagnoseRequest"},"DiffLine":{"properties":{"op":{"type":"string","enum":["equal","add","remove"],"title":"Op"},"text":{"type":"string","title":"Text"},"old_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Old No"},"new_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New No"}},"type":"object","required":["op","text"],"title":"DiffLine"},"DiffOp":{"properties":{"op":{"type":"string","title":"Op"},"path":{"type":"string","title":"Path"},"value":{"title":"Value"},"from_value":{"title":"From Value"}},"type":"object","required":["op","path"],"title":"DiffOp"},"DocumentDBResponse":{"properties":{"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"checkpoint_backend":{"type":"string","title":"Checkpoint Backend"},"credentials":{"type":"boolean","title":"Credentials"},"tls_ca_file":{"type":"boolean","title":"Tls Ca File"}},"type":"object","required":["status","error","checkpoint_backend","credentials","tls_ca_file"],"title":"DocumentDBResponse"},"EnhanceContext":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name","default":""},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"tools":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Tools"}},"type":"object","title":"EnhanceContext"},"ExampleEvent":{"properties":{"name":{"type":"string","title":"Name"},"event_summary":{"type":"string","title":"Event Summary"},"event_payload":{"additionalProperties":true,"type":"object","title":"Event Payload"}},"type":"object","required":["name","event_summary"],"title":"ExampleEvent"},"ExecuteDemoRequest":{"properties":{"scenario_id":{"type":"string","title":"Scenario Id"},"profile":{"type":"string","title":"Profile","default":"customer_wed"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}},"type":"object","required":["scenario_id"],"title":"ExecuteDemoRequest"},"ExecutionListItem":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["execution_id","workflow_id","tenant_id","status","started_at"],"title":"ExecutionListItem"},"ExecutionRequest":{"properties":{"event_summary":{"type":"string","title":"Event Summary"},"event_payload":{"additionalProperties":true,"type":"object","title":"Event Payload"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"}},"type":"object","required":["event_summary","event_payload"],"title":"ExecutionRequest","description":"Request body for POST /executions — trigger an event."},"ExecutionResponse":{"properties":{"execution_id":{"type":"string","title":"Execution Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"intent":{"type":"string","title":"Intent"},"status":{"$ref":"#/components/schemas/ExecutionStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"final_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Status"},"ticket_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticket Id"},"trace":{"items":{"$ref":"#/components/schemas/ExecutionTrace"},"type":"array","title":"Trace"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["execution_id","workflow_id","intent","status","started_at"],"title":"ExecutionResponse","description":"Response from POST /executions."},"ExecutionStatus":{"type":"string","enum":["pending","dispatching","running","auto_resolved","user_guided","escalated_to_human","failed","filtered"],"title":"ExecutionStatus"},"ExecutionTrace":{"properties":{"stage":{"type":"string","title":"Stage"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"agent_traces":{"items":{"$ref":"#/components/schemas/AgentTraceEntry"},"type":"array","title":"Agent Traces"},"result_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Summary"},"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"summary_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Line"}},"type":"object","required":["stage","started_at"],"title":"ExecutionTrace","description":"Stage-by-stage execution log."},"ExecutionsByWorkflow":{"properties":{"workflow_name":{"type":"string","title":"Workflow Name"},"executions":{"type":"integer","title":"Executions"}},"type":"object","required":["workflow_name","executions"],"title":"ExecutionsByWorkflow"},"FaqDocs":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/FaqEntry"},"type":"array","minItems":1,"title":"Entries"}},"type":"object","required":["entries"],"title":"FaqDocs"},"FaqEntry":{"properties":{"question":{"type":"string","maxLength":2000,"minLength":1,"title":"Question"},"answer":{"type":"string","maxLength":20000,"minLength":1,"title":"Answer"}},"type":"object","required":["question","answer"],"title":"FaqEntry"},"FeatureAssignment":{"properties":{"feature_id":{"type":"string","title":"Feature Id"},"feature_name":{"type":"string","title":"Feature Name"},"assigned_model":{"type":"string","title":"Assigned Model"},"provider":{"type":"string","title":"Provider"},"tier":{"type":"string","title":"Tier"},"status":{"type":"string","title":"Status"},"calls_30d":{"type":"integer","title":"Calls 30D"},"cost_usd_30d":{"type":"number","title":"Cost Usd 30D"}},"type":"object","required":["feature_id","feature_name","assigned_model","provider","tier","status","calls_30d","cost_usd_30d"],"title":"FeatureAssignment"},"FeedbackRequest":{"properties":{"tenant_id":{"type":"string","maxLength":64,"title":"Tenant Id","default":"ppf-telecom"},"session_id":{"type":"string","maxLength":128,"minLength":1,"title":"Session Id"},"message_id":{"type":"string","maxLength":128,"minLength":1,"title":"Message Id"},"rating":{"type":"string","enum":["up","down"],"title":"Rating"},"user_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"User Message"},"agent_reply":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Agent Reply"},"agent_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Agent Name"},"customer_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Customer Id"},"lang":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Lang"},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["session_id","message_id","rating"],"title":"FeedbackRequest"},"FlagToggleBody":{"properties":{"flag":{"type":"string","title":"Flag"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["flag","enabled"],"title":"FlagToggleBody"},"FormInputField":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$","title":"Name"},"type":{"type":"string","enum":["string","number","integer","boolean"],"title":"Type","default":"string"},"required":{"type":"boolean","title":"Required","default":false},"description":{"type":"string","maxLength":500,"title":"Description","default":""}},"additionalProperties":false,"type":"object","required":["name"],"title":"FormInputField"},"FormStep":{"properties":{"type":{"type":"string","enum":["agent","prompt"],"title":"Type"},"name":{"type":"string","maxLength":200,"title":"Name","default":""},"node_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Node Id"},"agent_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Agent Id"},"prompt_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Prompt Id"},"text":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Text"},"variables":{"additionalProperties":{"type":"string"},"type":"object","title":"Variables"},"model_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model Id"}},"additionalProperties":false,"type":"object","required":["type"],"title":"FormStep","description":"One step of the form. `node_id` ties it to an existing canvas node so settings\nthe form doesn't show (retries, timeouts, models, knowledge for the run...) are kept.\nPrompt variables take a source: \"previous\" (the step before), \"input\" (the whole\ninput), \"input.<field>\", or any {{ expression }}."},"GatewayDescribeRequest":{"properties":{"tool_id":{"type":"string","maxLength":200,"minLength":1,"title":"Tool Id"}},"type":"object","required":["tool_id"],"title":"GatewayDescribeRequest"},"GatewayDescribeResult":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"operations":{"items":{"$ref":"#/components/schemas/GatewayOperation"},"type":"array","title":"Operations"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["enabled"],"title":"GatewayDescribeResult"},"GatewayOperation":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"input_schema":{"type":"string","title":"Input Schema","default":""}},"type":"object","required":["name"],"title":"GatewayOperation"},"GrokSttRequest":{"properties":{"audio":{"type":"string","title":"Audio","description":"Base64 encoded audio from user microphone"},"mime_type":{"type":"string","title":"Mime Type","description":"MIME type: audio/webm, audio/mp4, audio/wav, audio/mpeg","default":"audio/webm"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Optional language hint: en or ar"}},"type":"object","required":["audio"],"title":"GrokSttRequest"},"GuardrailItem":{"properties":{"guardrail_id":{"type":"string","title":"Guardrail Id"},"name":{"type":"string","title":"Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"description":{"type":"string","title":"Description"},"pii_filters":{"items":{"type":"string"},"type":"array","title":"Pii Filters"},"topic_filters":{"items":{"type":"string"},"type":"array","title":"Topic Filters"},"blocked_terms_count":{"type":"integer","title":"Blocked Terms Count","default":0},"enforcement":{"type":"string","enum":["enforced","monitor","disabled"],"title":"Enforcement","default":"enforced"},"invocations_24h":{"type":"integer","title":"Invocations 24H","default":0},"blocked_24h":{"type":"integer","title":"Blocked 24H","default":0},"source":{"type":"string","enum":["synthetic","live"],"title":"Source","default":"synthetic"}},"type":"object","required":["guardrail_id","name","tenant_id","description","pii_filters","topic_filters"],"title":"GuardrailItem"},"GuardrailPolicy":{"properties":{"guardrail_id":{"type":"string","title":"Guardrail Id"},"name":{"type":"string","title":"Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"description":{"type":"string","title":"Description","default":""},"pii_filters":{"items":{"type":"string"},"type":"array","title":"Pii Filters","default":[]},"topic_filters":{"items":{"type":"string"},"type":"array","title":"Topic Filters","default":[]},"blocked_terms_count":{"type":"integer","title":"Blocked Terms Count","default":0},"enforcement":{"type":"string","enum":["enforced","monitor","disabled"],"title":"Enforcement","default":"enforced"},"invocations_24h":{"type":"integer","title":"Invocations 24H","default":0},"blocked_24h":{"type":"integer","title":"Blocked 24H","default":0},"source":{"type":"string","enum":["platform","custom"],"title":"Source","default":"custom"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_by_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"status":{"type":"string","enum":["active","pending","rejected"],"title":"Status","default":"active"},"scope":{"type":"string","enum":["all","workflow"],"title":"Scope","default":"all"},"workflow_ids":{"items":{"type":"string"},"type":"array","title":"Workflow Ids","default":[]},"approval_history":{"items":{"$ref":"#/components/schemas/ApprovalEvent"},"type":"array","title":"Approval History","default":[]},"rule_kind":{"anyOf":[{"type":"string","enum":["block","modify"]},{"type":"null"}],"title":"Rule Kind"},"rule_type":{"anyOf":[{"type":"string","enum":["topic","word","pii","response_modifier"]},{"type":"null"}],"title":"Rule Type"},"rule_config":{"additionalProperties":true,"type":"object","title":"Rule Config","default":{}}},"type":"object","required":["guardrail_id","name","tenant_id"],"title":"GuardrailPolicy"},"GuardrailRuleRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":200,"title":"Description","default":""},"rule_type":{"type":"string","enum":["topic","word","pii","response_modifier"],"title":"Rule Type"},"rule_config":{"additionalProperties":true,"type":"object","title":"Rule Config"},"scope":{"type":"string","enum":["all","workflow"],"title":"Scope","default":"all"},"workflow_ids":{"items":{"type":"string"},"type":"array","title":"Workflow Ids","default":[]}},"type":"object","required":["name","rule_type","rule_config"],"title":"GuardrailRuleRequest"},"GuardrailToggle":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"value_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Display"}},"type":"object","required":["key","label","enabled"],"title":"GuardrailToggle"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"service":{"type":"string","title":"Service"},"version":{"type":"string","title":"Version"},"environment":{"type":"string","title":"Environment"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"git_sha":{"type":"string","title":"Git Sha"}},"type":"object","required":["status","service","version","environment","timestamp","git_sha"],"title":"HealthResponse"},"HeroKPI":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"},"secondary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary"},"severity":{"type":"string","title":"Severity","default":"normal"}},"type":"object","required":["label","value"],"title":"HeroKPI"},"HttpToolConfig":{"properties":{"method":{"type":"string","enum":["GET","POST"],"title":"Method","default":"GET"},"url_template":{"type":"string","maxLength":2048,"minLength":8,"title":"Url Template"},"headers_template":{"additionalProperties":{"type":"string"},"type":"object","maxProperties":20,"title":"Headers Template"},"body_template":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}],"title":"Body Template"},"response_path":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Response Path"},"secret_ref":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Secret Ref"},"secret_key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Secret Key"}},"type":"object","required":["url_template"],"title":"HttpToolConfig","description":"How an HTTP tool calls its REST API (tool_type == \"http\"). `{name}`\nplaceholders are filled from the call's inputs; `{secret}` from the\nSecrets Manager secret named by secret_ref (see shared/http_tool.py)."},"IdeaBriefInput":{"properties":{"idea":{"type":"string","minLength":1,"title":"Idea"},"sector":{"type":"string","minLength":1,"title":"Sector"},"location":{"type":"string","minLength":1,"title":"Location"},"target_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Customer"},"budget_aed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Budget Aed"}},"type":"object","required":["idea","sector","location"],"title":"IdeaBriefInput"},"InboundCallAck":{"properties":{"call_id":{"type":"string","title":"Call Id"},"stored":{"type":"boolean","title":"Stored"},"duplicate":{"type":"boolean","title":"Duplicate","default":false}},"type":"object","required":["call_id","stored"],"title":"InboundCallAck"},"InboundCallSummary":{"properties":{"call_id":{"type":"string","title":"Call Id"},"caller":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"session_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Result"},"messages":{"items":{"$ref":"#/components/schemas/TranscriptTurn"},"type":"array","title":"Messages"}},"type":"object","required":["call_id"],"title":"InboundCallSummary"},"InboxEvent":{"properties":{"event_id":{"type":"string","title":"Event Id"},"source":{"type":"string","title":"Source"},"sector":{"type":"string","title":"Sector"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"received_at":{"type":"string","title":"Received At"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority","default":"P3"},"suggested_workflow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Workflow"},"event_summary":{"type":"string","title":"Event Summary"},"event_payload":{"additionalProperties":true,"type":"object","title":"Event Payload"}},"type":"object","required":["event_id","source","sector","subject","body","received_at","event_summary","event_payload"],"title":"InboxEvent","description":"One incoming event waiting to be triaged.\n\nGeneric enough to represent an email, an alert, an API webhook, or any\nother inbound trigger. The frontend renders it in an \"Inbox\" panel; the\n`event_summary` + `event_payload` shape matches what /api/v1/executions\nexpects so click → triage → workflow run is a single POST."},"IndexRequest":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":4,"title":"Url"},"max_pages":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Max Pages","default":25},"key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Key"}},"type":"object","required":["url"],"title":"IndexRequest"},"InfraMetric":{"properties":{"metric":{"type":"string","title":"Metric"},"value":{"type":"string","title":"Value"},"status":{"type":"string","title":"Status"}},"type":"object","required":["metric","value","status"],"title":"InfraMetric"},"IntegrationRow":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"error_rate_24h":{"type":"number","title":"Error Rate 24H"},"avg_response_ms":{"type":"integer","title":"Avg Response Ms"},"last_check":{"type":"string","title":"Last Check"},"auth_status":{"type":"string","title":"Auth Status"}},"type":"object","required":["name","type","status","error_rate_24h","avg_response_ms","last_check","auth_status"],"title":"IntegrationRow"},"IntentCheckResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"intent":{"type":"string","title":"Intent"},"existing_workflow":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Existing Workflow"}},"type":"object","required":["available","intent"],"title":"IntentCheckResponse","description":"Response for the wizard's live intent availability check."},"IssuedLicenceBody":{"properties":{"customerId":{"type":"string","minLength":1,"title":"Customerid"},"draft":{"additionalProperties":true,"type":"object","title":"Draft"}},"type":"object","required":["customerId","draft"],"title":"IssuedLicenceBody"},"KbCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"}},"type":"object","required":["name"],"title":"KbCreate"},"KbUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Tags"}},"type":"object","title":"KbUpdate"},"KnowledgeBaseItem":{"properties":{"kb_id":{"type":"string","title":"Kb Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tenant_id":{"type":"string","title":"Tenant Id"},"sector_hint":{"type":"string","title":"Sector Hint"},"document_count":{"type":"integer","title":"Document Count"},"total_size_mb":{"type":"integer","title":"Total Size Mb"},"source_types":{"items":{"type":"string"},"type":"array","title":"Source Types"},"ingestion_status":{"type":"string","enum":["synced","syncing","failed","pending"],"title":"Ingestion Status"},"last_synced":{"type":"string","title":"Last Synced"},"embedding_model":{"type":"string","title":"Embedding Model"},"used_in_agents":{"items":{"type":"string"},"type":"array","title":"Used In Agents","default":[]},"source":{"type":"string","enum":["live","seed"],"title":"Source","default":"seed"}},"type":"object","required":["kb_id","name","description","tenant_id","sector_hint","document_count","total_size_mb","source_types","ingestion_status","last_synced","embedding_model"],"title":"KnowledgeBaseItem"},"KnowledgeCitation":{"properties":{"label":{"type":"string","title":"Label"},"kb_id":{"type":"string","title":"Kb Id"},"kb_name":{"type":"string","title":"Kb Name","default":""},"doc_id":{"type":"string","title":"Doc Id"},"title":{"type":"string","title":"Title","default":""},"source":{"type":"string","title":"Source","default":""},"snippet":{"type":"string","title":"Snippet","default":""},"score":{"type":"number","title":"Score","default":0.0},"cited":{"type":"boolean","title":"Cited","default":false}},"type":"object","required":["label","kb_id","doc_id"],"title":"KnowledgeCitation","description":"A knowledge passage the agent retrieved; `cited` = the reply references its label."},"KnowledgeCitationOut":{"properties":{"label":{"type":"string","title":"Label"},"kb_id":{"type":"string","title":"Kb Id"},"kb_name":{"type":"string","title":"Kb Name","default":""},"doc_id":{"type":"string","title":"Doc Id"},"doc_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Doc Version"},"title":{"type":"string","title":"Title","default":""},"source":{"type":"string","title":"Source","default":""},"snippet":{"type":"string","title":"Snippet","default":""},"score":{"type":"number","title":"Score","default":0.0},"cited":{"type":"boolean","title":"Cited","default":false}},"type":"object","required":["label","kb_id","doc_id"],"title":"KnowledgeCitationOut","description":"A passage the agent retrieved; `cited` = the answer references its label."},"LatestInboundCall":{"properties":{"own":{"type":"boolean","title":"Own"},"call":{"anyOf":[{"$ref":"#/components/schemas/InboundCallSummary"},{"type":"null"}]}},"type":"object","required":["own"],"title":"LatestInboundCall"},"LinkedAgent":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"name":{"type":"string","title":"Name","default":""},"status":{"type":"string","title":"Status","default":""},"model_tier":{"type":"string","title":"Model Tier","default":""}},"type":"object","required":["agent_id"],"title":"LinkedAgent"},"LoginRequest":{"properties":{"email":{"type":"string","maxLength":256,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"tenant_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LookupBody":{"properties":{"mobile":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Mobile"},"emiratesId":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Emiratesid"}},"type":"object","title":"LookupBody","description":"One of mobile or emiratesId.\n\nThe exactly-one rule is enforced in the handler rather than by a\nmodel_validator, so every validation failure from this endpoint is a 400.\nA validator would surface as the platform-wide 422 instead, leaving the\nfrontend to handle two different codes for the same class of mistake."},"LookupResponse":{"properties":{"customerExists":{"type":"boolean","title":"Customerexists"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"otpRequired":{"type":"boolean","title":"Otprequired","default":false},"message":{"type":"string","title":"Message"}},"type":"object","required":["customerExists","message"],"title":"LookupResponse","description":"Result of the lookup.\n\nNOTE ON ENUMERATION: this response tells the caller whether the customer\nexists, which is a deliberate product decision -- sending a non-customer to\nan OTP screen they can never pass is a dead end. The cost is that the\nendpoint can be scripted to discover which UAE mobile numbers belong to e&\nbusiness customers.\n\nBefore this is exposed to real traffic it MUST be rate limited per\nidentifier and per IP, and ideally behind a CAPTCHA or app attestation.\nWithout that, this is a customer-directory oracle."},"MarkReadRequest":{"properties":{"item_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Item Ids"}},"type":"object","title":"MarkReadRequest"},"MaturityAssessment":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"type":"string","title":"Tenant Name"},"sector":{"type":"string","title":"Sector"},"segment":{"type":"string","title":"Segment","default":"enterprise"},"segment_name":{"type":"string","title":"Segment Name","default":"Enterprise"},"overall_score":{"type":"number","title":"Overall Score"},"weighted_score":{"type":"number","title":"Weighted Score"},"overall_score_10":{"type":"number","title":"Overall Score 10"},"weighted_score_10":{"type":"number","title":"Weighted Score 10"},"level":{"type":"string","title":"Level"},"stage":{"type":"string","title":"Stage"},"next_level_target":{"type":"string","title":"Next Level Target"},"dimensions":{"items":{"$ref":"#/components/schemas/MaturityDimension"},"type":"array","title":"Dimensions"},"recommendations":{"items":{"type":"string"},"type":"array","title":"Recommendations"},"key_gaps":{"items":{"type":"string"},"type":"array","title":"Key Gaps","default":[]},"assessment_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Date","default":"2026-09-06"}},"type":"object","required":["tenant_id","tenant_name","sector","overall_score","weighted_score","overall_score_10","weighted_score_10","level","stage","next_level_target","dimensions","recommendations"],"title":"MaturityAssessment"},"MaturityDimension":{"properties":{"id":{"type":"string","title":"Id"},"number":{"type":"integer","title":"Number"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"weight":{"type":"number","title":"Weight"},"score":{"type":"number","title":"Score"},"score_10":{"type":"number","title":"Score 10"},"level":{"type":"string","title":"Level"},"description":{"type":"string","title":"Description"},"why_it_matters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why It Matters"},"question_count":{"type":"integer","title":"Question Count","default":6},"maturity_levels":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Maturity Levels"},"segment_weights":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Segment Weights"},"segment_weight_rationale":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Segment Weight Rationale"}},"type":"object","required":["id","number","name","category","weight","score","score_10","level","description"],"title":"MaturityDimension"},"ModelBreakdown":{"properties":{"model_id":{"type":"string","title":"Model Id"},"call_count":{"type":"integer","title":"Call Count"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"cost_aed":{"type":"number","title":"Cost Aed"}},"type":"object","required":["model_id","call_count","input_tokens","output_tokens","cost_aed"],"title":"ModelBreakdown"},"ModelRate":{"properties":{"model_id":{"type":"string","title":"Model Id"},"input_rate_per_million_usd":{"type":"number","title":"Input Rate Per Million Usd"},"output_rate_per_million_usd":{"type":"number","title":"Output Rate Per Million Usd"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","required":["model_id","input_rate_per_million_usd","output_rate_per_million_usd"],"title":"ModelRate"},"ModelRateUpdate":{"properties":{"input_rate_per_million_usd":{"type":"number","title":"Input Rate Per Million Usd"},"output_rate_per_million_usd":{"type":"number","title":"Output Rate Per Million Usd"}},"type":"object","required":["input_rate_per_million_usd","output_rate_per_million_usd"],"title":"ModelRateUpdate"},"NextStep":{"properties":{"authority":{"type":"string","title":"Authority"},"requirement":{"type":"string","title":"Requirement"},"description":{"type":"string","title":"Description"}},"type":"object","required":["authority","requirement","description"],"title":"NextStep"},"NotificationOut":{"properties":{"item_id":{"type":"string","title":"Item Id"},"item_type":{"type":"string","title":"Item Type"},"item_type_label":{"type":"string","title":"Item Type Label"},"resource_id":{"type":"string","title":"Resource Id"},"title":{"type":"string","title":"Title"},"status":{"type":"string","enum":["approved","rejected"],"title":"Status"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By"},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided At"},"decision_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Reason"},"read":{"type":"boolean","title":"Read"}},"type":"object","required":["item_id","item_type","item_type_label","resource_id","title","status","read"],"title":"NotificationOut"},"OperationsResponse":{"properties":{"platform_status":{"type":"string","title":"Platform Status"},"platform_status_detail":{"type":"string","title":"Platform Status Detail"},"uptime_30d_pct":{"type":"number","title":"Uptime 30D Pct"},"api_latency_p50_ms":{"type":"integer","title":"Api Latency P50 Ms"},"error_rate_24h_pct":{"type":"number","title":"Error Rate 24H Pct"},"hero_kpis":{"items":{"$ref":"#/components/schemas/HeroKPI"},"type":"array","title":"Hero Kpis"},"integration_health":{"items":{"$ref":"#/components/schemas/IntegrationRow"},"type":"array","title":"Integration Health"},"execution_infrastructure":{"items":{"$ref":"#/components/schemas/InfraMetric"},"type":"array","title":"Execution Infrastructure"},"ai_provider_status":{"items":{"$ref":"#/components/schemas/AIProviderStatus"},"type":"array","title":"Ai Provider Status"},"alert_history":{"items":{"$ref":"#/components/schemas/AlertHistoryRow"},"type":"array","title":"Alert History"}},"type":"object","required":["platform_status","platform_status_detail","uptime_30d_pct","api_latency_p50_ms","error_rate_24h_pct","hero_kpis","integration_health","execution_infrastructure","ai_provider_status","alert_history"],"title":"OperationsResponse"},"OrchestratorRequest":{"properties":{"event_summary":{"type":"string","maxLength":4000,"minLength":1,"title":"Event Summary"},"event_payload":{"additionalProperties":true,"type":"object","title":"Event Payload"},"workflow_id":{"type":"string","maxLength":200,"minLength":1,"title":"Workflow Id"},"source":{"type":"string","enum":["starter","custom"],"title":"Source"},"tenant_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["event_summary","workflow_id","source"],"title":"OrchestratorRequest"},"OrchestratorResult":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status"},"requested_workflow_id":{"type":"string","title":"Requested Workflow Id"},"ran_workflow_id":{"type":"string","title":"Ran Workflow Id"},"matched":{"type":"boolean","title":"Matched"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"execution_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Status"},"final_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Status"},"ticket_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticket Id"},"latency_ms":{"type":"integer","title":"Latency Ms","default":0},"stages":{"items":{"$ref":"#/components/schemas/TraceStage"},"type":"array","title":"Stages"},"mock_providers":{"type":"boolean","title":"Mock Providers","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"tested_at":{"type":"string","title":"Tested At"}},"type":"object","required":["status","requested_workflow_id","ran_workflow_id","matched","tested_at"],"title":"OrchestratorResult"},"OutboundCallRequest":{"properties":{"phone_number":{"type":"string","minLength":4,"title":"Phone Number"},"consent_given":{"type":"boolean","title":"Consent Given","default":false},"workflow_inputs":{"additionalProperties":true,"type":"object","title":"Workflow Inputs"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"phone_number_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number Group Id"},"source":{"type":"string","title":"Source","default":"manual"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"}},"type":"object","required":["phone_number"],"title":"OutboundCallRequest"},"OutboundCallResponse":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"provider":{"type":"string","title":"Provider","default":"xaia"},"correlation_id":{"type":"string","title":"Correlation Id"},"status":{"type":"string","title":"Status"},"dry_run":{"type":"boolean","title":"Dry Run"}},"type":"object","required":["thread_id","correlation_id","status","dry_run"],"title":"OutboundCallResponse"},"PaymentExecutionInput":{"properties":{"voucher_number":{"type":"string","title":"Voucher Number"},"trade_name":{"type":"string","title":"Trade Name"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"payment_method":{"type":"string","title":"Payment Method","description":"'eand_money', 'wio', 'card', 'apple_pay'","default":"eand_money"},"amount_aed":{"type":"integer","title":"Amount Aed"},"business_type_hint":{"type":"string","title":"Business Type Hint","description":"Free text describing the business, e.g. 'real estate brokerage'","default":""},"office_status":{"type":"string","title":"Office Status","description":"'confirmed', 'flexi_desk', or 'pending_lease'","default":"confirmed"}},"type":"object","required":["voucher_number","trade_name","jurisdiction","amount_aed"],"title":"PaymentExecutionInput"},"PaymentExecutionOutput":{"properties":{"payment_status":{"type":"string","title":"Payment Status"},"transaction_id":{"type":"string","title":"Transaction Id"},"payment_method":{"type":"string","title":"Payment Method"},"voucher_number":{"type":"string","title":"Voucher Number"},"amount_paid_aed":{"type":"integer","title":"Amount Paid Aed"},"paid_at":{"type":"string","title":"Paid At"},"license_number":{"type":"string","title":"License Number"},"trade_name":{"type":"string","title":"Trade Name"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"legal_form":{"type":"string","title":"Legal Form"},"issue_date":{"type":"string","title":"Issue Date"},"expiry_date":{"type":"string","title":"Expiry Date"},"status":{"type":"string","title":"Status","default":"APPROVED"},"next_steps":{"items":{"$ref":"#/components/schemas/NextStep"},"type":"array","title":"Next Steps"}},"type":"object","required":["payment_status","transaction_id","payment_method","voucher_number","amount_paid_aed","paid_at","license_number","trade_name","jurisdiction","legal_form","issue_date","expiry_date"],"title":"PaymentExecutionOutput"},"PaymentVoucherOutput":{"properties":{"voucher_number":{"type":"string","title":"Voucher Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_label":{"type":"string","title":"Jurisdiction Label"},"trade_name":{"type":"string","title":"Trade Name"},"items":{"items":{"$ref":"#/components/schemas/VoucherItem"},"type":"array","title":"Items"},"total_aed":{"type":"integer","title":"Total Aed"},"due_date":{"type":"string","title":"Due Date"},"status":{"type":"string","title":"Status","default":"UNPAID"}},"type":"object","required":["voucher_number","jurisdiction","jurisdiction_label","trade_name","items","total_aed","due_date"],"title":"PaymentVoucherOutput"},"PhoneNumberGroup":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"provider_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Type"},"is_project_restricted":{"type":"boolean","title":"Is Project Restricted","default":false},"provision_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provision Status"}},"type":"object","required":["id","label"],"title":"PhoneNumberGroup"},"PlanStage":{"properties":{"index":{"type":"integer","title":"Index"},"label":{"type":"string","title":"Label"},"type":{"type":"string","enum":["agent","tool","decision"],"title":"Type"},"description":{"type":"string","title":"Description","default":""},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"runnable":{"type":"boolean","title":"Runnable"},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"}},"type":"object","required":["index","label","type","runnable"],"title":"PlanStage"},"PlatformMaturity":{"properties":{"tenants":{"items":{"$ref":"#/components/schemas/MaturityAssessment"},"type":"array","title":"Tenants"},"distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Distribution"}},"type":"object","required":["tenants","distribution"],"title":"PlatformMaturity","description":"Fleet aggregate for Platform Ops."},"PlatformRollup":{"properties":{"tenants_total":{"type":"integer","title":"Tenants Total"},"tenants_active":{"type":"integer","title":"Tenants Active"},"tenants_onboarding":{"type":"integer","title":"Tenants Onboarding"},"agents_total":{"type":"integer","title":"Agents Total"},"workflows_total":{"type":"integer","title":"Workflows Total"},"monthly_cost_total_usd":{"type":"integer","title":"Monthly Cost Total Usd"},"monthly_cost_change_pct":{"type":"number","title":"Monthly Cost Change Pct"},"avg_compliance_score":{"type":"integer","title":"Avg Compliance Score"},"incidents_open_total":{"type":"integer","title":"Incidents Open Total"},"region_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Region Distribution"}},"type":"object","required":["tenants_total","tenants_active","tenants_onboarding","agents_total","workflows_total","monthly_cost_total_usd","monthly_cost_change_pct","avg_compliance_score","incidents_open_total","region_distribution"],"title":"PlatformRollup","description":"Aggregated fleet KPIs for the Platform Ops Home page."},"PlatformUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role","default":"Observer"},"org_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Unit"},"status":{"type":"string","title":"Status"},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled"},"last_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Active"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"source":{"type":"string","title":"Source","default":"cognito"}},"type":"object","required":["user_id","username","email","status","mfa_enabled"],"title":"PlatformUser"},"PlaygroundRequest":{"properties":{"text":{"type":"string","maxLength":5000,"minLength":1,"title":"Text"},"source":{"type":"string","enum":["input","output"],"title":"Source","default":"input"},"policy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Id"},"rule":{"anyOf":[{"$ref":"#/components/schemas/PlaygroundRule"},{"type":"null"}]}},"type":"object","required":["text"],"title":"PlaygroundRequest"},"PlaygroundResult":{"properties":{"action":{"type":"string","enum":["PASSED","BLOCKED","MODIFIED"],"title":"Action"},"rule_name":{"type":"string","title":"Rule Name"},"matched":{"items":{"type":"string"},"type":"array","title":"Matched","default":[]},"user_sees":{"type":"string","title":"User Sees"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["action","rule_name","user_sees"],"title":"PlaygroundResult"},"PlaygroundRule":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","default":"Draft rule"},"rule_type":{"type":"string","enum":["topic","word","pii","response_modifier"],"title":"Rule Type"},"rule_config":{"additionalProperties":true,"type":"object","title":"Rule Config"}},"type":"object","required":["rule_type","rule_config"],"title":"PlaygroundRule"},"PreviousOutput":{"properties":{"label":{"type":"string","maxLength":200,"title":"Label"},"output":{"type":"string","maxLength":8000,"title":"Output","default":""}},"type":"object","required":["label"],"title":"PreviousOutput"},"PromptCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"model_target":{"type":"string","maxLength":80,"title":"Model Target","default":""},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"},"body":{"type":"string","maxLength":32000,"minLength":1,"title":"Body"},"change_note":{"type":"string","maxLength":500,"title":"Change Note","default":"Initial version"}},"type":"object","required":["name","body"],"title":"PromptCreate"},"PromptDetail":{"properties":{"prompt_id":{"type":"string","title":"Prompt Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"model_target":{"type":"string","title":"Model Target","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"status":{"type":"string","title":"Status","default":"active"},"source":{"type":"string","enum":["tenant","starter"],"title":"Source"},"latest_version":{"type":"integer","title":"Latest Version"},"published_version":{"type":"integer","title":"Published Version"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"published_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By"},"forked_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"used_by_agents":{"items":{"type":"string"},"type":"array","title":"Used By Agents"},"used_by":{"items":{"$ref":"#/components/schemas/LinkedAgent"},"type":"array","title":"Used By"},"versions":{"items":{"$ref":"#/components/schemas/PromptVersion"},"type":"array","title":"Versions"}},"type":"object","required":["prompt_id","name","source","latest_version","published_version","versions"],"title":"PromptDetail"},"PromptDiff":{"properties":{"prompt_id":{"type":"string","title":"Prompt Id"},"from_version":{"type":"integer","title":"From Version"},"to_version":{"type":"integer","title":"To Version"},"added":{"type":"integer","title":"Added"},"removed":{"type":"integer","title":"Removed"},"lines":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array","title":"Lines"}},"type":"object","required":["prompt_id","from_version","to_version","added","removed","lines"],"title":"PromptDiff"},"PromptEnhanceRequest":{"properties":{"prompt":{"type":"string","maxLength":32000,"minLength":1,"title":"Prompt"},"kind":{"type":"string","enum":["agent_system_prompt","library_prompt"],"title":"Kind","default":"library_prompt"},"instructions":{"type":"string","maxLength":1000,"title":"Instructions","default":""},"context":{"$ref":"#/components/schemas/EnhanceContext"}},"type":"object","required":["prompt"],"title":"PromptEnhanceRequest"},"PromptEnhanceResult":{"properties":{"enhanced_prompt":{"type":"string","title":"Enhanced Prompt"},"changes":{"items":{"type":"string"},"type":"array","title":"Changes"},"missing_placeholders":{"items":{"type":"string"},"type":"array","title":"Missing Placeholders"},"model":{"type":"string","title":"Model"},"latency_ms":{"type":"integer","title":"Latency Ms"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"}},"type":"object","required":["enhanced_prompt","changes","missing_placeholders","model","latency_ms","input_tokens","output_tokens"],"title":"PromptEnhanceResult"},"PromptItem":{"properties":{"prompt_id":{"type":"string","title":"Prompt Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tenant_id":{"type":"string","title":"Tenant Id"},"sector_hint":{"type":"string","title":"Sector Hint"},"current_version":{"type":"string","title":"Current Version"},"versions_count":{"type":"integer","title":"Versions Count"},"model_target":{"type":"string","title":"Model Target"},"last_updated":{"type":"string","title":"Last Updated"},"has_test_suite":{"type":"boolean","title":"Has Test Suite","default":false},"evaluation_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Evaluation Score"},"used_in_agents":{"items":{"type":"string"},"type":"array","title":"Used In Agents","default":[]}},"type":"object","required":["prompt_id","name","description","tenant_id","sector_hint","current_version","versions_count","model_target","last_updated"],"title":"PromptItem"},"PromptSummary":{"properties":{"prompt_id":{"type":"string","title":"Prompt Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"model_target":{"type":"string","title":"Model Target","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"status":{"type":"string","title":"Status","default":"active"},"source":{"type":"string","enum":["tenant","starter"],"title":"Source"},"latest_version":{"type":"integer","title":"Latest Version"},"published_version":{"type":"integer","title":"Published Version"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"published_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By"},"forked_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"used_by_agents":{"items":{"type":"string"},"type":"array","title":"Used By Agents"},"used_by":{"items":{"$ref":"#/components/schemas/LinkedAgent"},"type":"array","title":"Used By"}},"type":"object","required":["prompt_id","name","source","latest_version","published_version"],"title":"PromptSummary"},"PromptUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"model_target":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Model Target"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Tags"}},"type":"object","title":"PromptUpdate"},"PromptVersion":{"properties":{"prompt_id":{"type":"string","title":"Prompt Id"},"version":{"type":"integer","title":"Version"},"body":{"type":"string","title":"Body"},"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"change_note":{"type":"string","title":"Change Note","default":""},"based_on":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Based On"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["prompt_id","version","body"],"title":"PromptVersion"},"ProvisionRequest":{"properties":{"name":{"type":"string","maxLength":60,"minLength":2,"title":"Name"},"sector":{"type":"string","title":"Sector","default":"Custom"},"admin_email":{"type":"string","title":"Admin Email","description":"Tenant admin who logs in via Cognito SSO after provisioning"},"account_email":{"type":"string","title":"Account Email","description":"AWS account root email — must be unique org-wide (required for preprod/prod; ignored for dev shared-cell)","default":""},"ou_name":{"type":"string","title":"Ou Name","description":"Target OU under the AWS Org — derived from environment if not supplied","default":""},"sso_user_first_name":{"type":"string","title":"Sso User First Name","description":"SSO user first name","default":"Tenant"},"sso_user_last_name":{"type":"string","title":"Sso User Last Name","description":"SSO user last name","default":"Admin"},"subscribed_products":{"items":{"type":"string","enum":["voice","chat_workflow","ai_dlc"]},"type":"array","title":"Subscribed Products","description":"What did the tenant subscribe to? At least one required."},"contract":{"$ref":"#/components/schemas/ContractCard-Input"},"environment":{"type":"string","enum":["dev","preprod","prod"],"title":"Environment","description":"Where the tenant lives: 'dev' shared cell (default, free), 'preprod' silo under Workloads-NonProd, 'prod' silo under Workloads-Prod.","default":"dev"},"provisioning_mode":{"anyOf":[{"type":"string","enum":["full","fast"]},{"type":"null"}],"title":"Provisioning Mode","description":"Legacy override — if set, bypasses environment-derived mode. 'full' = real Account Factory; 'fast' = shared cell."},"starter_kit_enabled":{"type":"boolean","title":"Starter Kit Enabled","description":"When true, seed the tenant with sector defaults (voice workflow, sample agents/workflows). False leaves it empty for a from-scratch build.","default":true}},"type":"object","required":["name","admin_email"],"title":"ProvisionRequest"},"QueryRequest":{"properties":{"kb_ids":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Kb Ids"},"query":{"type":"string","maxLength":1000,"minLength":1,"title":"Query"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top K","default":5},"min_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Score","default":0.0}},"type":"object","required":["kb_ids","query"],"title":"QueryRequest"},"ReadinessResponse":{"properties":{"status":{"type":"string","title":"Status"},"checks":{"additionalProperties":{"type":"string"},"type":"object","title":"Checks"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["status","checks","timestamp"],"title":"ReadinessResponse"},"RejectRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"RejectRequest"},"RemoveKb":{"properties":{"kb_token":{"type":"string","maxLength":2000,"minLength":10,"title":"Kb Token"},"key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Key"}},"type":"object","required":["kb_token"],"title":"RemoveKb"},"RespondToMfaRequest":{"properties":{"username":{"type":"string","maxLength":256,"minLength":1,"title":"Username"},"session":{"type":"string","minLength":1,"title":"Session"},"mfa_code":{"type":"string","maxLength":10,"minLength":4,"title":"Mfa Code"},"challenge":{"type":"string","maxLength":32,"title":"Challenge","default":"SOFTWARE_TOKEN_MFA"},"tenant_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["username","session","mfa_code"],"title":"RespondToMfaRequest"},"RoadmapPhase":{"properties":{"phase_id":{"type":"string","title":"Phase Id"},"name":{"type":"string","enum":["Pilot","Scale","Industrialize"],"title":"Name"},"start_month":{"type":"integer","title":"Start Month"},"end_month":{"type":"integer","title":"End Month"},"use_cases":{"items":{"type":"string"},"type":"array","title":"Use Cases"},"status":{"type":"string","enum":["planned","in_progress","complete"],"title":"Status"},"success_criteria":{"items":{"type":"string"},"type":"array","title":"Success Criteria"}},"type":"object","required":["phase_id","name","start_month","end_month","use_cases","status","success_criteria"],"title":"RoadmapPhase"},"RoiDefaults":{"properties":{"sector":{"type":"string","title":"Sector"},"typical_volume_per_day":{"type":"integer","title":"Typical Volume Per Day"},"typical_cost_per_task_usd":{"type":"number","title":"Typical Cost Per Task Usd"},"typical_automation_rate":{"type":"number","title":"Typical Automation Rate"},"typical_quality_uplift_pct":{"type":"number","title":"Typical Quality Uplift Pct"},"notes":{"type":"string","title":"Notes"}},"type":"object","required":["sector","typical_volume_per_day","typical_cost_per_task_usd","typical_automation_rate","typical_quality_uplift_pct","notes"],"title":"RoiDefaults"},"RoleCapability":{"properties":{"role":{"type":"string","title":"Role"},"can_view":{"items":{"type":"string"},"type":"array","title":"Can View"},"can_create":{"items":{"type":"string"},"type":"array","title":"Can Create"},"can_approve":{"items":{"type":"string"},"type":"array","title":"Can Approve"},"description":{"type":"string","title":"Description"}},"type":"object","required":["role","can_view","can_create","can_approve","description"],"title":"RoleCapability"},"RoleChangeRequest":{"properties":{"role":{"type":"string","enum":["tenant-admin","tenant-user","tenant-viewer"],"title":"Role"}},"type":"object","required":["role"],"title":"RoleChangeRequest"},"RunTarget":{"properties":{"type":{"type":"string","enum":["workflow","agent"],"title":"Type"},"id":{"type":"string","maxLength":200,"minLength":1,"title":"Id"},"version":{"anyOf":[{"type":"integer"},{"type":"string","enum":["published","latest","draft"]}],"title":"Version","default":"published"}},"type":"object","required":["type","id"],"title":"RunTarget"},"SSOConfig":{"properties":{"user_pool_id":{"type":"string","title":"User Pool Id"},"issuer_url":{"type":"string","title":"Issuer Url"},"region":{"type":"string","title":"Region"},"environment":{"type":"string","title":"Environment"}},"type":"object","required":["user_pool_id","issuer_url","region","environment"],"title":"SSOConfig"},"SavedKbs":{"properties":{"kb_tokens":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Kb Tokens"},"key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Key"}},"type":"object","title":"SavedKbs"},"ScenariosResponse":{"properties":{"profile":{"type":"string","title":"Profile"},"count":{"type":"integer","title":"Count"},"scenarios":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Scenarios"}},"type":"object","required":["profile","count","scenarios"],"title":"ScenariosResponse"},"SceneRequest":{"properties":{"scene":{"type":"integer","maximum":7.0,"minimum":1.0,"title":"Scene"}},"type":"object","required":["scene"],"title":"SceneRequest"},"SectorSummary":{"properties":{"sector":{"type":"string","title":"Sector"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tenant_ids":{"items":{"type":"string"},"type":"array","title":"Tenant Ids"},"chat_enabled":{"type":"boolean","title":"Chat Enabled"},"alerts_enabled":{"type":"boolean","title":"Alerts Enabled"},"voice_enabled":{"type":"boolean","title":"Voice Enabled"},"agent_count":{"type":"integer","title":"Agent Count"}},"type":"object","required":["sector","tenant_ids","chat_enabled","alerts_enabled","voice_enabled","agent_count"],"title":"SectorSummary"},"SendMessageInput":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"},"lang":{"type":"string","enum":["en","ar","hu"],"title":"Lang","default":"en"},"preferredAgentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferredagentid"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","required":["text"],"title":"SendMessageInput","description":"Matches SendMessageSchema in the frontend."},"SendMessageResult":{"properties":{"messageId":{"type":"string","title":"Messageid"},"content":{"type":"string","title":"Content"},"lang":{"type":"string","enum":["en","ar","hu"],"title":"Lang"},"agentId":{"type":"string","title":"Agentid"},"agentName":{"type":"string","title":"Agentname"},"intent":{"type":"string","title":"Intent"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["messageId","content","lang","agentId","agentName","intent"],"title":"SendMessageResult","description":"Matches SendMessageResultSchema in the frontend."},"SetPasswordRequest":{"properties":{"username":{"type":"string","maxLength":256,"minLength":1,"title":"Username"},"session":{"type":"string","minLength":1,"title":"Session"},"new_password":{"type":"string","maxLength":256,"minLength":8,"title":"New Password"},"tenant_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tenant Id"},"given_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Given Name"},"family_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Family Name"}},"type":"object","required":["username","session","new_password"],"title":"SetPasswordRequest"},"StageRequest":{"properties":{"event_summary":{"type":"string","maxLength":4000,"minLength":1,"title":"Event Summary"},"event_payload":{"additionalProperties":true,"type":"object","title":"Event Payload"},"workflow_id":{"type":"string","maxLength":200,"minLength":1,"title":"Workflow Id"},"source":{"type":"string","enum":["starter","custom"],"title":"Source"},"tenant_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Tenant Id"},"stage_index":{"type":"integer","exclusiveMaximum":12.0,"minimum":0.0,"title":"Stage Index"},"previous":{"items":{"$ref":"#/components/schemas/PreviousOutput"},"type":"array","maxItems":12,"title":"Previous"},"allow_tools":{"type":"boolean","title":"Allow Tools","default":true}},"type":"object","required":["event_summary","workflow_id","source","stage_index"],"title":"StageRequest"},"StageResult":{"properties":{"index":{"type":"integer","title":"Index"},"label":{"type":"string","title":"Label"},"type":{"type":"string","title":"Type"},"status":{"type":"string","enum":["success","error","skipped"],"title":"Status"},"output":{"type":"string","title":"Output","default":""},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"},"agent_result":{"anyOf":[{"$ref":"#/components/schemas/AgentTestResult"},{"type":"null"}]}},"type":"object","required":["index","label","type","status"],"title":"StageResult"},"StartCheckRequest":{"properties":{"target":{"type":"string","pattern":"^(agent|workflow):[A-Za-z0-9_\\-]+$","title":"Target"},"candidate":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Candidate","default":"latest"},"draft":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Draft"}},"type":"object","required":["target"],"title":"StartCheckRequest"},"StartRunRequest":{"properties":{"target":{"$ref":"#/components/schemas/RunTarget"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"draft":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Draft"},"mode":{"type":"string","enum":["full","step"],"title":"Mode","default":"full"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id"},"pins":{"additionalProperties":true,"type":"object","title":"Pins"},"client_request_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Client Request Id"}},"type":"object","required":["target"],"title":"StartRunRequest"},"StatusResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"sc_record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sc Record Id"},"status":{"type":"string","title":"Status"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Errors","default":[]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message","default":""}},"type":"object","required":["tenant_id","sc_record_id","status"],"title":"StatusResponse"},"SubmitRequest":{"properties":{"item_type":{"type":"string","maxLength":64,"minLength":1,"title":"Item Type"},"resource_id":{"type":"string","maxLength":128,"minLength":1,"title":"Resource Id"}},"type":"object","required":["item_type","resource_id"],"title":"SubmitRequest"},"SubscriptionResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_display_name":{"type":"string","title":"Tenant Display Name"},"sector":{"type":"string","title":"Sector","default":"SMB"},"subscribed_products":{"items":{"type":"string"},"type":"array","title":"Subscribed Products"},"provisioning_mode":{"type":"string","title":"Provisioning Mode","default":"fast"},"status":{"type":"string","title":"Status","default":"unknown"},"contract":{"anyOf":[{"$ref":"#/components/schemas/ContractInfo"},{"type":"null"}]}},"type":"object","required":["tenant_id","tenant_display_name"],"title":"SubscriptionResponse"},"TemplateItem":{"properties":{"template_id":{"type":"string","title":"Template Id"},"name":{"type":"string","title":"Name"},"pattern":{"type":"string","title":"Pattern"},"description":{"type":"string","title":"Description"},"use_cases":{"items":{"type":"string"},"type":"array","title":"Use Cases"},"typical_blocks":{"items":{"type":"string"},"type":"array","title":"Typical Blocks"},"sectors":{"items":{"type":"string"},"type":"array","title":"Sectors"}},"type":"object","required":["template_id","name","pattern","description","use_cases","typical_blocks"],"title":"TemplateItem"},"TenantCost":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"type":"string","title":"Tenant Name"},"cycle_key":{"type":"string","title":"Cycle Key"},"call_count":{"type":"integer","title":"Call Count"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"variable_cost_aed":{"type":"number","title":"Variable Cost Aed"},"dedicated_aws_cost_aed":{"type":"number","title":"Dedicated Aws Cost Aed"},"shared_infra_share_aed":{"type":"number","title":"Shared Infra Share Aed"},"total_cost_aed":{"type":"number","title":"Total Cost Aed"},"margin_target":{"type":"number","title":"Margin Target"},"total_billed_aed":{"type":"number","title":"Total Billed Aed"},"margin_pct":{"type":"number","title":"Margin Pct"},"status":{"type":"string","title":"Status"},"by_model":{"items":{"$ref":"#/components/schemas/ModelBreakdown"},"type":"array","title":"By Model"},"aws_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aws Account Id"},"dedicated_source":{"type":"string","title":"Dedicated Source","default":"shared"}},"type":"object","required":["tenant_id","tenant_name","cycle_key","call_count","input_tokens","output_tokens","variable_cost_aed","dedicated_aws_cost_aed","shared_infra_share_aed","total_cost_aed","margin_target","total_billed_aed","margin_pct","status","by_model"],"title":"TenantCost"},"TenantOnboardingBody":{"properties":{"tenant_id":{"type":"string","maxLength":40,"minLength":3,"pattern":"^[a-z0-9-]+$","title":"Tenant Id"},"display_name":{"type":"string","title":"Display Name"},"primary_contact_email":{"type":"string","title":"Primary Contact Email"},"saml_metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saml Metadata Url"},"initial_intents":{"items":{"type":"string"},"type":"array","title":"Initial Intents","description":"Intents the tenant is permitted to register workflows for"}},"type":"object","required":["tenant_id","display_name","primary_contact_email"],"title":"TenantOnboardingBody"},"TenantRecord":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"sector":{"type":"string","title":"Sector"},"admin_email":{"type":"string","title":"Admin Email"},"account_email":{"type":"string","title":"Account Email"},"ou_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ou Id"},"ou_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ou Name"},"sc_record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sc Record Id"},"sc_provisioned_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sc Provisioned Product Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"status":{"type":"string","title":"Status"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message","default":""},"subscribed_products":{"items":{"type":"string"},"type":"array","title":"Subscribed Products"},"contract":{"additionalProperties":true,"type":"object","title":"Contract"},"environment":{"anyOf":[{"type":"string","enum":["dev","preprod","prod"]},{"type":"null"}],"title":"Environment"},"provisioning_mode":{"type":"string","title":"Provisioning Mode","default":"full"},"starter_kit_enabled":{"type":"boolean","title":"Starter Kit Enabled","default":true},"provisioning_hooks":{"additionalProperties":true,"type":"object","title":"Provisioning Hooks"},"cognito_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cognito Username"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"source":{"type":"string","enum":["seed","live"],"title":"Source","default":"live"}},"type":"object","required":["tenant_id","name","sector","admin_email","account_email","status"],"title":"TenantRecord"},"TenantRoadmap":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"type":"string","title":"Tenant Name"},"sector":{"type":"string","title":"Sector"},"current_phase":{"type":"string","enum":["Pilot","Scale","Industrialize"],"title":"Current Phase"},"months_into_journey":{"type":"integer","title":"Months Into Journey"},"phases":{"items":{"$ref":"#/components/schemas/RoadmapPhase"},"type":"array","title":"Phases"}},"type":"object","required":["tenant_id","tenant_name","sector","current_phase","months_into_journey","phases"],"title":"TenantRoadmap"},"TenantSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"sector":{"type":"string","title":"Sector"},"status":{"type":"string","title":"Status"},"region":{"type":"string","title":"Region"},"onboarded":{"type":"string","title":"Onboarded"},"agents_active":{"type":"integer","title":"Agents Active"},"workflows_active":{"type":"integer","title":"Workflows Active"},"monthly_cost_usd":{"type":"integer","title":"Monthly Cost Usd"},"compliance_score":{"type":"integer","title":"Compliance Score"},"incidents_open":{"type":"integer","title":"Incidents Open"},"primary_contact":{"type":"string","title":"Primary Contact"}},"type":"object","required":["id","name","sector","status","region","onboarded","agents_active","workflows_active","monthly_cost_usd","compliance_score","incidents_open","primary_contact"],"title":"TenantSummary","description":"Tenant row for the Platform Ops cross-tenant table."},"TenantUsage":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tenant_name":{"type":"string","title":"Tenant Name"},"cycle_start":{"type":"string","title":"Cycle Start"},"cycle_end":{"type":"string","title":"Cycle End"},"voice":{"$ref":"#/components/schemas/UsageMetric"},"voice_test_minutes":{"type":"number","title":"Voice Test Minutes","default":0.0},"contract":{"$ref":"#/components/schemas/ContractCard-Output"},"voice_source":{"type":"string","title":"Voice Source"},"chat_workflow":{"$ref":"#/components/schemas/ChatWorkflowUsage"}},"type":"object","required":["tenant_id","tenant_name","cycle_start","cycle_end","voice","contract","voice_source","chat_workflow"],"title":"TenantUsage"},"TenantUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role","default":"tenant-user"},"status":{"type":"string","title":"Status"},"tenant_id":{"type":"string","title":"Tenant Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_modified":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Modified"}},"type":"object","required":["user_id","email","name","status","tenant_id"],"title":"TenantUser"},"TenantVoiceConfig":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"enabled":{"type":"boolean","title":"Enabled","default":false},"xaia_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xaia Workflow Id"},"xaia_phone_number_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xaia Phone Number Group Id"},"workflow_input_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Workflow Input Mapping"},"status":{"type":"string","title":"Status","default":"draft"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"warnings":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Warnings"}},"type":"object","required":["tenant_id"],"title":"TenantVoiceConfig"},"TenantVoiceConfigUpsert":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"xaia_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xaia Workflow Id"},"xaia_phone_number_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xaia Phone Number Group Id"},"workflow_input_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Workflow Input Mapping"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"TenantVoiceConfigUpsert"},"TestCaseBody":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"assertions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":30,"title":"Assertions"}},"type":"object","required":["name"],"title":"TestCaseBody"},"TextDoc":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"text":{"type":"string","minLength":1,"title":"Text"}},"type":"object","required":["title","text"],"title":"TextDoc"},"ToolCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"category":{"type":"string","enum":["database","api","messaging","compute","storage","external","monitoring"],"title":"Category","default":"api"},"tool_type":{"type":"string","enum":["mcp","built_in","custom","http"],"title":"Tool Type","default":"mcp"},"endpoint":{"type":"string","maxLength":2048,"title":"Endpoint","default":""},"http_config":{"anyOf":[{"$ref":"#/components/schemas/HttpToolConfig"},{"type":"null"}]},"auth_type":{"type":"string","enum":["oauth","api_key","bearer","m2m","iam","none"],"title":"Auth Type","default":"none"},"api_key_value":{"anyOf":[{"type":"string","maxLength":4096,"format":"password","writeOnly":true},{"type":"null"}],"title":"Api Key Value"},"input_schema":{"type":"string","maxLength":16000,"title":"Input Schema","default":""},"output_schema":{"type":"string","maxLength":16000,"title":"Output Schema","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"status":{"type":"string","enum":["draft","active","archived"],"title":"Status","default":"draft"},"version":{"type":"string","title":"Version","default":"v1.0.0"}},"type":"object","required":["name"],"title":"ToolCreateRequest","description":"Payload for POST /tenant/tools/custom — user-authored tool creation."},"ToolItem":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"category":{"type":"string","enum":["database","api","messaging","compute","storage","external","monitoring","audit"],"title":"Category"},"tenant_id":{"type":"string","title":"Tenant Id"},"sector_hint":{"type":"string","title":"Sector Hint"},"mcp_endpoint":{"type":"string","title":"Mcp Endpoint"},"version":{"type":"string","title":"Version"},"status":{"type":"string","enum":["active","deprecated","beta"],"title":"Status","default":"active"},"auth_type":{"type":"string","enum":["oauth","api_key","m2m","iam","mtls"],"title":"Auth Type"},"invocations_24h":{"type":"integer","title":"Invocations 24H","default":0},"source":{"type":"string","enum":["platform","tenant"],"title":"Source","default":"tenant"},"used_in_agents":{"items":{"type":"string"},"type":"array","title":"Used In Agents","default":[]},"gateway_tools":{"items":{"type":"string"},"type":"array","title":"Gateway Tools","default":[]},"test_mode":{"type":"string","enum":["built_in","gateway","unavailable"],"title":"Test Mode","default":"unavailable"}},"type":"object","required":["tool_id","name","description","category","tenant_id","sector_hint","mcp_endpoint","version","auth_type"],"title":"ToolItem"},"ToolSignature":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"dotted_path":{"type":"string","title":"Dotted Path"},"summary":{"type":"string","title":"Summary","default":""},"fields":{"items":{"$ref":"#/components/schemas/ToolSignatureField"},"type":"array","title":"Fields"}},"type":"object","required":["tool_id","dotted_path","fields"],"title":"ToolSignature"},"ToolSignatureField":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["str","int","float","bool","json"],"title":"Type"},"required":{"type":"boolean","title":"Required"},"default":{"title":"Default"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name","type","required"],"title":"ToolSignatureField"},"ToolTestError":{"properties":{"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"}},"type":"object","required":["type","message"],"title":"ToolTestError"},"ToolTestRequest":{"properties":{"tool_id":{"type":"string","maxLength":200,"minLength":1,"title":"Tool Id"},"source":{"type":"string","enum":["platform","custom"],"title":"Source"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"timeout_seconds":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Timeout Seconds","default":15},"gateway_tool":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Gateway Tool"}},"type":"object","required":["tool_id","source"],"title":"ToolTestRequest"},"ToolTestResult":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"tool_name":{"type":"string","title":"Tool Name"},"status":{"type":"string","enum":["success","error"],"title":"Status"},"mode":{"type":"string","enum":["live","simulated","gateway","built_in"],"title":"Mode"},"summary":{"type":"string","title":"Summary"},"endpoint":{"type":"string","title":"Endpoint"},"gateway_tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Tool"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status"},"latency_ms":{"type":"integer","title":"Latency Ms","default":0},"response":{"title":"Response"},"error":{"anyOf":[{"$ref":"#/components/schemas/ToolTestError"},{"type":"null"}]},"validation_errors":{"items":{"type":"string"},"type":"array","title":"Validation Errors"},"output_warnings":{"items":{"type":"string"},"type":"array","title":"Output Warnings"},"output":{"title":"Output"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"tested_at":{"type":"string","title":"Tested At"}},"type":"object","required":["tool_id","tool_name","status","mode","summary","endpoint","tested_at"],"title":"ToolTestResult"},"ToolUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string","enum":["database","api","messaging","compute","storage","external","monitoring"]},{"type":"null"}],"title":"Category"},"tool_type":{"anyOf":[{"type":"string","enum":["mcp","built_in","custom","http"]},{"type":"null"}],"title":"Tool Type"},"endpoint":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Endpoint"},"http_config":{"anyOf":[{"$ref":"#/components/schemas/HttpToolConfig"},{"type":"null"}]},"auth_type":{"anyOf":[{"type":"string","enum":["oauth","api_key","bearer","m2m","iam","none"]},{"type":"null"}],"title":"Auth Type"},"api_key_value":{"anyOf":[{"type":"string","maxLength":4096,"format":"password","writeOnly":true},{"type":"null"}],"title":"Api Key Value"},"input_schema":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}],"title":"Input Schema"},"output_schema":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}],"title":"Output Schema"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"status":{"anyOf":[{"type":"string","enum":["draft","active","archived"]},{"type":"null"}],"title":"Status"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","title":"ToolUpdateRequest","description":"Payload for PATCH /tenant/tools/custom/{tool_id} — all fields optional."},"TraceAgentStep":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"step":{"type":"string","title":"Step"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"output_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Preview"}},"type":"object","required":["agent_id","step"],"title":"TraceAgentStep"},"TraceItem":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"execution_id":{"type":"string","title":"Execution Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"timestamp":{"type":"string","title":"Timestamp"},"span_count":{"type":"integer","title":"Span Count"},"duration_ms":{"type":"integer","title":"Duration Ms"},"status":{"type":"string","enum":["succeeded","failed","in_progress"],"title":"Status"},"model_used":{"type":"string","title":"Model Used"},"tokens_in":{"type":"integer","title":"Tokens In"},"tokens_out":{"type":"integer","title":"Tokens Out"},"cost_usd":{"type":"number","title":"Cost Usd"},"source":{"type":"string","enum":["synthetic","live"],"title":"Source","default":"synthetic"}},"type":"object","required":["trace_id","execution_id","workflow_id","tenant_id","timestamp","span_count","duration_ms","status","model_used","tokens_in","tokens_out","cost_usd"],"title":"TraceItem"},"TraceStage":{"properties":{"stage":{"type":"string","title":"Stage"},"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"summary_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Line"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"result_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Summary"},"agent_steps":{"items":{"$ref":"#/components/schemas/TraceAgentStep"},"type":"array","title":"Agent Steps"}},"type":"object","required":["stage"],"title":"TraceStage"},"TradeLicenceOnFile":{"properties":{"licenceNumber":{"type":"string","title":"Licencenumber"},"tradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tradename"},"activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity"},"legalForm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalform"},"expiryDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expirydate"}},"type":"object","required":["licenceNumber"],"title":"TradeLicenceOnFile","description":"A trade licence the customer already holds, from the Business One extras\ncall. Activity and legal form are the Business One app's own codes."},"TradeNameCheckInput":{"properties":{"name":{"type":"string","title":"Name","description":"Proposed commercial trade name"},"jurisdiction":{"type":"string","title":"Jurisdiction","description":"Jurisdiction code","default":"DED_MAINLAND"}},"type":"object","required":["name"],"title":"TradeNameCheckInput"},"TradeNameCheckOutput":{"properties":{"status":{"type":"string","title":"Status","description":"'available', 'reserved', or 'rejected'"},"alternatives":{"items":{"type":"string"},"type":"array","title":"Alternatives"}},"type":"object","required":["status"],"title":"TradeNameCheckOutput"},"TranscriptTurn":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"TranscriptTurn"},"TtsSynthesisRequest":{"properties":{"text":{"type":"string","title":"Text","description":"Text string to synthesize"},"voice_id":{"type":"string","title":"Voice Id","description":"xAI neural voice ID (default: liora)","default":"liora"},"language":{"type":"string","title":"Language","description":"Language code: en or ar","default":"en"},"speed":{"type":"number","title":"Speed","description":"Speech rate multiplier (0.8 - 1.5)","default":1.0}},"type":"object","required":["text"],"title":"TtsSynthesisRequest"},"UaePassExchangeRequest":{"properties":{"code":{"type":"string","minLength":1,"title":"Code"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},"type":"object","required":["code"],"title":"UaePassExchangeRequest"},"UaePassExchangeResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"sub":{"type":"string","title":"Sub"},"uuid":{"type":"string","title":"Uuid"},"idn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idn"},"userType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usertype"},"fullnameEN":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullnameen"},"fullnameAR":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullnamear"},"firstnameEN":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstnameen"},"lastnameEN":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastnameen"},"firstnameAR":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstnamear"},"lastnameAR":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastnamear"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"nationalityEN":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nationalityen"},"nationalityAR":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nationalityar"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"isExistingCustomer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isexistingcustomer"},"tradeLicence":{"anyOf":[{"$ref":"#/components/schemas/TradeLicenceOnFile"},{"type":"null"}]}},"type":"object","required":["customer_id","sub","uuid"],"title":"UaePassExchangeResponse"},"UaePassLogoutRequest":{"properties":{"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},"type":"object","title":"UaePassLogoutRequest"},"UaePassLogoutResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"logout_url":{"type":"string","title":"Logout Url"}},"type":"object","required":["logout_url"],"title":"UaePassLogoutResponse"},"UpdateMemoryBody":{"properties":{"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"businessIdea":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Businessidea"},"businessVertical":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Businessvertical"},"targetLocation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetlocation"},"targetBudget":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetbudget"},"preferredJurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferredjurisdiction"},"proposedTradeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposedtradename"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"UpdateMemoryBody"},"UploadRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"size":{"type":"integer","exclusiveMinimum":0.0,"title":"Size"}},"type":"object","required":["filename","size"],"title":"UploadRequest"},"UrlDoc":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":8,"title":"Url"},"max_pages":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Max Pages","default":1},"max_depth":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Max Depth","default":0}},"type":"object","required":["url"],"title":"UrlDoc"},"UsageAnalyticsResponse":{"properties":{"period_label":{"type":"string","title":"Period Label"},"kpis":{"items":{"$ref":"#/components/schemas/UsageKPI"},"type":"array","title":"Kpis"},"executions_by_workflow":{"items":{"$ref":"#/components/schemas/ExecutionsByWorkflow"},"type":"array","title":"Executions By Workflow"},"user_activity_30d":{"items":{"$ref":"#/components/schemas/UserActivityPoint"},"type":"array","title":"User Activity 30D"},"user_activity_table":{"items":{"$ref":"#/components/schemas/UserActivityRow"},"type":"array","title":"User Activity Table"},"ai_feature_adoption":{"items":{"$ref":"#/components/schemas/AIFeatureAdoptionRow"},"type":"array","title":"Ai Feature Adoption"}},"type":"object","required":["period_label","kpis","executions_by_workflow","user_activity_30d","user_activity_table","ai_feature_adoption"],"title":"UsageAnalyticsResponse"},"UsageKPI":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"},"change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Pct"},"secondary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary"}},"type":"object","required":["label","value"],"title":"UsageKPI"},"UsageMetric":{"properties":{"used":{"type":"number","title":"Used"},"included":{"type":"number","title":"Included"},"subscription_aed":{"type":"number","title":"Subscription Aed"},"overage_rate_aed":{"type":"number","title":"Overage Rate Aed"},"unit":{"type":"string","title":"Unit"}},"type":"object","required":["used","included","subscription_aed","overage_rate_aed","unit"],"title":"UsageMetric"},"UseCaseCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"sector":{"type":"string","title":"Sector","default":"Custom"},"description":{"type":"string","title":"Description","default":""},"template_workflow_id":{"type":"string","title":"Template Workflow Id","default":""},"workflow_ids":{"items":{"type":"string"},"type":"array","title":"Workflow Ids","default":[]},"required_tools":{"items":{"type":"string"},"type":"array","title":"Required Tools","default":[]},"typical_agents":{"items":{"type":"string"},"type":"array","title":"Typical Agents","default":[]},"complexity":{"type":"string","enum":["starter","intermediate","advanced"],"title":"Complexity","default":"starter"},"version":{"type":"string","title":"Version","default":"v1.0.0"},"status":{"type":"string","enum":["draft","active","archived"],"title":"Status","default":"draft"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]}},"type":"object","required":["name"],"title":"UseCaseCreateRequest"},"UseCaseStatus":{"properties":{"use_case_id":{"type":"string","title":"Use Case Id"},"is_deployed":{"type":"boolean","title":"Is Deployed"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id"}},"type":"object","required":["use_case_id","is_deployed"],"title":"UseCaseStatus","description":"Per-tenant adoption status."},"UseCaseUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"template_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Workflow Id"},"workflow_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workflow Ids"},"required_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required Tools"},"typical_agents":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Typical Agents"},"complexity":{"anyOf":[{"type":"string","enum":["starter","intermediate","advanced"]},{"type":"null"}],"title":"Complexity"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"type":"string","enum":["draft","active","archived"]},{"type":"null"}],"title":"Status"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"UseCaseUpdateRequest"},"UseCaseWithStatus":{"properties":{"use_case_id":{"type":"string","title":"Use Case Id"},"name":{"type":"string","title":"Name"},"sector":{"type":"string","title":"Sector"},"description":{"type":"string","title":"Description"},"template_workflow_id":{"type":"string","title":"Template Workflow Id"},"typical_value_usd":{"type":"integer","title":"Typical Value Usd"},"estimated_setup_hours":{"type":"integer","title":"Estimated Setup Hours"},"required_tools":{"items":{"type":"string"},"type":"array","title":"Required Tools"},"typical_agents":{"items":{"type":"string"},"type":"array","title":"Typical Agents"},"complexity":{"type":"string","enum":["starter","intermediate","advanced"],"title":"Complexity"},"deployed_count":{"type":"integer","title":"Deployed Count"},"source":{"type":"string","enum":["ava-lift","agnext-original","live"],"title":"Source"},"forked_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forked From"},"tenant_status":{"$ref":"#/components/schemas/UseCaseStatus"}},"type":"object","required":["use_case_id","name","sector","description","template_workflow_id","typical_value_usd","estimated_setup_hours","required_tools","typical_agents","complexity","deployed_count","source","tenant_status"],"title":"UseCaseWithStatus"},"UserActivityPoint":{"properties":{"day":{"type":"integer","title":"Day"},"active_users":{"type":"integer","title":"Active Users"}},"type":"object","required":["day","active_users"],"title":"UserActivityPoint"},"UserActivityRow":{"properties":{"user":{"type":"string","title":"User"},"role":{"type":"string","title":"Role"},"logins_30d":{"type":"integer","title":"Logins 30D"},"workflows_touched":{"type":"integer","title":"Workflows Touched"},"approvals":{"type":"integer","title":"Approvals"},"executions_viewed":{"type":"integer","title":"Executions Viewed"},"last_active":{"type":"string","title":"Last Active"}},"type":"object","required":["user","role","logins_30d","workflows_touched","approvals","executions_viewed","last_active"],"title":"UserActivityRow"},"ValidateRequest":{"properties":{"asset_type":{"type":"string","pattern":"^workflow$","title":"Asset Type","default":"workflow"},"spec":{"additionalProperties":true,"type":"object","title":"Spec"}},"type":"object","required":["spec"],"title":"ValidateRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifiedCustomerResponse":{"properties":{"customerId":{"type":"string","title":"Customerid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"emiratesId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emiratesid"},"maskedEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maskedemail"},"maskedMobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maskedmobile"},"maskedEmiratesId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maskedemiratesid"},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nationality"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"dateOfBirth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateofbirth"},"birthYear":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Birthyear"},"verificationLevel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verificationlevel"},"isExistingCustomer":{"type":"boolean","title":"Isexistingcustomer","default":true},"tradeLicence":{"anyOf":[{"$ref":"#/components/schemas/TradeLicenceOnFile"},{"type":"null"}]}},"type":"object","required":["customerId"],"title":"VerifiedCustomerResponse","description":"The owner-facing subset — deliberately far smaller than the BCRM payload.\n\nStill excluded on purpose: blacklist details and the LOA reason. What IS\nreturned — name, contacts, Emirates ID, nationality, gender, and a\nverification level — is the caller's OWN data, released only after they\nproved control of the account's contact via OTP.\n\nBoth a masked and a full form are returned for the Emirates ID and for each\ncontact channel, so every screen can pick the right one rather than a single\npolicy being forced on all of them. The masked form is for anything\ndocument-shaped or likely to be shown to someone else; the full form is for\nthe founder checking their own details (settings, and the application review\nwhere they are about to submit that exact number).\n\n`email`/`mobile` here are the FULL (unmasked) values, distinct from\n`masked_email`/`masked_mobile` below: a document-style screen (the\nlicence certificate, application review) shows the masked form, same\nas any formal paperwork would, but the founder's own account/settings\npage is allowed to show their own full contact details back to them —\nthey already know their own email, and they just proved they control\nit. Both are included so each screen can pick the right one."},"VerifyBody":{"properties":{"reference":{"type":"string","maxLength":128,"minLength":1,"title":"Reference"},"code":{"type":"string","maxLength":10,"minLength":4,"title":"Code"}},"type":"object","required":["reference","code"],"title":"VerifyBody"},"VerifyKeyRequest":{"properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","title":"VerifyKeyRequest"},"VerifyKeyResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"key_identity":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Key Identity"},"accessible_project_ids":{"items":{"type":"string"},"type":"array","title":"Accessible Project Ids","default":[]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"VerifyKeyResponse"},"VerifyMfaSetupRequest":{"properties":{"username":{"type":"string","maxLength":256,"minLength":1,"title":"Username"},"session":{"type":"string","minLength":1,"title":"Session"},"user_code":{"type":"string","maxLength":10,"minLength":4,"title":"User Code"},"friendly_device_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Friendly Device Name"},"tenant_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["username","session","user_code"],"title":"VerifyMfaSetupRequest"},"VersionDetail":{"properties":{"version":{"type":"integer","title":"Version"},"spec_hash":{"type":"string","title":"Spec Hash"},"change_note":{"type":"string","title":"Change Note","default":""},"based_on":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Based On"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"is_published":{"type":"boolean","title":"Is Published","default":false},"spec":{"additionalProperties":true,"type":"object","title":"Spec"}},"type":"object","required":["version","spec_hash","spec"],"title":"VersionDetail"},"VersionDiff":{"properties":{"from_version":{"type":"integer","title":"From Version"},"to_version":{"type":"integer","title":"To Version"},"ops":{"items":{"$ref":"#/components/schemas/DiffOp"},"type":"array","title":"Ops"}},"type":"object","required":["from_version","to_version","ops"],"title":"VersionDiff"},"VersionHead":{"properties":{"asset_type":{"type":"string","title":"Asset Type"},"asset_id":{"type":"string","title":"Asset Id"},"latest_version":{"type":"integer","title":"Latest Version"},"published_version":{"type":"integer","title":"Published Version"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"published_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By"}},"type":"object","required":["asset_type","asset_id","latest_version","published_version"],"title":"VersionHead"},"VersionList":{"properties":{"head":{"$ref":"#/components/schemas/VersionHead"},"versions":{"items":{"$ref":"#/components/schemas/VersionSummary"},"type":"array","title":"Versions"},"store":{"type":"string","title":"Store","default":"dynamodb"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"can_change":{"type":"boolean","title":"Can Change","default":false}},"type":"object","required":["head","versions"],"title":"VersionList"},"VersionSummary":{"properties":{"version":{"type":"integer","title":"Version"},"spec_hash":{"type":"string","title":"Spec Hash"},"change_note":{"type":"string","title":"Change Note","default":""},"based_on":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Based On"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"is_published":{"type":"boolean","title":"Is Published","default":false}},"type":"object","required":["version","spec_hash"],"title":"VersionSummary"},"ViabilityMemoOutput":{"properties":{"idea":{"type":"string","title":"Idea"},"sector":{"type":"string","title":"Sector"},"location":{"type":"string","title":"Location"},"market_size":{"type":"string","title":"Market Size"},"competitive_landscape":{"type":"string","title":"Competitive Landscape"},"regulatory_notes":{"type":"string","title":"Regulatory Notes"},"data_points":{"items":{"$ref":"#/components/schemas/DataPointOutput"},"type":"array","title":"Data Points"},"verdict":{"type":"string","title":"Verdict"}},"type":"object","required":["idea","sector","location","market_size","competitive_landscape","regulatory_notes","data_points","verdict"],"title":"ViabilityMemoOutput"},"VoiceAdvisorRequest":{"properties":{"text":{"type":"string","title":"Text","description":"Spoken transcript or voice prompt text"},"agent_id":{"type":"string","title":"Agent Id","description":"Voice agent: sara (Business Advisor) or rashid (Licensing Specialist)","default":"sara"},"language":{"type":"string","title":"Language","description":"Language code: en or ar","default":"en"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid","description":"UAE Pass UUID"},"speed":{"type":"number","title":"Speed","description":"Speech rate","default":1.0},"skip_tts":{"type":"boolean","title":"Skip Tts","description":"Voice Advisor uses purely S2S model via WebSocket. Defaults to True to eliminate batch TTS.","default":true}},"type":"object","required":["text"],"title":"VoiceAdvisorRequest"},"VoiceTurnRequest":{"properties":{"audio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio","description":"Base64 encoded audio from user microphone"},"mime_type":{"type":"string","title":"Mime Type","description":"MIME type of audio (audio/webm, audio/mp4, audio/wav, audio/mpeg)","default":"audio/webm"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"Optional text if pre-transcribed or typed"},"agent_id":{"type":"string","title":"Agent Id","description":"Voice agent: sara","default":"sara"},"language":{"type":"string","title":"Language","description":"Language code: en or ar","default":"en"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid","description":"UAE Pass UUID"},"speed":{"type":"number","title":"Speed","description":"Speech rate","default":1.0},"skip_tts":{"type":"boolean","title":"Skip Tts","description":"Whether to bypass neural audio generation","default":false}},"type":"object","title":"VoiceTurnRequest"},"VoucherItem":{"properties":{"label":{"type":"string","title":"Label"},"amount_aed":{"type":"integer","title":"Amount Aed"}},"type":"object","required":["label","amount_aed"],"title":"VoucherItem"},"WhoAmI":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_platform_ops":{"type":"boolean","title":"Is Platform Ops"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":[]}},"type":"object","required":["user_id","email","tenant_id","is_platform_ops"],"title":"WhoAmI","description":"Returned by /api/v1/whoami — drives the Header chip + role-aware routing."},"Workflow":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"intent":{"type":"string","title":"Intent"},"current_version":{"type":"string","title":"Current Version"},"versions":{"items":{"$ref":"#/components/schemas/WorkflowVersion"},"type":"array","title":"Versions"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["workflow_id","tenant_id","name","intent","current_version","versions","created_at","updated_at"],"title":"Workflow","description":"A workflow with all versions."},"WorkflowBlock":{"properties":{"instance_id":{"type":"string","title":"Instance Id"},"block_id":{"type":"string","title":"Block Id"},"position":{"additionalProperties":{"type":"number"},"type":"object","title":"Position"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["instance_id","block_id"],"title":"WorkflowBlock","description":"A single block instance on the workflow canvas."},"WorkflowCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"type":"string","title":"Description","default":""},"intent":{"type":"string","title":"Intent","default":"custom"},"intent_description":{"type":"string","title":"Intent Description","default":""},"example_events":{"items":{"type":"string"},"type":"array","title":"Example Events","default":[]},"sector":{"type":"string","title":"Sector","default":"Custom"},"status":{"type":"string","enum":["draft","active","archived"],"title":"Status","default":"draft"},"stages":{"items":{"type":"string"},"type":"array","title":"Stages","default":[]},"agents_used":{"items":{"type":"string"},"type":"array","title":"Agents Used","default":[]},"tools_used":{"items":{"type":"string"},"type":"array","title":"Tools Used","default":[]},"complexity":{"type":"string","enum":["starter","intermediate","advanced"],"title":"Complexity","default":"starter"},"version":{"type":"string","title":"Version","default":"v1.0.0"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormStep"},"type":"array","maxItems":28},{"type":"null"}],"title":"Steps"},"input_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormInputField"},"type":"array","maxItems":30},{"type":"null"}],"title":"Input Fields"}},"type":"object","required":["name"],"title":"WorkflowCreateRequest","description":"`steps` / `input_fields` (the Workflows form) build the AI Studio graph: a straight\nline of Agent and Prompt steps. Without them, `stages` + `agents_used` give a line of agents."},"WorkflowDefinition":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/WorkflowBlock"},"type":"array","title":"Blocks"},"connections":{"items":{"$ref":"#/components/schemas/BlockConnection"},"type":"array","title":"Connections"},"entry_block":{"type":"string","title":"Entry Block"}},"type":"object","required":["blocks","connections","entry_block"],"title":"WorkflowDefinition","description":"The DAG itself — blocks + connections."},"WorkflowItem":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"intent":{"type":"string","title":"Intent"},"sector_hint":{"type":"string","title":"Sector Hint"},"tenant_id":{"type":"string","title":"Tenant Id"},"status":{"type":"string","enum":["active","draft","deprecated"],"title":"Status","default":"active"},"invocations_24h":{"type":"integer","title":"Invocations 24H","default":0},"last_run":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run"},"created_from_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created From Template"},"source":{"type":"string","enum":["synthetic","live"],"title":"Source","default":"synthetic"},"trigger":{"type":"string","title":"Trigger","default":"API"},"agent_sequence":{"items":{"type":"string"},"type":"array","title":"Agent Sequence"},"stages":{"items":{"$ref":"#/components/schemas/WorkflowStage"},"type":"array","title":"Stages"}},"type":"object","required":["workflow_id","name","description","intent","sector_hint","tenant_id"],"title":"WorkflowItem"},"WorkflowOption":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"name":{"type":"string","title":"Name"},"source":{"type":"string","enum":["starter","custom"],"title":"Source"}},"type":"object","required":["workflow_id","name","source"],"title":"WorkflowOption"},"WorkflowRef":{"properties":{"workflow_id":{"type":"string","maxLength":200,"minLength":1,"title":"Workflow Id"},"source":{"type":"string","enum":["starter","custom"],"title":"Source"},"tenant_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["workflow_id","source"],"title":"WorkflowRef"},"WorkflowStage":{"properties":{"label":{"type":"string","title":"Label"},"type":{"type":"string","enum":["agent","tool","decision"],"title":"Type"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["label","type"],"title":"WorkflowStage","description":"One stage of a workflow's execution path. Either runs an agent, calls\na tool, or makes a routing decision. Order matches list position."},"WorkflowSummary":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"intent":{"type":"string","title":"Intent"},"current_version":{"type":"string","title":"Current Version"},"approved":{"type":"boolean","title":"Approved"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["workflow_id","name","intent","current_version","approved","updated_at"],"title":"WorkflowSummary","description":"Lightweight summary for list views."},"WorkflowTestPlan":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"tenant_id":{"type":"string","title":"Tenant Id"},"sector":{"type":"string","title":"Sector"},"mode":{"type":"string","enum":["orchestrator","stages"],"title":"Mode"},"mode_reason":{"type":"string","title":"Mode Reason"},"orchestrator_available":{"type":"boolean","title":"Orchestrator Available"},"orchestrator_reason":{"type":"string","title":"Orchestrator Reason"},"stages":{"items":{"$ref":"#/components/schemas/PlanStage"},"type":"array","title":"Stages"},"stages_source":{"type":"string","enum":["defined","agent_sequence","derived"],"title":"Stages Source"},"suggested_event":{"type":"string","title":"Suggested Event"},"examples":{"items":{"$ref":"#/components/schemas/ExampleEvent"},"type":"array","title":"Examples"}},"type":"object","required":["workflow_id","workflow_name","tenant_id","sector","mode","mode_reason","orchestrator_available","orchestrator_reason","stages","stages_source","suggested_event"],"title":"WorkflowTestPlan"},"WorkflowUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"intent_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Description"},"example_events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Example Events"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"status":{"anyOf":[{"type":"string","enum":["draft","active","archived"]},{"type":"null"}],"title":"Status"},"stages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stages"},"agents_used":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agents Used"},"tools_used":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools Used"},"complexity":{"anyOf":[{"type":"string","enum":["starter","intermediate","advanced"]},{"type":"null"}],"title":"Complexity"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormStep"},"type":"array","maxItems":28},{"type":"null"}],"title":"Steps"},"input_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormInputField"},"type":"array"},{"type":"null"}],"title":"Input Fields"},"publish":{"type":"boolean","title":"Publish","default":true}},"type":"object","title":"WorkflowUpdateRequest"},"WorkflowVersion":{"properties":{"version":{"type":"string","title":"Version"},"definition":{"$ref":"#/components/schemas/WorkflowDefinition"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"type":"string","title":"Created By"},"approved":{"type":"boolean","title":"Approved","default":false},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"}},"type":"object","required":["version","definition","created_at","created_by"],"title":"WorkflowVersion","description":"A versioned snapshot of a workflow."},"XaiaCall":{"properties":{"id":{"type":"string","maxLength":128,"minLength":1,"title":"Id"},"transcript":{"items":{},"type":"array","title":"Transcript"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"client_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Number"},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"session_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Result"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"recording_human_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Human Url"},"recording_agent_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Agent Url"}},"type":"object","required":["id"],"title":"XaiaCall"},"XaiaCallDetail":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"phone_number":{"type":"string","title":"Phone Number"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"current_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Status"},"session_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Result"},"transcript":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Transcript"}},"type":"object","required":["thread_id","phone_number","status"],"title":"XaiaCallDetail"},"XaiaCallEvent":{"properties":{"event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"},"call":{"$ref":"#/components/schemas/XaiaCall"}},"type":"object","required":["call"],"title":"XaiaCallEvent"},"XaiaCallRequest":{"properties":{"phone_number":{"type":"string","minLength":4,"title":"Phone Number"},"consent_given":{"type":"boolean","title":"Consent Given","default":false},"language":{"type":"string","title":"Language","default":"en"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"}},"type":"object","required":["phone_number"],"title":"XaiaCallRequest"},"XaiaCallResponse":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"provider":{"type":"string","title":"Provider","default":"xaia"},"correlation_id":{"type":"string","title":"Correlation Id"},"status":{"type":"string","title":"Status"},"dry_run":{"type":"boolean","title":"Dry Run"}},"type":"object","required":["thread_id","correlation_id","status","dry_run"],"title":"XaiaCallResponse"},"XaiaVoiceStatus":{"properties":{"provider":{"type":"string","title":"Provider"},"enabled":{"type":"boolean","title":"Enabled"},"configured":{"type":"boolean","title":"Configured"},"dry_run":{"type":"boolean","title":"Dry Run"}},"type":"object","required":["provider","enabled","configured","dry_run"],"title":"XaiaVoiceStatus"},"app__routes__asset_versions__VersionCreate":{"properties":{"spec":{"additionalProperties":true,"type":"object","title":"Spec"},"change_note":{"type":"string","maxLength":500,"title":"Change Note","default":""},"base_version":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Base Version"},"publish":{"type":"boolean","title":"Publish","default":false}},"type":"object","required":["spec"],"title":"VersionCreate"},"app__routes__demo_ceo__RunPipelineRequest":{"properties":{"sector":{"type":"string","title":"Sector","default":"ceo"},"summary":{"type":"string","title":"Summary","default":""},"payload":{"additionalProperties":true,"type":"object","title":"Payload","default":{}}},"type":"object","title":"RunPipelineRequest"},"app__routes__demo_dp_world__AgentRunRequest":{"properties":{"agent":{"type":"string","title":"Agent"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["agent"],"title":"AgentRunRequest"},"app__routes__demo_dp_world__ChatRequest":{"properties":{"query":{"type":"string","maxLength":4000,"minLength":1,"title":"Query"},"language":{"type":"string","title":"Language","default":"en"},"persona":{"type":"string","title":"Persona","default":"sponsor"}},"type":"object","required":["query"],"title":"ChatRequest"},"app__routes__demo_moj__ChatRequest":{"properties":{"query":{"type":"string","maxLength":4000,"minLength":1,"title":"Query"},"language":{"type":"string","title":"Language","default":"ar"},"context":{"anyOf":[{},{"type":"null"}],"title":"Context"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference","default":""},"session":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Session"}},"type":"object","required":["query"],"title":"ChatRequest"},"app__routes__demo_network_diagnosis__ChatRequest":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"session_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Session Id"},"customer_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Customer Id"},"lang":{"type":"string","enum":["en","hu"],"title":"Lang","default":"en"}},"type":"object","required":["message"],"title":"ChatRequest","description":"Chat interface into the 6-agent network diagnosis pipeline."},"app__routes__demo_smb__ChatRequest":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Lex session id. Omit on first turn — server allocates one."},"text":{"type":"string","maxLength":2000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"ChatRequest"},"app__routes__demo_smb_kpi__RunPipelineRequest":{"properties":{"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"}},"additionalProperties":true,"type":"object","title":"RunPipelineRequest","description":"Optional campaign override — same shape SMB `CampaignConfig` expects.\n\nSend {} or nothing to fall back to `cloud_migration` default campaign."},"app__routes__platform_users__InviteRequest":{"properties":{"email":{"type":"string","maxLength":120,"minLength":5,"title":"Email"},"name":{"type":"string","maxLength":80,"minLength":2,"title":"Name"},"role":{"type":"string","title":"Role","default":"Observer"},"tenant_id":{"type":"string","title":"Tenant Id","default":"platform"},"org_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Unit"}},"type":"object","required":["email","name"],"title":"InviteRequest"},"app__routes__prompts__VersionCreate":{"properties":{"body":{"type":"string","maxLength":32000,"minLength":1,"title":"Body"},"change_note":{"type":"string","maxLength":500,"title":"Change Note","default":""},"based_on":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Based On"},"publish":{"type":"boolean","title":"Publish","default":false}},"type":"object","required":["body"],"title":"VersionCreate"},"app__routes__studio__AgentRunRequest":{"properties":{"version":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Version","default":"published"},"draft":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Draft"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"vars":{"additionalProperties":true,"type":"object","title":"Vars"}},"type":"object","title":"AgentRunRequest"},"app__routes__tenant_users__InviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","enum":["tenant-admin","tenant-user","tenant-viewer"],"title":"Role","default":"tenant-user"}},"type":"object","required":["email"],"title":"InviteRequest"}}}}