{"openapi":"3.1.0","info":{"title":"raisy","description":"Kernel/Bot System for raisy","version":"0.1.0"},"paths":{"/api/v1/bot/invoke":{"post":{"tags":["bot"],"summary":"Invoke Bot","description":"T0106: Invoke bot with kernel assembly.\n\nLoads bot → resolves kernel_keys_ref to kernels → assembles prompt →\ncalls LLM → logs to bot_call_logs → updates performance stats.\n\nAuth: Firebase JWT (users) OR service token (n8n/internal).\nReturns exact kernelIds used for reproducibility.","operationId":"invoke_bot_api_v1_bot_invoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/derive-signature":{"post":{"tags":["bot"],"summary":"Derive Signature","description":"T0900: Derive a bot signature from a request — the system picks the BD\ncoordinates itself (classification string + ordered slots BD999→…→BD0).\n\nThe caller does NOT specify which BDs. This endpoint returns the derived\nsignature; each (BD,BDsub) slot then feeds the BD kernel minter\n(POST /kernel/mint-for-bd) to materialise the bot.","operationId":"derive_signature_api_v1_bot_derive_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/intent_2_signature":{"post":{"tags":["bot"],"summary":"Derive Signature","description":"T0900: Derive a bot signature from a request — the system picks the BD\ncoordinates itself (classification string + ordered slots BD999→…→BD0).\n\nThe caller does NOT specify which BDs. This endpoint returns the derived\nsignature; each (BD,BDsub) slot then feeds the BD kernel minter\n(POST /kernel/mint-for-bd) to materialise the bot.","operationId":"derive_signature_api_v1_bot_intent_2_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/create_intent_2_bot_auto":{"post":{"tags":["bot"],"summary":"Construct Bot","description":"T0904: The CONDUCTOR. One request → a complete bot, built by the system.\nPROJECT-053: Refactored onto ConstructEngine (generic classify→fill→connect).","operationId":"construct_bot_api_v1_bot_create_intent_2_bot_auto_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConstructBotRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/create_kernel_keys_ref_2_bot":{"post":{"tags":["bot"],"summary":"Create Bot","description":"T0109: Create new bot assembly.\n\nValidates all kernel_keys_ref exist before registering.\nAdmin-only operation.","operationId":"create_bot_api_v1_bot_create_kernel_keys_ref_2_bot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/registry":{"get":{"tags":["bot"],"summary":"Get Bot Registry","description":"T0109: List all active bots in registry with server-side pagination.\n\nReturns latest active version per botKey with sorting and search support.\nUse pageSize=500 to load full list for selector dropdowns.","operationId":"get_bot_registry_api_v1_bot_registry_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Items per page (use 500 for full list in selectors)","default":20,"title":"Pagesize"},"description":"Items per page (use 500 for full list in selectors)"},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","description":"Sort field: botNumber, botName, createdAt","default":"botNumber","title":"Sortby"},"description":"Sort field: botNumber, botName, createdAt"},{"name":"sortOrder","in":"query","required":false,"schema":{"type":"string","description":"Sort order: asc or desc","default":"asc","title":"Sortorder"},"description":"Sort order: asc or desc"},{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Filter by botName or botKey (case-insensitive contains)","default":"","title":"Search"},"description":"Filter by botName or botKey (case-insensitive contains)"},{"name":"mode","in":"query","required":false,"schema":{"type":"string","description":"Filter by mode: fast or quality","default":"","title":"Mode"},"description":"Filter by mode: fast or quality"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/search":{"post":{"tags":["bot"],"summary":"Search Bots","description":"Full-text search across bot name, key, and classification.\n\nBody: {query, page, pageSize, sortBy, sortOrder}\nReturns same pagination shape as GET /registry.","operationId":"search_bots_api_v1_bot_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchBotsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/registry/lookup":{"get":{"tags":["bot"],"summary":"Lookup Bot By Classification","description":"T0113: Lookup bot by classification code.\n\nReturns bot details if a bot exists for that BD-code classification.\nReturns available bots if not found - gives building blocks for self-assembly.\n\nExample: GET /api/v1/bot/registry/lookup?classification=BD10.X\nResponse: {exists: true/false, botKey: \"...\", botId: \"...\", availableBots: [...]}","operationId":"lookup_bot_by_classification_api_v1_bot_registry_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"classification","in":"query","required":true,"schema":{"type":"string","title":"Classification"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/update_kernels":{"post":{"tags":["bot"],"summary":"Update Bot Kernels","description":"T0109: Hot-swap kernel versions (A/B testing).\n\nUpdates kernel_keys_ref for a bot without changing bot identity.\nEnables A/B testing without code deployment.","operationId":"update_bot_kernels_api_v1_bot_update_kernels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotUpdateKernelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/{botId}/retry-skills":{"post":{"tags":["bot"],"summary":"Retry Bot Pending Skills","description":"T0120: manually re-attempt resolution of a bot's pending BD155 skill slot(s).\n\nSame healer the construct engine's reuse shortcut runs automatically\n(_connect_bot) — exposed here so an admin can trigger it on demand once a\ndev_request has been fulfilled, without waiting for someone to re-construct\nwith the same intent. No-op (200, unchanged) if the bot has nothing pending.","operationId":"retry_bot_pending_skills_api_v1_bot__botId__retry_skills_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"botId","in":"path","required":true,"schema":{"type":"string","title":"Botid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/{botId}/skill-status":{"get":{"tags":["bot"],"summary":"Get Bot Skill Status","description":"Lifecycle stage of every unresolved BD155 skill slot on this bot.\n\n`pendingSkills` (returned by /registry) only says a slot is empty. The stage the\nmissing skill is actually at lives in dev_requests, which no read path had ever\njoined — so the Testbench could only say \"in development\" whether the request was\nuntriaged, in progress, finished, or refused.\n\nRead-only, same auth as /registry (which already exposes pendingSkills). Returns an\nempty slot list for a bot with nothing pending.","operationId":"get_bot_skill_status_api_v1_bot__botId__skill_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"botId","in":"path","required":true,"schema":{"type":"string","title":"Botid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/{botId}/attach-skill":{"post":{"tags":["bot"],"summary":"Attach Bot Skill","description":"Bind one specific BD155 kernel into a bot's assembly and clear that pending slot.\n\nThe manual counterpart to /retry-skills. Retry re-runs the acquisition *search*\n(keyword → embedding → remote), which can keep missing a kernel that plainly exists\nunder the right category — scoring below threshold is not the same as absent. Once\na skill is finished, an admin binds it by name here instead.\n\nBypassing search does not bypass classification: a kernel filed under a different\nBD155.<sub> than the slot asked for is refused (T0215) — UNLESS `reclassify` is set,\nwhich binds it anyway and rewrites the bot's classification to match, logged with the\nacting user. That flag exists for the case where the classifier picked the wrong\ncategory and the right skill is therefore permanently unreachable: a deliberate,\nattributed correction, not the silent re-filing T0215 was written to prevent.","operationId":"attach_bot_skill_api_v1_bot__botId__attach_skill_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"botId","in":"path","required":true,"schema":{"type":"string","title":"Botid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachSkillRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/performance/{bot_id}":{"get":{"tags":["bot"],"summary":"Get Bot Performance","description":"T0110: Get bot performance stats.\n\nReturns totalCalls, approvals, rejections, confidenceScore, avgLatencyMs.","operationId":"get_bot_performance_api_v1_bot_performance__bot_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bot_id","in":"path","required":true,"schema":{"type":"string","title":"Bot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/{bot_id}/approval-settings":{"get":{"tags":["bot"],"summary":"Get Bot Approval Settings","description":"Read the bot-level approval override (mode=None → inherits from entity/system).","operationId":"get_bot_approval_settings_api_v1_bot__bot_id__approval_settings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bot_id","in":"path","required":true,"schema":{"type":"string","title":"Bot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["bot"],"summary":"Set Bot Approval Settings","description":"Upsert the bot-level approval override (writes approval_settings.botId).","operationId":"set_bot_approval_settings_api_v1_bot__bot_id__approval_settings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bot_id","in":"path","required":true,"schema":{"type":"string","title":"Bot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotApprovalSettingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/{botKey}/edit":{"patch":{"tags":["bot"],"summary":"Edit Bot","description":"T0111: Edit a bot by creating a new version.\n\nUpdates kernel_keys_ref order, botName, mode, or classification.\nCreates new version: max(versionNumber)+1 for this botKey.\nPrevious version unchanged (immutable audit trail).\n\nAdmin only. Follows versioning pattern: (botKey, versionNumber) UNIQUE.","operationId":"edit_bot_api_v1_bot__botKey__edit_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"botKey","in":"path","required":true,"schema":{"type":"string","title":"Botkey"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/{botKey}/archive":{"post":{"tags":["bot"],"summary":"Archive Bot","description":"T0111: Archive a bot by creating an archived version.\n\nCreates new version with status='archived' and archivedAt=now().\nDoes NOT delete kernels (immutable assets).\nReplaces hard DELETE. Preserves audit trail.\n\nAdmin only. Only one active version per botKey at any time.","operationId":"archive_bot_api_v1_bot__botKey__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"botKey","in":"path","required":true,"schema":{"type":"string","title":"Botkey"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/{botKey}/versions":{"get":{"tags":["bot"],"summary":"Get Bot Versions","description":"T0111: Get all versions of a bot.\n\nReturns all versions for a botKey, sorted by versionNumber (newest first).\nIncludes active and archived versions for full audit trail.","operationId":"get_bot_versions_api_v1_bot__botKey__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"botKey","in":"path","required":true,"schema":{"type":"string","title":"Botkey"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call-history":{"post":{"tags":["bot"],"summary":"Get Call History","description":"Fetch bot call logs from bot_call_logs with filtering, pagination, and stats.\n\nSupports:\n  - botId / botKey filter\n  - verdict filter (approved | rejected | unevaluated)\n  - entityId filter (input.variables.entity_id)\n  - bd filter (BD classification in kernel_keys_ref)\n  - date range filter\n  - pagination\n  - aggregate statistics","operationId":"get_call_history_api_v1_bot_call_history_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallHistoryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/draft_2_view":{"post":{"tags":["bot"],"summary":"Record Draft View","description":"WHEN A PREPARED DRAFT WAS FIRST VIEWED, AND BY WHOM — first view wins (P144 D-144-019).\n\nWHY THIS IS ITS OWN ACT AND NOT A SIDE EFFECT OF A READ. The drafts folder lists its rows from\n`/bot/call-history`, and that same read feeds the Decide queue and the portfolio's count — so\nstamping a view inside it would record \"someone listed this row\" as \"the owner opened it\", and\nthe 50% quiet state would fire for a number nobody had looked at. The surface that SHOWS a draft\ncalls this when one is opened; nothing else does.\n\nLEVEL `viewer`, NOT `editor`: viewing is not deciding, and an act that changes no decision must\nnot be the way past the verdict gate on this same surface.\n\nFIRST VIEW WINS, BY CONSTRUCTION: `draft_views.callid` is the primary key, this inserts once and\nnever updates, so a later reader cannot move the stamp. A returning caller is told\n`alreadyOpened: true` with the FIRST reader's facts, rather than rewriting history quietly.\n\nA MISSING TABLE IS AN HONEST REFUSAL, NOT A 500 (PROD's apply of 000032 is parked with\n000016/000023/000024 — D-146-010): until it is applied the view cannot be recorded, and this says\nso. Nothing dims on such an environment, which is the correct degradation — a dim needs a fact.","operationId":"record_draft_view_api_v1_bot_draft_2_view_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftViewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/evaluate-call":{"post":{"tags":["bot"],"summary":"Evaluate Call","description":"Submit an evaluation (approve/reject) for a bot call.\nUpdates the evaluation JSON column in bot_call_logs.","operationId":"evaluate_call_api_v1_bot_evaluate_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallEvaluationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bot/call_2_verdict":{"post":{"tags":["bot"],"summary":"Evaluate Call","description":"Submit an evaluation (approve/reject) for a bot call.\nUpdates the evaluation JSON column in bot_call_logs.","operationId":"evaluate_call_api_v1_bot_call_2_verdict_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallEvaluationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotInvokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/config/indexes":{"get":{"tags":["config"],"summary":"Api Get Indexes","description":"Return every dimension index kernel (BD200.1) found in the DB.\n\nThe response keys are the actual `kernelKey` values stored in the kernels\ntable (e.g. `bot_index_dimensions`, `entity_index_dimensions`, ...).","operationId":"api_get_indexes_api_v1_config_indexes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexesResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/config/indexes/{index_name}":{"get":{"tags":["config"],"summary":"Api Get Index","description":"Return a single dimension index by kernelKey name.","operationId":"api_get_index_api_v1_config_indexes__index_name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"index_name","in":"path","required":true,"schema":{"type":"string","title":"Index Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/attention":{"get":{"tags":["entity"],"summary":"Get Entity Attention","description":"Read the CALLER'S OWN attention preference for this entity (defaults to everything).","operationId":"get_entity_attention_api_v1_entity__entity_id__attention_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["entity"],"summary":"Set Entity Attention","description":"Set the CALLER'S OWN attention preference (stored in entities.preferences[uid].attention).","operationId":"set_entity_attention_api_v1_entity__entity_id__attention_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityAttentionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/approval-mode":{"get":{"tags":["entity"],"summary":"Get Entity Approval Mode","description":"Read the entity-level approval default (falls back to SEMI_AUTO).","operationId":"get_entity_approval_mode_api_v1_entity__entity_id__approval_mode_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["entity"],"summary":"Set Entity Approval Mode","description":"Set the entity-level approval default (stored in entities.preferences.approval_mode).","operationId":"set_entity_approval_mode_api_v1_entity__entity_id__approval_mode_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityApprovalModeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/create":{"post":{"tags":["entity"],"summary":"Api Create Entity","operationId":"api_create_entity_api_v1_entity_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/list":{"get":{"tags":["entity"],"summary":"Api List Entities","operationId":"api_list_entities_api_v1_entity_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":500,"title":"Limit"}},{"name":"ownership","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Viewer-relative scope, repeatable: `?ownership=own&ownership=unknown`. Values are \"own\", \"external\", \"unknown\". Omit for everything the viewer may read — the pre-existing behaviour, and what `/contacts` and `/companies` still rely on.","title":"Ownership"},"description":"Viewer-relative scope, repeatable: `?ownership=own&ownership=unknown`. Values are \"own\", \"external\", \"unknown\". Omit for everything the viewer may read — the pre-existing behaviour, and what `/contacts` and `/companies` still rely on."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/facets":{"post":{"tags":["entity"],"summary":"Api Entity Facets","description":"The faceted slice — rows **and** counts from ONE call, server-side, over the viewer's whole\nvisible set rather than over a page. Mirrors @P107 D-004's proven shape for the investor funnel.\n\nThe CRM tab (`/crm`) is this endpoint with `ownership=[\"external\"]`; `My Entities` omits it.\nCounts for a field are computed with every filter applied EXCEPT its own, so selecting a value\nnever zeroes the others and the user can always widen again.\n\n`companies` scopes the slice to chosen OWNED companies — the same widenability rule applies to\nthe returned `companies` list, so its numbers are what a click delivers (D-012).","operationId":"api_entity_facets_api_v1_entity_facets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityFacetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/get":{"post":{"tags":["entity"],"summary":"Api Get Entity","operationId":"api_get_entity_api_v1_entity_get_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityGetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/get-by-key":{"post":{"tags":["entity"],"summary":"Api Get Entity By Key","operationId":"api_get_entity_by_key_api_v1_entity_get_by_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityGetByKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/update":{"post":{"tags":["entity"],"summary":"Api Update Entity","operationId":"api_update_entity_api_v1_entity_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/merge-preview":{"post":{"tags":["entity"],"summary":"Api Entity Merge Preview","description":"Diff fresh data against an entity's stored values and stage the disagreements for\nreview. Two sources for the \"fresh\" side (PROJECT-077 T0112/T0115 — centralized so\nevery found-a-possible-duplicate surface reuses one diff/merge pipeline):\n  - request_data.candidate_data provided: diff directly against that dict (e.g. a\n    search-resolver candidate, or a self-match candidate) — no scrape happens.\n  - candidate_data omitted: original behavior — re-scrape entity.extraction_url and\n    diff against that (the \"refresh from source\" flow, backlog #18).\nAuto-fills any currently-empty fields immediately (never a conflict); anything that\ndisagrees with an existing non-empty value is persisted to pending_conflicts for the\nuser to resolve via /entity/merge-apply. Does not touch entity_relationships or\nownership.","operationId":"api_entity_merge_preview_api_v1_entity_merge_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergePreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/merge-apply":{"post":{"tags":["entity"],"summary":"Api Entity Merge Apply","description":"Apply the user's keep_old/take_new/custom choices from a prior /entity/merge-preview,\nclearing resolved fields from pending_conflicts. \"custom\" takes the value from\ncustom_values[field] — the user's own text, typically an edit of the merged draft\n/entity/merge-suggest returned, so a merge needn't discard whatever the losing side\nknew. When merged_entity_id is present\n(PROJECT-077b T0104), this is a full two-entity merge: after the field resolution\nbelow, the losing entity's relationships/permissions/integrations/entity-scoped\nrecords are re-pointed to the surviving entity and the loser is soft-retired —\nnever a physical delete (MR8).","operationId":"api_entity_merge_apply_api_v1_entity_merge_apply_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeApplyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/dismiss-duplicate-flag":{"post":{"tags":["entity"],"summary":"Api Dismiss Duplicate Flag","description":"PROJECT-077b T0106/T0110 — clear the async possible-duplicate flag on an entity\nwithout merging anything, for the dashboard banner's dismiss action. The user\nreviewed the suggested match and decided it isn't a duplicate (or just wants to\ndecide later); nothing about the entity itself changes.","operationId":"api_dismiss_duplicate_flag_api_v1_entity_dismiss_duplicate_flag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissDuplicateFlagRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/merge-suggest":{"post":{"tags":["entity"],"summary":"Api Entity Merge Suggest","description":"PROJECT-077 — AI recommendation for which value to keep per conflicting field, shown\nin the merge-review popup alongside the existing Keep current/Use new choice. Callers\nfetch this separately from /entity/merge-preview (in parallel, right after that call's\nconflicts come back) — a slow or failed suggestion call must never delay the popup\nitself from opening, so this is deliberately its own endpoint rather than folded into\nmerge-preview's response.","operationId":"api_entity_merge_suggest_api_v1_entity_merge_suggest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeSuggestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/delete":{"post":{"tags":["entity"],"summary":"Api Delete Entity","operationId":"api_delete_entity_api_v1_entity_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/ancestors":{"post":{"tags":["entity"],"summary":"Api Get Ancestors","operationId":"api_get_ancestors_api_v1_entity_ancestors_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityHierarchyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/root":{"post":{"tags":["entity"],"summary":"Api Get Root","operationId":"api_get_root_api_v1_entity_root_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityHierarchyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/children":{"post":{"tags":["entity"],"summary":"Api Get Children","operationId":"api_get_children_api_v1_entity_children_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityHierarchyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/descendants":{"post":{"tags":["entity"],"summary":"Api Get Descendants","operationId":"api_get_descendants_api_v1_entity_descendants_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityHierarchyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/level":{"post":{"tags":["entity"],"summary":"Api Get Level","operationId":"api_get_level_api_v1_entity_level_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityHierarchyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/scope-chain":{"post":{"tags":["entity"],"summary":"Api Get Scope Chain","operationId":"api_get_scope_chain_api_v1_entity_scope_chain_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityHierarchyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/relationship/add":{"post":{"tags":["entity"],"summary":"Api Add Relationship","operationId":"api_add_relationship_api_v1_entity_relationship_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipAddRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/relationship/list":{"post":{"tags":["entity"],"summary":"Api List Relationships","operationId":"api_list_relationships_api_v1_entity_relationship_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipListRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/relationship/affiliates":{"post":{"tags":["entity"],"summary":"Api Get Affiliates","description":"Return everyone affiliated WITH an organisation.\n\nExample: related_entity_id = Playano\n→ returns Simon/CMO, Alice/CTO, Bob/Investor, SupplierX, ...","operationId":"api_get_affiliates_api_v1_entity_relationship_affiliates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliatesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/relationship/update":{"post":{"tags":["entity"],"summary":"Api Update Relationship","operationId":"api_update_relationship_api_v1_entity_relationship_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/relationship/remove":{"post":{"tags":["entity"],"summary":"Api Remove Relationship","operationId":"api_remove_relationship_api_v1_entity_relationship_remove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipRemoveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/search":{"post":{"tags":["entity"],"summary":"Api Search Entities","description":"Search entities by name and/or affiliation.\n\nThe Simon problem:\n  { \"name\": \"Simon\", \"affiliation_entity_id\": \"<playano_id>\" }\n  → returns only Simon who has an active relationship with Playano\n\nCombine freely:\n  name only           → everyone whose name contains the string\n  affiliation only    → everyone affiliated with that org\n  name + affiliation  → exact identification across same-name entities\n  + relationship_type → narrow to CMOs only, suppliers only, etc.","operationId":"api_search_entities_api_v1_entity_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/claim-identity":{"post":{"tags":["entity"],"summary":"Api Claim Identity","description":"Link an existing person entity to the current user's account.\n\nCalled when a user recognises themselves in a company's team list during onboarding.\nSets identity_user_id on the person entity and optionally creates the person→company\nrelationship. Idempotent: safe to call if identity_user_id is already this user.","operationId":"api_claim_identity_api_v1_entity_claim_identity_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimIdentityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/user_2_claim":{"post":{"tags":["entity"],"summary":"Api Claim Identity","description":"Link an existing person entity to the current user's account.\n\nCalled when a user recognises themselves in a company's team list during onboarding.\nSets identity_user_id on the person entity and optionally creates the person→company\nrelationship. Idempotent: safe to call if identity_user_id is already this user.","operationId":"api_claim_identity_api_v1_entity_user_2_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimIdentityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/sem_search":{"post":{"tags":["entity"],"summary":"Api Sem Search Entities","description":"Find similar entities using pgvector cosine similarity (BE+FE-006).\nFE calls this after URL/name entry to show 'is this your entity?' interstitial.","operationId":"api_sem_search_entities_api_v1_entity_sem_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/search-resolve":{"post":{"tags":["entity"],"summary":"Api Search Resolve Entity","description":"Resolve a manual onboarding description (no URL) to candidate person/company\nmatches for the user to pick from, asking a clarifying question when ambiguous.","operationId":"api_search_resolve_entity_api_v1_entity_search_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/query_2_entity":{"post":{"tags":["entity"],"summary":"Api Search Resolve Entity","description":"Resolve a manual onboarding description (no URL) to candidate person/company\nmatches for the user to pick from, asking a clarifying question when ambiguous.","operationId":"api_search_resolve_entity_api_v1_entity_query_2_entity_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/exact_match":{"post":{"tags":["entity"],"summary":"Api Exact Match Entities","description":"Exact-match lookup for entities by ED + EDsub.","operationId":"api_exact_match_entities_api_v1_entity_exact_match_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityExactMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/batch-embed":{"post":{"tags":["entity"],"summary":"Api Batch Embed Entities","description":"Batch generate embeddings for all unembedded entities.","operationId":"api_batch_embed_entities_api_v1_entity_batch_embed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityBatchEmbedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/auto-tag":{"post":{"tags":["entity"],"summary":"Api Auto Tag Entity","description":"Auto-generate tags for an entity based on its content via LLM.","operationId":"api_auto_tag_entity_api_v1_entity_auto_tag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityAutoTagRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/permission/grant":{"post":{"tags":["entity"],"summary":"Api Grant Permission","description":"Grant (or upgrade) edit access on an entity to another user.\nCaller must be an owner of the entity.","operationId":"api_grant_permission_api_v1_entity_permission_grant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGrantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/permission/revoke":{"post":{"tags":["entity"],"summary":"Api Revoke Permission","description":"Revoke a user's edit access on an entity.\nCaller must be an owner. Cannot revoke the last remaining owner.","operationId":"api_revoke_permission_api_v1_entity_permission_revoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionRevokeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/permission/list":{"get":{"tags":["entity"],"summary":"Api List Permissions","description":"List all active permissions on an entity.\nCaller must have at least viewer-level permission (or be the creator).","operationId":"api_list_permissions_api_v1_entity_permission_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/extraction/confirm":{"post":{"tags":["entity"],"summary":"Api Confirm Extraction Candidates","description":"Create the discovery candidates the user kept checked in the review step.\n\nentity_id is the node that was scraped (websocket_extract_node's path param) — children\nare related TO it, never to the caller's own account, matching how discovery already\nworked pre-review (see _persist_extracted_children).","operationId":"api_confirm_extraction_candidates_api_v1_entity__entity_id__extraction_confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/bulk-confirm":{"post":{"tags":["entity"],"summary":"Api Bulk Confirm","operationId":"api_bulk_confirm_api_v1_entity_bulk_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/network":{"get":{"tags":["entity"],"summary":"Api Get Network","operationId":"api_get_network_api_v1_entity_network_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"root_entity_id","in":"query","required":true,"schema":{"type":"string","title":"Root Entity Id"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Depth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/follow":{"post":{"tags":["entity"],"summary":"Api Follow","operationId":"api_follow_api_v1_entity_follow_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["entity"],"summary":"Api Unfollow","operationId":"api_unfollow_api_v1_entity_follow_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/connect-request":{"post":{"tags":["entity"],"summary":"Api Connect Request","operationId":"api_connect_request_api_v1_entity_connect_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["entity"],"summary":"Api Connect Action","operationId":"api_connect_action_api_v1_entity_connect_request_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectActionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/{entity_id}/preview-network":{"get":{"tags":["entity"],"summary":"Api Preview Network","description":"2.7 — Return a { nodes, edges } preview built from already-extracted data.\nNo new LLM call. Used by StepEntityCanvas on page refresh to restore the canvas.\n\nPriority: DB children (created during streaming) → raisy_78_raw_output fallback.","operationId":"api_preview_network_api_v1_entity__entity_id__preview_network_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/connection-requests/list":{"post":{"tags":["entity"],"summary":"Api Connection Requests List","description":"Return all pending incoming connect requests where entity_id is the recipient.","operationId":"api_connection_requests_list_api_v1_entity_connection_requests_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionRequestsListRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/derive-signature":{"post":{"tags":["entity"],"summary":"Derive Entity Signature","description":"PROJECT-053: Derive an ED signature from an entity description.\nCalls the ED classifier and returns parsed dimension slots.","operationId":"derive_entity_signature_api_v1_entity_derive_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/profile_2_signature":{"post":{"tags":["entity"],"summary":"Derive Entity Signature","description":"PROJECT-053: Derive an ED signature from an entity description.\nCalls the ED classifier and returns parsed dimension slots.","operationId":"derive_entity_signature_api_v1_entity_profile_2_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityDeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/construct":{"post":{"tags":["entity"],"summary":"Construct Entity","description":"PROJECT-053: Construct / classify an entity from a description.\nclassify → fill → connect. Updates existing entity or returns classification for new one.","operationId":"construct_entity_api_v1_entity_construct_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityConstructRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/signature_2_entity":{"post":{"tags":["entity"],"summary":"Construct Entity","description":"PROJECT-053: Construct / classify an entity from a description.\nclassify → fill → connect. Updates existing entity or returns classification for new one.","operationId":"construct_entity_api_v1_entity_signature_2_entity_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityConstructRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entity/{entity_id}/auto-run-capability":{"post":{"tags":["entity"],"summary":"Mint Auto Run Capability","description":"Mint the ONE credential that may ask for a whole extraction run (`drive=auto`).\n\nTHE ORDER OF THE THREE CHECKS IS `T0401(bis)`'s LAW AND IT IS NOT COSMETIC: **existence first**,\nthen the PRINCIPAL, then the permission. Existence first is what stops a refusal from becoming a\ndirectory (a ghost id must not answer differently for two callers), and the principal is settled\nbefore the permission because the service refusal is a fact about the CREDENTIAL rather than about\nthis entity.\n\nTAKES NO PARAMETERS, ON PURPOSE. A caller that could ask for a longer TTL, or for extra scopes,\nwould be widening its own credential — so the only thing a caller may choose is WHICH entity, and\nthe entity is in the path because it is the one thing that must be verified against a database.\n\nTHE CAPABILITY IT MINTS CARRIES `read` **AND** `drive`, and `read` is not a widening: the caller\nhas already proved she may read the entity (that is the check above), and an auto run reads the\nentity it is extracting. `mint_session_capability` defaults to `read` ALONE precisely so that\n`drive` is never implied — it is asked for here, once, in the one place that can justify it.","operationId":"mint_auto_run_capability_api_v1_entity__entity_id__auto_run_capability_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/list":{"post":{"tags":["kernel"],"summary":"List Kernels","description":"List all kernels (latest version per kernelKey) with server-side pagination.\n\nBody: {summary, page, pageSize, sortBy, sortOrder, search, botDimension, status}\nUse pageSize=1000 to load full list for selector dropdowns.","operationId":"list_kernels_api_v1_kernel_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListKernelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/search":{"post":{"tags":["kernel"],"summary":"Search Kernels","description":"Full-text search across kernel name, key, description, and tags.\n\nBody: {query, page, pageSize, sortBy, sortOrder, status, botDimension}\nReturns same pagination shape as POST /list.","operationId":"search_kernels_api_v1_kernel_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchKernelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/kd-schema":{"get":{"tags":["kernel"],"summary":"Get Kd Schema","description":"Manual-flow helper: return the KD (kernel-dimension) question set for a BD slot.\n\nThe FE renders these questions so the user can classify the kernel within its\nBD slot. ``hasKdFamily=false`` means this BD has no KD refinement — the form\nshows only BD/BDsub. Source of truth: kernel_index_dimensions (DB, file fallback).","operationId":"get_kd_schema_api_v1_kernel_kd_schema_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"botDimension","in":"query","required":true,"schema":{"type":"integer","description":"BD number to fetch the KD question set for, e.g. 155","title":"Botdimension"},"description":"BD number to fetch the KD question set for, e.g. 155"},{"name":"botDimensionSub","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"BDsub, e.g. 9 — narrows extension dims to the ones this specific BDsub can answer (kernel_index_dimensions v2 'extension_of'). Omit to get every dim for the BD family.","title":"Botdimensionsub"},"description":"BDsub, e.g. 9 — narrows extension dims to the ones this specific BDsub can answer (kernel_index_dimensions v2 'extension_of'). Omit to get every dim for the BD family."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/derive-signature":{"post":{"tags":["kernel"],"summary":"Derive Kernel Signature","description":"Automatic flow: derive a kernel's signature (KD classification within its BD slot).\n\nAn LLM picks the KD values — the choices are defined by kernel_index_dimensions —\nand the result is validated/assembled through the same path as the manual flow.\nThis endpoint is a *decider*: it returns the derived signature for review/preview\nand does NOT persist. Save it by calling POST /kernel/save with the returned\n`answers` as `kernelDimensionAnswers`.","operationId":"derive_kernel_signature_api_v1_kernel_derive_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelDeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/intent_2_signature":{"post":{"tags":["kernel"],"summary":"Derive Kernel Signature","description":"Automatic flow: derive a kernel's signature (KD classification within its BD slot).\n\nAn LLM picks the KD values — the choices are defined by kernel_index_dimensions —\nand the result is validated/assembled through the same path as the manual flow.\nThis endpoint is a *decider*: it returns the derived signature for review/preview\nand does NOT persist. Save it by calling POST /kernel/save with the returned\n`answers` as `kernelDimensionAnswers`.","operationId":"derive_kernel_signature_api_v1_kernel_intent_2_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelDeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/auto-create":{"post":{"tags":["kernel"],"summary":"Auto Create Kernel","description":"CONDUCTOR (kernel automation): content → complete, classified, saved kernel — in one call.\n\nPipeline: derive BD anchor + KD signature (KernelSignatureService) → derive Details\n(name/description/tags) + detect format → de-duplicate input variables → delegate to\nPOST /kernel/save (single persistence path: JSON-schema enforcement for BD0/BD999, KD\nassembly, content-hash/(BD,BDsub) de-dup so no duplicate kernel is created, BD155\ndev-request + skill-index refresh, embedding). The kernel analogue of /bot/create_intent_2_bot_auto.","operationId":"auto_create_kernel_api_v1_kernel_auto_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelAutoCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/intent_2_kernel":{"post":{"tags":["kernel"],"summary":"Auto Create Kernel","description":"CONDUCTOR (kernel automation): content → complete, classified, saved kernel — in one call.\n\nPipeline: derive BD anchor + KD signature (KernelSignatureService) → derive Details\n(name/description/tags) + detect format → de-duplicate input variables → delegate to\nPOST /kernel/save (single persistence path: JSON-schema enforcement for BD0/BD999, KD\nassembly, content-hash/(BD,BDsub) de-dup so no duplicate kernel is created, BD155\ndev-request + skill-index refresh, embedding). The kernel analogue of /bot/create_intent_2_bot_auto.","operationId":"auto_create_kernel_api_v1_kernel_intent_2_kernel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelAutoCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/save":{"post":{"tags":["kernel"],"summary":"Save Kernel","description":"T0108: Create or version a kernel.\n\nIf kernelKey doesn't exist, creates v1.\nIf kernelKey exists, creates new version (versionNumber incremented).\nImmutable: no UPDATE on existing versions.","operationId":"save_kernel_api_v1_kernel_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelSaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/mint-for-bd":{"post":{"tags":["kernel"],"summary":"Mint Kernel For Bd","description":"Mint one kernel v1 for a (BD, BDsub) coordinate via the concatenation method:\nBD-specific minting kernel (or R999 fallback) + BD descriptor + context →\nauthored kernel → saved.\n\nThis is the admin, per-BD kernel minting capability. Called internally by\nthe bot construction stack on a (BD,BDsub) lookup miss, and available as an API.","operationId":"mint_kernel_for_bd_api_v1_kernel_mint_for_bd_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintKernelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/create-for-bd":{"post":{"tags":["kernel"],"summary":"Mint Kernel For Bd","description":"Mint one kernel v1 for a (BD, BDsub) coordinate via the concatenation method:\nBD-specific minting kernel (or R999 fallback) + BD descriptor + context →\nauthored kernel → saved.\n\nThis is the admin, per-BD kernel minting capability. Called internally by\nthe bot construction stack on a (BD,BDsub) lookup miss, and available as an API.","operationId":"mint_kernel_for_bd_api_v1_kernel_create_for_bd_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintKernelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/bd_2_kernel":{"post":{"tags":["kernel"],"summary":"Mint Kernel For Bd","description":"Mint one kernel v1 for a (BD, BDsub) coordinate via the concatenation method:\nBD-specific minting kernel (or R999 fallback) + BD descriptor + context →\nauthored kernel → saved.\n\nThis is the admin, per-BD kernel minting capability. Called internally by\nthe bot construction stack on a (BD,BDsub) lookup miss, and available as an API.","operationId":"mint_kernel_for_bd_api_v1_kernel_bd_2_kernel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintKernelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/get":{"post":{"tags":["kernel"],"summary":"Get Kernel","description":"T0108: Retrieve kernel by key + optional version.\n\nReturns latest version if version not specified.","operationId":"get_kernel_api_v1_kernel_get_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelGetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/by-key/{kernel_key}":{"get":{"tags":["kernel"],"summary":"Get Kernel By Key","description":"T4: Fetch a single kernel by key (latest active version).\n\nREST-style GET alternative to POST /get — for use by the FE run modal that\nneeds inputVariables for one specific skill without fetching the full listing.\n\nGET /kernel/by-key/raisy_BD155_00001\nGET /kernel/by-key/raisy_BD155_00001?entity_id=ENT001","operationId":"get_kernel_by_key_api_v1_kernel_by_key__kernel_key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernel_key","in":"path","required":true,"schema":{"type":"string","title":"Kernel Key"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/versions/{kernel_key}":{"get":{"tags":["kernel"],"summary":"Get Kernel Versions","description":"T0108: Get all versions of a kernel (for A/B testing).\n\nReturns versions sorted by versionNumber DESC (newest first).","operationId":"get_kernel_versions_api_v1_kernel_versions__kernel_key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernel_key","in":"path","required":true,"schema":{"type":"string","title":"Kernel Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/{kernel_key}/review":{"post":{"tags":["kernel"],"summary":"Review Kernel","description":"Record a review verdict (approve / reject) on a kernel version.\n\nReviewing is a lightweight governance annotation — any authenticated user may review,\nsince rejecting a kernel is not the same as editing its content (mirrors the\nbot-call evaluate rule). Writes to kernel_governance (status + feedback + audit history),\nso the verdict surfaces on the kernel in the testbench assembly.","operationId":"review_kernel_api_v1_kernel__kernel_key__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernel_key","in":"path","required":true,"schema":{"type":"string","title":"Kernel Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/status":{"post":{"tags":["kernel"],"summary":"Update Kernel Status","description":"T0108: Update kernel governance status.\n\nStatus flow: draft → pending_review → approved/rejected → deprecated","operationId":"update_kernel_status_api_v1_kernel_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/performance/{kernel_id}":{"get":{"tags":["kernel"],"summary":"Get Kernel Performance","description":"T0110: Get kernel performance stats.\n\nReturns totalCalls, approvals, rejections, confidenceScore.","operationId":"get_kernel_performance_api_v1_kernel_performance__kernel_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernel_id","in":"path","required":true,"schema":{"type":"string","title":"Kernel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/logs":{"get":{"tags":["kernel"],"summary":"Get Kernel Call Logs","description":"T0110: Get kernel call logs (paginated).\n\nReturns bot_call_logs filtered by kernel (if specified).\nShows which kernels were used in which bot calls.","operationId":"get_kernel_call_logs_api_v1_kernel_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernel Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/invoke":{"post":{"tags":["kernel"],"summary":"Invoke Kernel","description":"T0114: Invoke a single kernel directly via raisy_1000.\n\nBypasses bot assembly — runs one kernel with user input.\nUseful for testing individual kernels without creating a bot.\n\nAuth: Firebase JWT (users) OR service token (n8n/internal).","operationId":"invoke_kernel_api_v1_kernel_invoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelInvokeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/registry/lookup":{"get":{"tags":["kernel"],"summary":"Lookup Kernel By Classification","description":"T0113: Lookup kernel by classification code.\n\nReturns kernel details if a kernel exists for that BD-code classification.\nReturns available kernels if not found - gives building blocks for self-assembly.\n\nExample: GET /api/v1/kernel/registry/lookup?classification=BD10.1\nResponse: {exists: true/false, kernelKey: \"...\", kernelId: \"...\", availableKernels: [...]}","operationId":"lookup_kernel_by_classification_api_v1_kernel_registry_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"classification","in":"query","required":true,"schema":{"type":"string","title":"Classification"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/patch":{"post":{"tags":["kernel"],"summary":"Patch Kernel Preview","description":"Generate a delta patch preview for a kernel using raisy_73.\n\nReturns the patched content + diff data WITHOUT saving.\nUser reviews the diff in the FE, then calls /apply-patch to commit.","operationId":"patch_kernel_preview_api_v1_kernel_patch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelPatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/add_references_2_bd0":{"post":{"tags":["kernel"],"summary":"Add References 2 Bd0","description":"Declare one or more kernel references on the bot's BD0 kernel (PROJECT-099B TC04).\n\nTHE POINT OF THIS ROUTE. T0230's SOURCE-QUALITY RULING bars construction from adding a\nproperty found only as a bare bracket in kernel text, because a scan cannot tell a\nspecimen (`[delta_ops]`, `[field_name]`, `[str]`, a markdown link) from a real input —\n~22 of 31 distinct `[lowercase]` tokens in the corpus are not inputs. **A human\nclicking \"Add to BD0\" is the declaration that scan could not make.** This route is\ntherefore legitimate in exactly the place the automatic path is not, and it must stay a\ndeliberate act rather than a default.\n\nThe write lands in the BD0 KERNEL, never on `bots.inputSchema` directly. That ordering\nis what keeps file and contract the same document (T0230): saving a BD0 version already\nnulls the cached `bot.inputSchema` on every bot referencing it (kernel_service\n`[K103_065]`), so the bot re-derives from the kernel it was just told about. Writing\nthe column here as well would recreate the exact \"two answers, and the file is not the\none that counts\" defect IN-13 objected to.","operationId":"add_references_2_bd0_api_v1_kernel_add_references_2_bd0_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddReferencesToBd0Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/remove_references_2_bd0":{"post":{"tags":["kernel"],"summary":"Remove References 2 Bd0","description":"Remove properties from the bot's BD0 kernel (PROJECT-099B TJ02).\n\nTC04 was a ONE-WAY DOOR: a property added by a mis-click could only be taken back by\nhand-editing the kernel or writing SQL. An action whose cost of being wrong is a\ndatabase edit is one operators stop using, which is the same trap TC06's dismissals had.\n\n⚠️ Removing a property RE-ARMS the undeclared-reference warning for that token, and that\nis correct: the kernel still references it and BD0 no longer declares it. The routes out\nare TC05 (\"fix in kernel\") or TC06 (\"not an input\") — not suppressing the warning.","operationId":"remove_references_2_bd0_api_v1_kernel_remove_references_2_bd0_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveReferencesFromBd0Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/set_property_meta_2_bd0":{"post":{"tags":["kernel"],"summary":"Set Property Meta 2 Bd0","description":"Edit a BD0 property's description and/or type (PROJECT-099B TJ16).\n\nBOTH FIELDS WERE WRITE-ONCE. `add_properties_to_bd0` set them at declaration and nothing\ncould revise them, so a property born with the wrong type or an empty description kept it\nfor the life of the bot — fixable only by hand-editing the kernel JSON.\n\n⚠️ THE TWO ARE NOT EQUALLY SAFE, and the response says which changed so the UI can react.\n\n  `description` is rendered to the model as `note=\"...\"`. Changing it changes what the\n  model is TOLD, on the next call. Nothing rejects a payload because of it.\n\n  `type` is ENFORCED — `_validate_input_against_schema` validates the whole payload\n  against this schema on every call. Switching `string` → `array` makes every caller\n  still sending a string fail outright. **That stops the bot**, and it is why the type\n  control warns before committing rather than after.\n\nDeliberately NOT bundled into `add_references_2_bd0`: adding a property that did not\nexist and re-shaping one that live callers already depend on are different acts with\ndifferent blast radii, and one route doing both hides that difference behind a shared\nsuccess message.","operationId":"set_property_meta_2_bd0_api_v1_kernel_set_property_meta_2_bd0_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPropertyMetaRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/find_reference_usages":{"post":{"tags":["kernel"],"summary":"Find Reference Usages","description":"Show every kernel that names a parameter, before anything is changed (TJ14).\n\nTHE PROBLEM THIS SOLVES. TJ09 renamed BD0 and then TOLD the operator which kernels had\njust been broken. That ordering is backwards for the only decision that matters: whether\nto do the rename at all. Learning after the commit that eleven kernels now reference a\nname nothing declares is not information, it is a bill.\n\nSo the impact is readable FIRST, with the actual text, and `/rename_property_2_bd0` can\nnow finish the job in the same transaction (`rewriteKernels`).\n\nRead-only. Safe to call on a parameter the operator is merely curious about.","operationId":"find_reference_usages_api_v1_kernel_find_reference_usages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindReferenceUsagesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/rename_property_2_bd0":{"post":{"tags":["kernel"],"summary":"Rename Property 2 Bd0","description":"Rename a property on the bot's BD0 kernel (PROJECT-099B TJ09, extended by TJ14).\n\n⚠️ A kernel reading `[RECIPIENT]` resolves against the BD0 field named `RECIPIENT`;\nrename the property to `TO` and the two stop matching. Nothing raises — the model is\nsimply handed a value under a name its instructions never mention, and quality degrades\nsilently. That is the T0905 class this project exists to remove.\n\nTWO WAYS TO NOT LEAVE IT BROKEN, and the caller picks:\n  * `rewriteKernels=False` (default) — BD0 only, and the response names every kernel\n    still carrying the old token so it can be fixed through TC05. This was the ONLY\n    behaviour before TJ14, and it is still right when the kernels want prose changes\n    that a token swap would not cover.\n  * `rewriteKernels=True` — every affected kernel is rewritten in the same call, each\n    minting its own new version. `/find_reference_usages` shows exactly what will change\n    BEFORE this is called; that ordering is the point, because \"eleven kernels now\n    reference a name nothing declares\" is not information after the fact, it is a bill.\n\n⚠️ NOT ATOMIC, AND ORDERED SO THAT MATTERS AS LITTLE AS POSSIBLE. `create_kernel_version`\ncommits per kernel, so there is no transaction spanning the BD0 edit and the rewrites.\nBD0 is therefore renamed FIRST: if a later rewrite fails, the result is \"BD0 renamed,\nsome kernels still say the old name\" — which is precisely the `rewriteKernels=False`\noutcome the response already reports and the operator already knows how to finish. The\nreverse order would fail into kernels pointing at a name BD0 never got renamed to, which\nnothing reports and nothing detects.","operationId":"rename_property_2_bd0_api_v1_kernel_rename_property_2_bd0_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenamePropertyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/set_required_2_bd0":{"post":{"tags":["kernel"],"summary":"Set Required 2 Bd0","description":"Toggle a BD0 property's `required` flag (PROJECT-099B TJ03).\n\n`required` was write-once before this. `add_properties_to_bd0` sets it only where a\nstructured source asserted it — deliberately, because defaulting a bare prose reference\nto required would block every future run of the bot on an input nobody asked for — but\nthat left no way to promote a property later once a human knew better.","operationId":"set_required_2_bd0_api_v1_kernel_set_required_2_bd0_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRequiredRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/register_reference_variables":{"post":{"tags":["kernel"],"summary":"Register Reference Variables","description":"Record every token a bot references that its BD0 does not declare (TJ13).\n\nWHAT CHANGED, AND WHY THE ONE-AT-A-TIME BUTTON WENT AWAY.\n  `kernel_reference_dismissals` began as a record of a HUMAN VERDICT: an operator\n  pressing \"not an input\" on one token at a time. But not-an-input is the DEFAULT for\n  everything in that list — T0230 measured ~22 of 31 distinct tokens in the corpus as\n  not inputs — so the button was asking a person to confirm, one row at a time, the\n  thing the system already knew. What it produced was not a judgement, it was a backlog.\n\n  The table is now a CATALOGUE, populated automatically: every reference variable the\n  bot has, registered the moment it is seen. `reason` stays as optional annotation for\n  the cases somebody does want to explain, and nothing depends on it existing.\n\nIDEMPOTENT BY CONSTRUCTION. One SELECT for what this bot already has, then insert only\nthe difference. Safe to call on every testbench load, which is exactly how it is used —\na bot gains kernels over its life, so \"register once at creation\" would go stale.\n\n`dismissed_at_version` is deliberately NULL here. It records which kernel version a\nHUMAN was looking at when they judged; stamping it on an automatic registration would\nclaim a review that never happened, and resolving a version per row would cost one\nquery each for a payload that is routinely dozens of rows.","operationId":"register_reference_variables_api_v1_kernel_register_reference_variables_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterReferenceVariablesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/dismiss_reference":{"post":{"tags":["kernel"],"summary":"Dismiss Reference","description":"Record (or undo) \"this reference is not an input\" for a kernel lineage.\n\nThe third path the testbench warning needs. Without it, the only ways to silence a\nfalse positive are to edit the kernel or to declare a phantom property on BD0 — and\nT0230 measured ~22 of 31 distinct `[lowercase]` tokens in the corpus as NOT inputs, so\nfalse positives are the COMMON case, not the exceptional one.\n\nIdempotent by unique constraint on (app, bot_key, kernel_key, name): dismissing twice is\none row, not two, so the read path never has to de-duplicate.\n\nScoped to the BOT as well as the kernel (migration 000007). Kernel-only scoping let a\nsingle judgement about a shared kernel silence every bot using it — see the model\ndocstring for why the only bot that can affect is one with a real, undetected defect.","operationId":"dismiss_reference_api_v1_kernel_dismiss_reference_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissReferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/reference_dismissals":{"get":{"tags":["kernel"],"summary":"List Reference Dismissals","description":"Dismissed (kernelKey, name) pairs for ONE bot and the given comma-separated keys.\n\nReturned as pairs rather than a flat name list on purpose: a dismissal is scoped to one\nkernel lineage. `[delta_ops]` being documentation in `raisy_73_sp_` says nothing about\nwhether it is a real input somewhere else, and collapsing to names would silence it\neverywhere from a single judgement made about one kernel.\n\nFILTERED BY BOT (migration 000007). Without the bot filter this returns another bot's\nverdicts, which is how kernel-only scoping silenced shared kernels everywhere.","operationId":"list_reference_dismissals_api_v1_kernel_reference_dismissals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernelKeys","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kernelkeys"}},{"name":"botKey","in":"query","required":false,"schema":{"type":"string","default":"","title":"Botkey"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/revert-learning":{"post":{"tags":["kernel"],"summary":"DEPRECATED — use POST /api/v1/kernel/patch-run/revert","description":"**DEPRECATED (2026-10-08, P135 T1374 / D-135-048) — use `POST /api/v1/kernel/patch-run/revert`.**\n\nUndo what auto-learn wrote for one run, on one kernel (D-029).\n\n⚠️ WHY THIS ROUTE EXISTS AT ALL. The mid-term note (P135 §🎨) offers **Reject** for\n`10` seconds and auto-accepts on expiry, and until this route existed that Reject had\n**no destination**: `revert_applied_patch` was a service function with no caller, so a\nReject button would have looked like a decision and changed nothing — worse than no\nbutton, because it would have taught the user that his reversals do not land.\n\n⚠️ AND THAT REASON WAS WITHDRAWN BY THE DESIGN IT WAS BUILT FOR. The `10`-second timer\nresolved into *\"a statement with an undo window, not a question with buttons\"*, and the\nsurface that shipped calls `POST /api/v1/kernel/patch-run/revert`\n(`revertAutoLearnPatch` → `KernelFixRunPanel`). Measured on `origin/dev` 2026-10-08, this\nroute has **NO caller anywhere in the repository** — the only other reference is an\nAPI-surface dump in a test artifact.\n\n🚨 AND IT IS NOT MERELY A DUPLICATE — IT IS THE **WIDER** DOOR TO THE SAME WRITE.\n`/patch-run/revert` requires `validate_user_token`; this route accepts\n`validate_service_or_user_token`, so a SERVICE credential can undo a kernel write here and\nis refused there. Two endpoints, one service function, one effect, two credential rules:\nfor a write that `D-029` auto-applies to SHARED kernels, that is the copy an auditor could\nmiss.\n\nWHY DEPRECATED RATHER THAN DELETED. A route can be called by something that never appears\nin `git` — an agent or an MCP client reaching the API directly. That is what the warning\nbelow measures: **every call now names the canonical route in the log**, so retirement can\nbe completed on evidence instead of on the assumption that an unreferenced route is an\nunused one. If the warning stays silent, `T1374` deletes the route and this model.\n\nWHAT IT IS NOT: not a delete. `revert_applied_patch` writes the pre-run content back as\na NEW version and leaves the reverted one readable, because \"what did auto-learn\nactually do\" has to stay answerable after it is undone.\n\nPERMISSION mirrors /apply-patch exactly — the same kernel-entity editor check, because\nundoing a write is a write.","operationId":"revert_learning_api_v1_kernel_revert_learning_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelRevertLearningRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/apply-patch":{"post":{"tags":["kernel"],"summary":"Apply Kernel Patch","description":"Apply a patch by saving the patched content as a new kernel version.\n\nThis is the commit step after the user reviews the diff from /patch.\nCreates a new immutable version (versionNumber auto-increments).","operationId":"apply_kernel_patch_api_v1_kernel_apply_patch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelApplyPatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/memory/promote":{"post":{"tags":["kernel"],"summary":"Promote Kernel Memory","description":"Publish ONE named line from an entity's private correction into the GLOBAL rule.\n\n⚠️ WHY A NAMED HUMAN HERE AND THE CAPABILITY EVERYWHERE ELSE (this is the track's real content).\nEvery other P017 memory route proves its entity with the session capability (`D-017-001`). This\none must not, and the reason is SOURCE:\n\n  * the capability carries `entity_id` but its `uid` is the **literal string `\"capability\"`** —\n    it cannot name an operator, so `approver` would have nothing true to record;\n  * the **shell holds** the capability, so the shell could mint a promotion on its own and the\n    approver's name would be a claim by the machine rather than proof of a person.\n\nA READ may be authorised that way — it is recoverable, and its harm is a leak. A promotion\n**mints a global version every entity then reads**, and §3c orders by IRREVERSIBILITY first. So\nthe approver is the **token's** uid, never a body field, and a **service caller is refused**:\nit has no name to give, which is exactly the property `D-017-003` requires.\n\nReversible by construction — see `/memory/promotion/revert`.","operationId":"promote_kernel_memory_api_v1_kernel_memory_promote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelMemoryPromoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/memory/promotion/revert":{"post":{"tags":["kernel"],"summary":"Revert Kernel Memory Promotion","description":"Undo one promotion, as a **forward version**.\n\n`D-017-003` decided reversibility **by construction**, so this is not a delete: the earlier\nglobal version stays readable and the reversal is itself a version — the same reasoning\n`/revert-learning` states for auto-learn (*\"not a delete ... because 'what did it actually do'\nhas to stay answerable after it is undone\"*).\n\nPERMISSION mirrors `/memory/promote`: undoing a promotion is a promotion-shaped act, so the\ncaller must again be the entity's owner/editor and again be a named operator.","operationId":"revert_kernel_memory_promotion_api_v1_kernel_memory_promotion_revert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelMemoryRevertPromotionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/memory/promotions":{"get":{"tags":["kernel"],"summary":"List Kernel Memory Promotions","description":"What is LIVE on this rule, promoted from where, by whom, when.\n\n§1.4 asked that a promotion be *\"visible in the receipt\"*. The stamps are on the rule's own\nlines, so this reads them back — which makes that a fact a caller can check rather than a claim\nabout a string. A read, so it needs no editor permission: the act it describes already\nhappened, and the rule it happened to is shared property.","operationId":"list_kernel_memory_promotions_api_v1_kernel_memory_promotions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernelKey","in":"query","required":true,"schema":{"type":"string","title":"Kernelkey"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/self-heal":{"post":{"tags":["kernel"],"summary":"Self Heal Bot","description":"Run a bot; on failure, diagnose with raisy_61, patch with raisy_73, and retry —\nup to a hard iteration cap. See services/self_heal_service.py for the loop and its\nsafety guardrails (no-progress detection, blast-radius check, permission gating).\n\nRuns in a thread pool (like /bot/invoke) since a full loop can take minutes —\nNOT inline like /strategize or /patch, which would block the event loop.","operationId":"self_heal_bot_api_v1_kernel_self_heal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfHealRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/calls_2_patched_kernel":{"post":{"tags":["kernel"],"summary":"Self Heal Bot","description":"Run a bot; on failure, diagnose with raisy_61, patch with raisy_73, and retry —\nup to a hard iteration cap. See services/self_heal_service.py for the loop and its\nsafety guardrails (no-progress detection, blast-radius check, permission gating).\n\nRuns in a thread pool (like /bot/invoke) since a full loop can take minutes —\nNOT inline like /strategize or /patch, which would block the event loop.","operationId":"self_heal_bot_api_v1_kernel_calls_2_patched_kernel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfHealRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/classify-fault":{"post":{"tags":["kernel"],"summary":"Classify Fault","description":"What KIND of thing is broken? Deterministic rules first; raisy_96 only for what they\ncannot decide (see services/fault_adjudicator.py for why a fast-tier model is safe on\nthat branch and only in one direction).\n\nClassification only — this does NOT escalate. `gate_runner_failure` owns escalation for\nthe autonomous loops, where nobody is watching. Here a human is holding the button, and\nauto-filing a dev_request every time someone clicks a failed run would fill the queue\nwith noise and train people to ignore it — the same reasoning as T0204's `escalated:\nFalse` on /strategize.","operationId":"classify_fault_api_v1_kernel_classify_fault_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaultClassifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/strategize":{"post":{"tags":["kernel"],"summary":"Strategize Bot Kernel","description":"Diagnose which kernel in a bot's assembly is responsible for a problem,\nusing raisy_61. Does NOT edit anything — returns refactoring_directives\nnaming the target kernel (resolved to a real kernelKey) plus what should\nchange. Feed imperative_change_directive + kernelKey into /kernel/patch\n(raisy_73) to actually generate the edit.","operationId":"strategize_bot_kernel_api_v1_kernel_strategize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelStrategizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/bot_2_61_strategize":{"post":{"tags":["kernel"],"summary":"Strategize Bot Kernel","description":"Diagnose which kernel in a bot's assembly is responsible for a problem,\nusing raisy_61. Does NOT edit anything — returns refactoring_directives\nnaming the target kernel (resolved to a real kernelKey) plus what should\nchange. Feed imperative_change_directive + kernelKey into /kernel/patch\n(raisy_73) to actually generate the edit.","operationId":"strategize_bot_kernel_api_v1_kernel_bot_2_61_strategize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelStrategizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/sem_search":{"post":{"tags":["kernel"],"summary":"Sem Search Kernels","description":"Semantic search over kernels using pgvector cosine similarity.\n\nSecondary matching path — use when you don't know the exact BD/KD.\nOptionally restrict to a specific botDimension (e.g. 155=skills).\n\n⚠️ **P017 Track F (`T2124`): `entityId` NOW DECIDES WHAT THIS CAN SEE.** The search runs over the\nshared `kernels` table, so before this it returned **any** entity's matched kernel, and a caller\nwho named no entity named nothing at all. Now: an entity sees the **global corpus plus its own**,\nand a caller that omits the field sees the **global corpus only** — never another entity's\nprivate row. There is no request that produces an unscoped search.\n\nBody: {\"query\": \"web search skill\", \"botDimension\": 155, \"top_n\": 5, \"entity_id\": \"raisy_ent_...\"}","operationId":"sem_search_kernels_api_v1_kernel_sem_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/exact_match":{"post":{"tags":["kernel"],"summary":"Exact Match Kernels","description":"Exact-match lookup for kernels by BD + BDsub + optional KD.\n\nTier 1 — BD + BDsub + KD (most specific).\nTier 2 — BD + BDsub only (if KD not set or tier 1 empty).\n\nBody: {\"botDimension\": 155, \"botDimensionSub\": 1, \"kernelDimension\": 1}\nResponse: {kernels: [{kernelId, kernelKey, kernelName, versionNumber, ...}]}","operationId":"exact_match_kernels_api_v1_kernel_exact_match_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelMatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/lookup/index":{"get":{"tags":["kernel"],"summary":"Lookup Index For Entity","description":"WHICH DIMENSIONS DOES THIS COMPANY ACTUALLY USE? — the companion to `/lookup`.\n\nWHY IT EXISTS, AND WHY IT IS LLM-FREE (the constraint that shaped it). The shell's own tool\ncontract is explicit: *\"the tools are SPECIFIC named bots, NOT a generic passthrough — so the\nshell never needs raisy_BE's classifier inside a chat turn\"* (D-018, T0201 — see\n`raisy_hermes/plugins/raisy_be/tools.py`). So the room's lookup must NOT be `/lookup?question=…`\n(which derives a signature with an LLM): **the model classifies, because it is already the\nturn's model, and raisy answers exactly.**\n\nThat only works if the model can see the coordinate system it is being asked to use. This is\nthat view: the BD/BDsub pairs this entity actually holds, with counts — its own kernels plus\nthe global corpus, nothing else (MR24). No LLM, no embedding, no write; one GROUP BY.\n\nA COORDINATE THAT IS NOT LISTED IS NOT EMPTY — IT IS UNUSED, and the distinction is the whole\npoint: the model picks from what exists instead of guessing into the void.","operationId":"lookup_index_for_entity_api_v1_kernel_lookup_index_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/lookup":{"post":{"tags":["kernel"],"summary":"Lookup Kernels For Entity","description":"DO WE HAVE ANYTHING ABOUT THIS? — the EXACT, entity-scoped lookup a room may call.\n\nWHY THIS EXISTS (PO, 2026-09-21): *\"i feel he doesnt know things. if we ask something, it\ncan happen very often that a kernel needs to be pulled within the entity. by creating\nsignature and then checking and looking up whether the information is exist.\"* That\nsentence IS the specification — **derive a signature, then look it up** — and its two\nhalves both already existed in this file (`/intent_2_signature` derives it, `/exact_match`\nlooks it up). They were simply never joined, so the room could not ask the record anything\nat all, and \"I don't know\" was the honest output of a missing tool.\n\nTHREE THINGS THIS ENDPOINT DOES THAT `POST /exact_match` MUST NOT BE USED FOR:\n  1. **It scopes the read to ONE entity.** `find_kernels_by_exact_match` filtered by `app`\n     and `status` only (measured 2026-09-21), so exposing THAT route to a room would answer\n     with other companies' private kernels, found by guessing dimensions. Here the caller\n     names an entity and gets the **global corpus + that entity's own kernels**, nothing\n     else (MR24 — PROJECT-058's IDOR class).\n  2. **It can derive the signature from a question**, so the caller does not have to know\n     the BD/KD coordinate system — which is exactly why a person cannot look it up by hand.\n  3. **It names the coordinates it tried when it finds nothing.** \"We don't have it\" and\n     \"I didn't look\" are different facts, and only the surface can tell the person which.\n\nEXACT, NEVER SEMANTIC. `find_kernels_by_embedding` is a DESIGN-TIME tool: MR7b forbids\nvector search at runtime, because a similarity read on the reply path puts variance into\nwhat the model sees. This route has no fallback to it — a miss is a miss.\n\nTHE COUNT IS OF WHAT EXISTS, NEVER OF WHAT FITS (fixed 2026-09-22, T127-T150). `limit` is a\nPAGE SIZE. `total` is how many kernels the coordinates hold, `shown` is how many travelled,\n`truncated` says whether they differ — and the message states all three, because the one\ncaller that speaks to people reads the message. Measured before the fix: BD21.1 holds 53\nkernels and the route answered \"3 kernel(s) found\", so the room read a truncated page as a\ncomplete record and told a person the record does not hold what it holds. The company's own\nkernels also sort FIRST now (see `find_kernels_by_exact_match`), so a bounded page spends its\nbudget on the company's own record instead of the shared corpus.\n\nKNOWN DEVIATION, RECORDED RATHER THAN HIDDEN: the signature derivation is an LLM call\ninside `KernelSignatureService`, and it defaults to `gpt-4o-mini` — a model that is not in\n`MODE_PRESETS` (the single source of truth for the tier policy). That debt is the\nalignment band's (@P127 §2), not solved here; it is named so the next reader does not\nassume this path is logged as a bot call.","operationId":"lookup_kernels_for_entity_api_v1_kernel_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelLookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/batch-embed":{"post":{"tags":["kernel"],"summary":"Batch Embed Kernels","description":"Generate embeddings for all unembedded kernels.\n\nOptional filter by botDimension. Non-blocking: failures are counted but\ndo not abort the batch.\n\nBody: {\"botDimension\": 155}  (null = all dimensions)\nResponse: {\"processed\": 350, \"failed\": 5, \"skipped\": 0}","operationId":"batch_embed_kernels_api_v1_kernel_batch_embed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelBatchEmbedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/auto-tag":{"post":{"tags":["kernel"],"summary":"Auto Tag Kernel Endpoint","description":"Auto-generate tags for a kernel based on its content via LLM.\n\nBody: {\"kernelKey\": \"raisy_BD155_00001\"}\nResponse: {\"kernelKey\": \"...\", \"tags\": [\"web_search\", \"python\", \"low_risk\"]}","operationId":"auto_tag_kernel_endpoint_api_v1_kernel_auto_tag_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KernelAutoTagRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/{kernel_key}/archive":{"post":{"tags":["kernel"],"summary":"Archive Kernel","description":"Archive a kernel by tagging all its versions as 'archived'.\nArchived kernels are excluded from the kernel list.","operationId":"archive_kernel_api_v1_kernel__kernel_key__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernel_key","in":"path","required":true,"schema":{"type":"string","title":"Kernel Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kernel_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/llm/v1/models":{"get":{"tags":["Hermes LLM"],"summary":"List Models","operationId":"list_models_api_v1_hermes_llm_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Models Api V1 Hermes Llm V1 Models Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/llm/v1/s/{hermes_session_id}/chat/completions":{"post":{"tags":["Hermes LLM"],"summary":"Chat Completions For Session","description":"The same door, addressed by the session it belongs to (the shell's spelling).","operationId":"chat_completions_for_session_api_v1_hermes_llm_v1_s__hermes_session_id__chat_completions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hermes_session_id","in":"path","required":true,"schema":{"type":"string","title":"Hermes Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/llm/v1/s/{hermes_session_id}/models":{"get":{"tags":["Hermes LLM"],"summary":"List Models For Session","description":"Per-session spelling of the catalogue — so one base URL serves a whole client.","operationId":"list_models_for_session_api_v1_hermes_llm_v1_s__hermes_session_id__models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hermes_session_id","in":"path","required":true,"schema":{"type":"string","title":"Hermes Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Models For Session Api V1 Hermes Llm V1 S  Hermes Session Id  Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/llm/v1/chat/completions":{"post":{"tags":["Hermes LLM"],"summary":"Chat Completions","description":"The room's model call. Audited by construction; see the module docstring.","operationId":"chat_completions_api_v1_hermes_llm_v1_chat_completions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hermes_session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hermes Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dev-requests/list":{"get":{"tags":["dev-requests"],"summary":"List Dev Requests","description":"List dev requests, newest first, open ones surfaced by default filter on the FE.\n\nADMIN ONLY (`T0289.27`) — see the dependency above for why.","operationId":"list_dev_requests_api_v1_dev_requests_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Pagesize"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Filter: open|in_progress|resolved|rejected, blank = all","default":"","title":"Status"},"description":"Filter: open|in_progress|resolved|rejected, blank = all"},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"PROJECT-289 T0289.3 — filter by request kind, blank = all: RB=Build · RM=Market · RD=Direction · RO=Operations · RC=Capital. An unknown value is refused (400) rather than silently returning nothing, because an empty list and a misspelled filter look identical to a reader.","default":"","title":"Kind"},"description":"PROJECT-289 T0289.3 — filter by request kind, blank = all: RB=Build · RM=Market · RD=Direction · RO=Operations · RC=Capital. An unknown value is refused (400) rather than silently returning nothing, because an empty list and a misspelled filter look identical to a reader."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__dev_requests_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dev-requests/board":{"get":{"tags":["dev-requests"],"summary":"Seat Board","description":"**\"NEEDS ME\" SEPARATED FROM \"COUNTED\"** — `T0289.18` (`R2` · `R19` · `R23` · `R6`).\n\nThe CTO seat's `W2` is *\"the decision load, not the volume\"*, and the marketing seat's `W8`\nasks the same thing from the other side: a seat must see **the rows it has to act on**, and\nmust be **told the rest exists** without being made to read it. Those two halves are the whole\nshape of this route:\n\n    `needsMe`  the rows of the kinds THIS SEAT OWNS — the only rows it can act on\n    `counted`  every other kind's totals, as NUMBERS, with no rows attached\n\n⚠️ **THE EXCLUSION IS ENFORCED HERE, NOT FILTERED ON THE CLIENT.** `kinds_not_for_seat` is\nderived from the roster ([`request_kinds.SEAT`](../../../services/request_kinds.py)), so a\nkind added to the roster is automatically outside every seat that does not own it. If this\nroute returned everything and let the FE hide what it liked, `T0289.18`'s acceptance — *\"the\nview for a seat contains zero rows of a kind that seat does not own\"* — would be unprovable,\nbecause the rows would still have been sent.\n\n⚠️ **`seat` IS A PARAMETER BECAUSE THERE IS NO USER→SEAT BINDING** (verified 2026-10-10 by\nsearch: nothing in this estate maps a uid, an email or an entity to CTO/CMO/CEO/COO/CFO, and\nthis file's own auth checks only the Firebase `admin` claim). Deriving the seat from the token\nwould mean inventing that mapping; the honest form is the one the data supports. It is\ndeliberately **required** rather than defaulted, because a default would answer for a seat\nnobody named, and a reader would have no way to tell.\n\n`counted` carries the kind's **name and owning seat** as well as its total, so the screen can\nsay *\"3 Market Requests (CMO)\"* instead of printing a bare index — the roster's own rule that\nthe index is for code and the spelled-out name is what a person reads (`RULES_NAMING` §10).","operationId":"seat_board_api_v1_dev_requests_board_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"seat","in":"query","required":true,"schema":{"type":"string","description":"PROJECT-289 T0289.18 — which seat's view to answer: CTO | CMO | CEO | COO | CFO. Required, and NOT defaulted: a view that silently answers for the wrong seat is worse than one that refuses.","title":"Seat"},"description":"PROJECT-289 T0289.18 — which seat's view to answer: CTO | CMO | CEO | COO | CFO. Required, and NOT defaulted: a view that silently answers for the wrong seat is worse than one that refuses."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Pagesize"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__dev_requests_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dev-requests/mine":{"get":{"tags":["dev-requests"],"summary":"List My Requests","description":"The caller's OWN requests, and nothing else — `T0289.26` (`R26`/`R27`).\n\n⚠️ **THIS ROUTE TAKES NO ROW-SCOPING PARAMETER, AND THAT IS THE AUTHORISATION.** The P0\nfinding `T0289.27` recorded was a read path that was *authenticated but not authorized*:\n`validate_user_token` verifies the Firebase JWT and checks **no role**, while `/list` applied\n**no ownership filter**. Locking `/list` to admins (done, same commit as the finding) closed\nthe leak but left the requester with no view of their own ticket — which is why the PO said\n*\"his tickets should be visible to the user as well\"*.\n\nThe fix here is **not** \"filter `/list` by owner when the caller is not an admin\". A filter is\na parameter away from being wrong (`?entity=…`, `?user=…`, a future \"view as\"), and the P0 was\nexactly that class of mistake. This route has **no such parameter**: the scope is derived from\nthe token and only from the token, so there is no input a caller can vary to reach another\nperson's rows. `test_my_requests_is_owner_scoped` asserts the signature as well as the result.\n\nWHO COUNTS AS THE REQUESTER, and it is two facts because five writers record two of them:\n  * `requesting_bot == uid` — the `kernel_manager` writer records the signed-in user's uid here;\n  * `requesting_entity == <the caller's home entity>` — resolved through\n    [`get_home_entity`](../../utils/entity_utils.py), the estate's own person-Entity lookup\n    (`Entity.identity_user_id == uid`), so no second identity system is invented.\n\nA caller with neither gets an EMPTY LIST rather than an error, because that is the honest\nanswer: they have filed nothing. An **anonymous** sender has no view at all — the capture keeps\n`entity_id` NULL (a public surface's normal visitor), so there is nothing to scope to, and the\npanel's copy must say so rather than showing a blank page (`T0289.24`).\n\nThe response is the REQUESTER's shape, not the reviewer's: no `resolutionNotes` (reviewer\nprose), no `candidates`/`payload`/`proposalId` (triage internals), no `resolvedBy`. A requester\nis told **what happened to their ask**, which is a status and a date.\n\n⚠️ **THE PATH IS `/dev-requests/mine` AND THAT IS DELIBERATE.** `T0289.26`'s row writes\n`/api/v1/requests/mine`, which is where it lands **after** the CONTRACT phase renames the table\nand the route (`T0289.7`). Registering the future path now would create a second prefix, or a\ndead route. The router is mounted at `/api/v1` with prefix `/dev-requests`; the rename moves\nboth together.","operationId":"list_my_requests_api_v1_dev_requests_mine_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Pagesize"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__dev_requests_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dev-requests/{request_id}/resolve":{"post":{"tags":["dev-requests"],"summary":"Resolve Dev Request","description":"Mark a dev request resolved/rejected/in_progress.\n\n`open` is REFUSED here and that is deliberate, not an omission: `open` means *\"nobody has picked\nit up\"*, a claim only the system makes (`RAISY_01_MANIFEST.md` — the status table's Owner column).\nMoving a reopened row to it would erase the difference between *never touched* and *sent back*.\n\nPROJECT-289 `T0289.19`: a row that LEAVES a resolution (`resolved`/`rejected` → `in_progress`) is\na **reversal**. It requires a reason, it CLEARS `resolved_at`/`resolved_by` so the row stops\nclaiming it was resolved, and it records who reversed it, when, why, and what the row said before.\n\nADMIN ONLY (`T0289.27`).","operationId":"resolve_dev_request_api_v1_dev_requests__request_id__resolve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveDevRequestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__dev_requests_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skill-approvals/revoke":{"post":{"tags":["skill-approvals"],"summary":"Revoke Skill Approval","description":"Withdraw the live approval for one slug in one slot. Never deletes — marks and unbinds.\n\n`revoke_approval` also **unbinds** every bot holding the kernel the approval pinned, which\nis why this is not a record-keeping edit: leaving the binding in place would keep the bot\nrunning the skill the revocation exists to stop.","operationId":"revoke_skill_approval_api_v1_skill_approvals_revoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApprovalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__skill_approvals_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/skill-approvals/list":{"get":{"tags":["skill-approvals"],"summary":"List Skill Approvals","description":"What is approved for this slot right now, so a withdrawal can be found.\n\nComposed from the two readers that already own their questions rather than a third query:\n`approved_slugs` answers \"which slugs are live in this scope\" and `approval_state` answers\n\"who approved this one, and against which hash\". A join written here would be a second rule\nfor both — and the scoping rule is exactly the thing that must not drift, because the\nacquisition path resolves against it.","operationId":"list_skill_approvals_api_v1_skill_approvals_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source_node","in":"query","required":true,"schema":{"type":"string","description":"The BD155.<sub> slot, e.g. BD155.9","title":"Source Node"},"description":"The BD155.<sub> slot, e.g. BD155.9"},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scope to one entity; omitted means the entity-agnostic scope","title":"Entity Id"},"description":"Scope to one entity; omitted means the entity-agnostic scope"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__skill_approvals_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skill-import/search":{"get":{"tags":["skill-import"],"summary":"Search Skills","description":"Search every source and return ONE row list, each row labelled with what it is.\n\nAn unknown source name is REFUSED rather than ignored: a filter that silently stops filtering\nbecause of a typo is worse than no filter, because the caller believes it narrowed when it did\nnot. Each row carries `state` (what we hold), `source`/`door` (where it came from, and which\ndoor adding it will take), and `requiresApproval` where the gate applies — which is the\nminimum a person needs to choose between two rows without guessing.","operationId":"search_skills_api_v1_skill_import_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Free text — matches slug, name, description","title":"Q"},"description":"Free text — matches slug, name, description"},{"name":"sources","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated subset of: hermes, hermes-index, raisy, clawhub. Omitted = all.","title":"Sources"},"description":"Comma-separated subset of: hermes, hermes-index, raisy, clawhub. Omitted = all."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip PER SOURCE. The four sources are concatenated, not interleaved, so this pages each one independently; there is no total to page against — a source reports what it returned, not what it matched.","default":0,"title":"Offset"},"description":"Rows to skip PER SOURCE. The four sources are concatenated, not interleaved, so this pages each one independently; there is no total to page against — a source reports what it returned, not what it matched."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__skill_import_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skill-import/add":{"post":{"tags":["skill-import"],"summary":"Add Skill Route","description":"Add ONE skill, through the door its own provenance implies.\n\n**The caller does not choose the door, and that is deliberate** (D-098-027). A vendored Hermes\nartefact mints what we already audited; anything else goes through the gated chain and comes\nback `held` until a human approves it. Letting the caller pick would mean an unreviewed\nregistry artefact could be minted on the strength of a request parameter.\n\n⚠️ **`held` is a SUCCESS, not a failure** — the gate doing its job. It is reported with\n`status: true` so a client cannot read the guard as an error and retry around it; the\n`outcome` field is what distinguishes the three, and `message` says what to do next.","operationId":"add_skill_route_api_v1_skill_import_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSkillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__skill_import_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/skill-import/approve":{"post":{"tags":["skill-import"],"summary":"Approve Skill Route","description":"Record a human approval for ONE slug that has **NO `dev_request` behind it** (T0251).\n\n**Why this route has to exist.** The approve direction has only ever been reachable through\n`POST /dev-requests/{id}/resolve`, because a request is where the rationale lives. The import\ntool fetches candidates OUTSIDE any request — so without this it could hold a skill and have\nno way to release it. The admin adds, gets `held`, approves here, and adds again.\n\n**Withdrawal is deliberately NOT duplicated here.** `POST /api/v1/skill-approvals/revoke`\nalready exists, already unbinds bots holding the kernel, and is already the only withdrawal —\na second route with the same effect is a second thing to keep in step, and it would be the\nweaker one that gets called.\n\nThe actor is **required** (the approval row records who decided, and its column is NOT NULL),\nand the node is derived by the same function the add uses — see `skill_import_service.approve`\nfor why getting that wrong produces a recorded approval that never takes effect.","operationId":"approve_skill_route_api_v1_skill_import_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveSkillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__skill_import_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/skill-import/job/{job_id}":{"get":{"tags":["skill-import"],"summary":"Import Job Status","description":"Read one import job's TRUE stage — **this is what a reloaded page asks** (T0252).\n\n**Why this is an HTTP read and not only a socket.** Progress pushed over a WebSocket is\nconvenient and not durable: a page that reloads has no socket yet, a client that never opened\none gets nothing, and a socket that reconnects can land on a different worker (the deployed app\nruns several) and receive silence for a job that is running perfectly well. All three cases ask\nthe same question — *\"where is it?\"* — and all three are answered here. The socket is the\n*live* half; this is the *true* half, and the record it reads is written before any push is\nattempted.\n\nA 404 does not mean the import failed. It means **this process has no record of that job id**,\nwhich happens when the id is wrong OR when the record was pruned OR — the honest case worth\nknowing about — when the request reached a worker that never ran the job. Distinguishing those\nneeds a persisted record, so the message says \"unknown here\" rather than guessing which one.","operationId":"import_job_status_api_v1_skill_import_job__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__skill_import_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wizard/person/start":{"post":{"tags":["wizard-person"],"summary":"Person Start","description":"Start a person-type wizard session (no URL required).","operationId":"person_start_api_v1_wizard_person_start_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Request","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/wizard/person/complete":{"post":{"tags":["wizard-person"],"summary":"Person Complete","description":"Complete person wizard — creates natural_person entity and optional org link.","operationId":"person_complete_api_v1_wizard_person_complete_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Request","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connections/recommendations":{"get":{"tags":["connections"],"summary":"Get Recommendations","description":"Return pending recommendations for the post-wizard card (max 20).","operationId":"get_recommendations_api_v1_connections_recommendations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connections/all":{"get":{"tags":["connections"],"summary":"Get All Recommendations","description":"Return pending + accepted recommendations for the connections page.","operationId":"get_all_recommendations_api_v1_connections_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connections/recommendations/refresh":{"post":{"tags":["connections"],"summary":"Refresh Recommendations","operationId":"refresh_recommendations_api_v1_connections_recommendations_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connections/recommendations/{recommended_user_id}/accept":{"post":{"tags":["connections"],"summary":"Accept Recommendation","operationId":"accept_recommendation_api_v1_connections_recommendations__recommended_user_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recommended_user_id","in":"path","required":true,"schema":{"type":"string","title":"Recommended User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections/recommendations/{recommended_user_id}/dismiss":{"post":{"tags":["connections"],"summary":"Dismiss Recommendation","operationId":"dismiss_recommendation_api_v1_connections_recommendations__recommended_user_id__dismiss_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recommended_user_id","in":"path","required":true,"schema":{"type":"string","title":"Recommended User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections/bridges":{"get":{"tags":["connections"],"summary":"Get Bridges","description":"Return the bridges from `owner_entity_id`'s own network to `target_entity_id`.\n\nTHE RESPONSE CARRIES ONE OF THREE STATES, and the caller MUST render them differently\n(`RULES_CHALLENGE` C6(a3)):\n\n  `found`           — `paths` is non-empty; each path says HOW it knows the target (`via`) and\n                      whether that is a PUBLIC fact (`predicate_class: structural`) or a private\n                      imported edge (`private`). `D-064-007` ties the panel's copy to that field:\n                      a structural path may name the firm; a private one is disclosed as\n                      \"someone in your network\" and never asserted as fact about the bridge.\n  `not_found`       — the search RAN and there is genuinely no path. `network_coverage`\n                      distinguishes the two very different reasons: a real network with no path\n                      (informative) versus an EMPTY network (uninformative — a 0 warm-path rate\n                      then says nothing, `@P064` X6(iii)).\n  `could_not_check` — the search FAILED. Never render this as `not_found`: that would be a false\n                      negative about a real relationship. Returned with HTTP 200 on purpose, so\n                      the FE can show the honest \"could not check\" rather than an error toast\n                      that reads as a system fault.\n\nEach found path also carries `disclosure_line` — the sentence describing how it was found, built\nby the same pure function the drafter feeds the bot. The FE renders that sentence rather than\ncomposing one, so the founder cannot read a claim the bot was never told to make (`D-064-007`).\n`target` carries the investor's own name so the panel needs no second request to name him.\n\nRead-only by design: no path writes an `entity_relationships` row (`MR1c`).\n\n⚠️ AUTHENTICATED **AND** ENTITLED, and the two are not the same check (`@P064` security fix,\n2026-10-07). This route shipped with **neither**: it took `owner_entity_id` as a parameter and\nanswered anyone, because it declared no auth dependency and the app has no global one — measured on\nDEV, `GET` with no token returned **HTTP 200 with data**. Authentication alone would still have let\nany signed-in user read any founder's network, because the response names a real person and the path\nthat reaches them. So the caller must own or govern the entity, exactly as the draft route\nrequires.","operationId":"get_bridges_api_v1_connections_bridges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner_entity_id","in":"query","required":true,"schema":{"type":"string","title":"Owner Entity Id"}},{"name":"target_entity_id","in":"query","required":true,"schema":{"type":"string","title":"Target Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmIntroResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections/investors":{"get":{"tags":["connections"],"summary":"Get Investors In Reach","description":"Which investors the founder's network can already reach — FIRST and SECOND level.\n\nTHE QUESTION THIS ANSWERS IS ASKED FIRST, and until 2026-10-12 nothing answered it. A founder does\nnot begin with an investor in mind; he begins by asking *\"who am I already close to?\"* The bridge\nsearch cannot answer that — it needs the target named — so the only way to get this was N searches\nover investors he had to think of already.\n\n  first_level  — the fund IS one of his connections. No bridge; he writes directly.\n  second_level — a fund at a firm one of his connections is attached to, so that connection is the\n                 bridge. This is the `connects_to_firm` predicate read BACKWARDS: the forward one\n                 asks \"does this bridge reach that firm?\", and this starts from his network's firms.\n\n⚠️ AN INVESTOR IS NOT AN ENTITY TYPE. It is the `entity_type_sub` marker (`Financial_Vehicle`) or an\n`investor` relationship — measured on DEV, where reading it as a type returns nothing. The engine\nowns that marker; this route does not restate it.\n\nAuthenticated AND entitled, exactly as the bridge search is: the response names real funds a real\nperson can reach, so it is readable only by the founder who owns the network or an operator who\ngoverns that entity.\n\nRead-only: no row is written (`MR1c`).","operationId":"get_investors_in_reach_api_v1_connections_investors_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner_entity_id","in":"query","required":true,"schema":{"type":"string","title":"Owner Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorsInReachResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections/network/ingest":{"post":{"tags":["connections"],"summary":"Ingest Network","description":"Ingest the founder's OWN network as `connect` edges — the input the bridge search reads.\n\nTWO SOURCES, and both are audited (`@P064` C3):\n\n  `csv`            — a file the founder uploads. REUSES the proven CSV writer rather than minting\n                     a second one: `InvestorImportExportService` parses this format AND writes the\n                     `connect` edge that puts a contact in the network, so a parallel writer would\n                     be a second home for one fact (`MR0pv`). It also de-duplicates within a batch.\n                     ⚠️ A `connect` edge puts a contact IN the network and is NOT enough to make\n                     him USABLE: the search asks what the CONTACT is attached to (see\n                     `warm_intro_paths._firm_ids_of`), so a contact whose only edge is to the\n                     founder satisfies no predicate. This route therefore imports with\n                     `contact_mode=\"network\"`, which keeps the person a person and derives the\n                     EMPLOYER named in his file as an `employee` edge — the second edge that lets\n                     a bridge lead anywhere (`D-064-014`). An employer the graph does not know is\n                     REPORTED (`unknown_employers`) and not minted.\n                     ⚠️ That de-duplication is CHECK-THEN-INSERT, so two CONCURRENT imports of the\n                     same address could both pass the check and the unique index\n                     `uq_entity_relationship_active` would then reject one. Serial runs are safe;\n                     a queue that parallelises this call needs a real upsert first.\n  `mail_derived`   — derived from the mail raisy ALREADY stores (`mail_messages`), so NO new\n                     Google scope and no re-consent. This is the PO's own answer of 2026-10-07:\n                     *\"once we have his previous emails we can derive the contacts by ourselves.\"*\n                     A correspondent counts only where the owner WROTE in the thread — a received-\n                     only thread asserts no relationship (`MR1c`), which is why a newsletter can\n                     never become a connection.\n\n⛔ `gmail_contacts` is CUT and this route refuses it: an address-book entry asserts no relationship\n(`MR1c`), and cutting it also retired a `contacts.readonly` scope that is pinned two-sided by\n`tests/mailbox/test_google_scope_declaration.py`. `linkedin` is CONDITIONED on `@P205`.\n\nRead `coverage` on the reply: an EMPTY network makes the bridge search return nothing for a\nstructural reason, and a 0 warm-path rate over no connections is uninformative — never a pass.\n\n⚠️ AUTHENTICATED **AND** ENTITLED (`@P064` security fix, 2026-10-07). This route shipped with\nneither, so anyone could trigger an ingest against ANY owner entity — a write aimed at a stranger's\nnetwork. The caller must own or govern `owner_entity_id`.","operationId":"ingest_network_api_v1_connections_network_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkIngestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/connections/intro-request/draft":{"post":{"tags":["connections"],"summary":"Draft Intro Request","description":"Draft the founder's ask TO THE BRIDGE `B` — the request that asks `B` for the introduction.\n\nTHIS IS THE ASK TO `B`, NOT THE OUTREACH TO `P`. `B` is a third party who has not been asked\n(`D-064-007`), so the copy never asserts a fact about `B`'s own relationships.\n\n⚠️ THE CLIENT NAMES ONLY THE BRIDGE. `via` and `predicate_class` are RE-DERIVED HERE, from the\nengine, on every call. Accepting them in the body would let a caller claim\n`predicate_class: \"structural\"` for a path that actually rests on a private imported edge — and\nthe disclosure sentence would then NAME A FIRM as a public fact about two real people\n(`D-064-007`). The sentence the founder sends is therefore built from the engine's own answer.\n\nNOTHING IS SENT AND NOTHING IS APPROVED: the draft lands as a `prepared_items` row born\n`proposed` (`MR0`), carrying its `(bot, kernel-version)` lineage (`MR31`), so the founder — not\nthis route — decides whether it goes anywhere.\n\nA draft that cannot be produced returns the engine's OWN state with `drafted: false` rather than\nan error, because the three states are not interchangeable (`RULES_CHALLENGE` C6(a3)) and\n`could_not_check` must never be read as \"no bridge\".","operationId":"draft_intro_request_api_v1_connections_intro_request_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntroRequestDraftRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntroRequestDraftResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/process/create":{"post":{"tags":["process"],"summary":"Create Process","description":"T0201: Create new process (draft status).\n\nBoth n8n (service token) and FE (Firebase JWT) can create processes.","operationId":"create_process_api_v1_process_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/process/list":{"get":{"tags":["process"],"summary":"List Processes","description":"T0201: List all processes for an entity.\nInline-joins ProcessPerformance (approvals, rejections, confidenceScore, approvalRate)\nand ApprovalSetting (approvalThreshold) for each process.\nScoped to processes the caller can read (global + entity-scoped).","operationId":"list_processes_api_v1_process_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/get":{"post":{"tags":["process"],"summary":"Get Process","description":"T0201: Get process by key (optionally specific version).","operationId":"get_process_api_v1_process_get_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"process_key","in":"query","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"version_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/edit":{"patch":{"tags":["process"],"summary":"Edit Process","description":"T0201: Edit process (creates new version).","operationId":"edit_process_api_v1_process__process_key__edit_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/archive":{"post":{"tags":["process"],"summary":"Archive Process","description":"T0201: Archive process.","operationId":"archive_process_api_v1_process__process_key__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/delete":{"post":{"tags":["process"],"summary":"Delete Process","description":"T0203: Hard-delete a process and its execution history.","operationId":"delete_process_api_v1_process__process_key__delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/bulk-archive":{"post":{"tags":["process"],"summary":"Bulk Archive Processes","description":"Bulk archive every non-archived process scoped to an entity.\nThis is the reversible equivalent of \"delete all processes\".","operationId":"bulk_archive_processes_api_v1_process_bulk_archive_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessBulkArchiveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/process/{process_key}/versions":{"get":{"tags":["process"],"summary":"Get Process Versions","description":"T0201: Get version history.","operationId":"get_process_versions_api_v1_process__process_key__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/trigger":{"post":{"tags":["process"],"summary":"Trigger Process","description":"T0202: Trigger process execution.\n\nCreates ProcessCallLog and returns immediately (n8n handles async execution).","operationId":"trigger_process_api_v1_process__process_key__trigger_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessExecuteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/status":{"get":{"tags":["process"],"summary":"Get Process Status","description":"T0202: Get process execution status.\n\nIf call_id provided, return specific execution.\nOtherwise return latest execution.","operationId":"get_process_status_api_v1_process__process_key__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/validate":{"post":{"tags":["process"],"summary":"Validate Process","description":"T0202: Validate process for deployment.\n\nChecks:\n- All referenced bot keys exist and are active\n- Bot versions are resolvable\n- Gating rules are valid\n- n8n workflow syntax is valid","operationId":"validate_process_api_v1_process__process_key__validate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"version_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/deploy":{"post":{"tags":["process"],"summary":"Deploy Process","description":"T0202: Deploy process to n8n.\n\nCreates/updates n8n workflow JSON, deploys to n8n, stores n8nWorkflowId.\nProcess status transitions: draft → active.","operationId":"deploy_process_api_v1_process__process_key__deploy_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"version_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/undeploy":{"post":{"tags":["process"],"summary":"Undeploy Process","description":"T0202: Undeploy process from n8n.\n\nDeactivates n8n workflow. Process status transitions: active → archived.","operationId":"undeploy_process_api_v1_process__process_key__undeploy_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"version_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/step/pause":{"post":{"tags":["process"],"summary":"Pause Step","description":"T0203: n8n calls this to pause at approval gate.\n\nCalled BY n8n, stores resumeCallbackUrl for later verdict.","operationId":"pause_step_api_v1_process_step_pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"query","required":false,"schema":{"type":"string","title":"Call Id"}},{"name":"step_order","in":"query","required":false,"schema":{"type":"integer","title":"Step Order"}},{"name":"resume_callback_url","in":"query","required":false,"schema":{"type":"string","title":"Resume Callback Url"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Bot Output"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/step/complete":{"post":{"tags":["process"],"summary":"Complete Step","description":"T0203: n8n calls this when process completes.\nAccepts final output, per-step results, and optional total latency.","operationId":"complete_step_api_v1_process_step_complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"query","required":false,"schema":{"type":"string","title":"Call Id"}},{"name":"total_latency_ms","in":"query","required":false,"schema":{"type":"integer","title":"Total Latency Ms"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_complete_step_api_v1_process_step_complete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/step/fail":{"post":{"tags":["process"],"summary":"Fail Step","description":"T0203: n8n calls this when step fails.","operationId":"fail_step_api_v1_process_step_fail_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"query","required":false,"schema":{"type":"string","title":"Call Id"}},{"name":"error_message","in":"query","required":false,"schema":{"type":"string","title":"Error Message"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/reviews/pending":{"get":{"tags":["process"],"summary":"Get Pending Reviews","description":"T0204: List pending reviews for manager.\n\nP144 F-03 (2026-09-28) — **THIS ENDPOINT NOW HONOURS THE ENTITY IT IS HANDED.**\n\nIt accepted `entity_id` and never read it. The only filter was `_can_access_process`, a\nPERMISSION test, so a caller who can read two companies was shown both companies' pending\nreviews whichever company it asked for — and a row with no `processCallId` (no process at all)\ncame through as well, because the guard is `if process and not ...`: with `process is None`\nthere was nothing to test and the row was appended.\n\nNothing could show either fault, because the surface beside it — `ProcessManagerPage` —\nhardcoded `test-company-001`, a company that does not exist. An entity-blind answer to a\nnonexistent company is exactly as empty as a correct one.\n\nThe selection below is the selection the sidebar's Process Manager dot makes\n(`_process_gate_lane` in this same service's harness layer): a pending row whose\n`processCallId` resolves through `ProcessCallLog` to a process that belongs to the requested\nentity. One rule, two readers — and `tests/project144/probe_f03_two_counts.py` asserts the two\nnumbers agree on live DEV, so the next divergence is caught rather than reasoned about.","operationId":"get_pending_reviews_api_v1_process_reviews_pending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/reviews/{review_id}":{"get":{"tags":["process"],"summary":"Get Review Details","description":"T0204: Get review details.","operationId":"get_review_details_api_v1_process_reviews__review_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/reviews/{review_id}/send-plan":{"post":{"tags":["process"],"summary":"Set Review Send Plan","description":"T0202 — WHEN AN APPROVED ITEM IS MEANT TO GO OUT.\n\nThe PO's own case: *\"On Tuesday at 2:00, we're going to send an email to an investor.\"* The\nmoment is the owner's plan and the product holds it as truth; the engine holds the timer\n(`D-146-004`, option `C`), so a pressed send and a timed send are one code path.\n\n**A moment in the past is refused LOUDLY**, mirroring the engine's own create-time rule: an\nISO one-shot in the past is rejected there, and accepting one here would leave the owner\nbelieving a send was planned that can never fire. `send_at: null` is not a refusal — it is the\nowner clearing his own plan, which returns the item to *goes out when approved*.\n\nGATE: setting a plan is an ACT on an approved item, so it needs the same access the decision\nneeds — a viewer may read the plan, never author it.","operationId":"set_review_send_plan_api_v1_process_reviews__review_id__send_plan_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessReviewSendPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/reviews/{review_id}/decide":{"post":{"tags":["process"],"summary":"Decide Review","description":"T0204: Manager approves or rejects review.\n\nTODO: Trigger n8n resumeCallbackUrl with verdict.","operationId":"decide_review_api_v1_process_reviews__review_id__decide_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessReviewDecideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/executions":{"get":{"tags":["process"],"summary":"List Executions","description":"T0206: List past executions for a process (paginated).","operationId":"list_executions_api_v1_process__process_key__executions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/execution/{call_id}":{"get":{"tags":["process"],"summary":"Get Execution Detail","description":"T0206: Get full execution detail (all step results).","operationId":"get_execution_detail_api_v1_process_execution__call_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/registry/lookup":{"get":{"tags":["process"],"summary":"Lookup Process By Classification","description":"T0205: Lookup process by classification code.\n\nReturns process details if a process exists for that P-code classification.\nReturns available processes if not found - gives building blocks for self-assembly.\n\nExample: GET /api/v1/process/registry/lookup?classification=P-OP1.X\nResponse: {exists: true/false, processKey: \"...\", processId: \"...\", availableProcesses: [...]}","operationId":"lookup_process_by_classification_api_v1_process_registry_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"classification","in":"query","required":true,"schema":{"type":"string","title":"Classification"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/approval-settings":{"get":{"tags":["process"],"summary":"Get Approval Settings","description":"T0208: Get approval settings for a process.\nReturns the process-level ApprovalSetting (scope=overall).\nFalls back to defaults if no setting exists yet.","operationId":"get_approval_settings_api_v1_process__process_key__approval_settings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["process"],"summary":"Update Approval Settings","description":"T0208: Create or update approval settings for a process.\nUpserts an ApprovalSetting record (scope=overall) and also syncs\nthe approvalMode field on the Process row for fast list queries.","operationId":"update_approval_settings_api_v1_process__process_key__approval_settings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSettingUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/construction-meta":{"get":{"tags":["process"],"summary":"Get Construction Meta","description":"T052-P2: Get construction metadata for an auto-constructed process.\nReturns construction source, tree summary, gaps, and approval status.","operationId":"get_construction_meta_api_v1_process__process_key__construction_meta_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/reconstruct":{"post":{"tags":["process"],"summary":"Reconstruct Process","description":"T052-P2: Trigger re-construction of a process from its original deliverable.\nCreates a new draft version with updated backward chain.\n\nReturns 202-Accepted + job_id for polling.","operationId":"reconstruct_process_api_v1_process__process_key__reconstruct_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/edits_2_process":{"post":{"tags":["process"],"summary":"Reconstruct Process","description":"T052-P2: Trigger re-construction of a process from its original deliverable.\nCreates a new draft version with updated backward chain.\n\nReturns 202-Accepted + job_id for polling.","operationId":"reconstruct_process_api_v1_process__process_key__edits_2_process_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/derive-signature":{"post":{"tags":["process"],"summary":"Derive Process Signature","description":"PROJECT-053: Derive a PD signature from a process description.\nCalls the PD classifier and returns parsed dimension slots.","operationId":"derive_process_signature_api_v1_process_derive_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/process/intent_2_signature":{"post":{"tags":["process"],"summary":"Derive Process Signature","description":"PROJECT-053: Derive a PD signature from a process description.\nCalls the PD classifier and returns parsed dimension slots.","operationId":"derive_process_signature_api_v1_process_intent_2_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDeriveSignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/process/construct":{"post":{"tags":["process"],"summary":"Construct Process","description":"PROJECT-053: Construct a process from a description.\nclassify → fill → connect. Returns draft process record.","operationId":"construct_process_api_v1_process_construct_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessConstructRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/process/signature_2_process":{"post":{"tags":["process"],"summary":"Construct Process","description":"PROJECT-053: Construct a process from a description.\nclassify → fill → connect. Returns draft process record.","operationId":"construct_process_api_v1_process_signature_2_process_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessConstructRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/process/admin/n8n-callbacks/retry":{"post":{"tags":["process"],"summary":"Retry N8N Callbacks","description":"Admin/service endpoint: manually retry pending n8n callbacks.\n\ncallback_type: optional filter ('resume', 'trigger', 'completion').\n               Defaults to all pending callbacks.","operationId":"retry_n8n_callbacks_api_v1_process_admin_n8n_callbacks_retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callback_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/admin/n8n-reconcile":{"post":{"tags":["process"],"summary":"Reconcile N8N Processes","description":"Admin/service endpoint: reconcile ProcessCallLog statuses with n8n execution state.","operationId":"reconcile_n8n_processes_api_v1_process_admin_n8n_reconcile_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"stale_minutes","in":"query","required":false,"schema":{"type":"integer","default":5,"title":"Stale Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_key}/requirements":{"get":{"tags":["process"],"summary":"Get Process Requirements","description":"What this process requires, per step and rolled up — and which of it is NOT connected.\n\n`unmet` is the fact the red dot counts (`@P136` §16.4): empty means the process can run, and a\nnon-empty list names exactly what is missing so the dot can navigate to the connection that\nwould clear it. `linked_classes` is reported beside it so the surface can say *\"you have this\nconnection and nothing uses it\"* as well as *\"this process needs one you do not have\"*.","operationId":"get_process_requirements_api_v1_process__process_key__requirements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_key","in":"path","required":true,"schema":{"type":"string","title":"Process Key"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"version_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/requirements/unmet":{"get":{"tags":["process"],"summary":"List Unmet Requirements","description":"Every process of this entity blocked on an unlinked integration — the red dot's source.\n\nOne item per blocked process, each carrying the classes to connect. A process with nothing\nmissing produces NO item, so a caller summing these never subtracts a zero (`@P136` §16.4's\nthird rule: a zero renders nothing).","operationId":"list_unmet_requirements_api_v1_process_requirements_unmet_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/requirements/assets":{"get":{"tags":["process"],"summary":"Get Requirement Assets","description":"BOTH directions of the integration fact, from one store (P276 T0122).\n\n`needed_classes` — what the processes require and this company has not connected. This is the\nhalf that can raise a dot, and it is the same list `GET /process/requirements/unmet` returns.\n\n`unused_classes` — what the company HAS connected and no process requires. `IN-276-04`: an\nunlinked integration is a **lower-value asset, second level**. It is a READING, never a gate\nitem: an unused connection is a legitimate state (a user may connect a mailbox before the\nprocess that sends from it exists), and `@P136` §16.4's first rule is that a dot counts\nDECISIONS, never activity — so this half must not raise one.\n\n`MR3j`'s asset check is why the second half exists at all: *\"before proposing to build, buy, or\nacquire anything, ask what the entity can already leverage toward it.\"* A connection nobody\nuses is exactly the asset that check is for, and until P276 nothing could say so.","operationId":"get_requirement_assets_api_v1_process_requirements_assets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__process_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/process/{process_id}/review":{"patch":{"tags":["process-review"],"summary":"Review Process","description":"Approve, edit, or reject a constructed process.","operationId":"review_process_api_v1_process__process_id__review_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewProcessRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/{bot_id}/review":{"patch":{"tags":["bot-review"],"summary":"Review Bot","description":"Approve, edit, or reject a constructed bot.","operationId":"review_bot_api_v1_bot__bot_id__review_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bot_id","in":"path","required":true,"schema":{"type":"string","title":"Bot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewBotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverables/build":{"post":{"tags":["deliverables"],"summary":"Build Deliverables","description":"Enumerate and persist deliverables for review. Returns job handle.","operationId":"build_deliverables_api_v1_entity__entity_id__deliverables_build_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildDeliverablesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverables/job/{job_id}":{"get":{"tags":["deliverables"],"summary":"Get Job Deliverables","description":"Poll/get deliverables for a build job.","operationId":"get_job_deliverables_api_v1_entity__entity_id__deliverables_job__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverables":{"get":{"tags":["deliverables"],"summary":"Get Current Deliverables","description":"Return the latest pending deliverables for the current user.\n\n`response_model` (added 2026-10-11, `@P288` T0204/T0205): this route published\n`200 -> {}`, so ORVAL generated `any` and the buyer's surface had no shape to branch\non. The payload now also carries `state` / `state_label` in the BUYER's vocabulary —\n`@P288` §13 stage 6's ruled states — while `status` / `stage` keep the machine's\nwords for existing consumers. Additive: nothing renamed, nothing removed.","operationId":"get_current_deliverables_api_v1_entity__entity_id__deliverables_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverablesEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverables/{deliverable_id}/review":{"patch":{"tags":["deliverables"],"summary":"Review Deliverable","description":"Approve, edit, or reject a proposed deliverable.","operationId":"review_deliverable_api_v1_entity__entity_id__deliverables__deliverable_id__review_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","title":"Deliverable Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewDeliverableRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverables/batch/construct":{"post":{"tags":["deliverables"],"summary":"Batch Construct","description":"Build draft processes + bots from all approved deliverables.","operationId":"batch_construct_api_v1_entity__entity_id__deliverables_batch_construct_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchConstructRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverables_2_processes":{"post":{"tags":["deliverables"],"summary":"Batch Construct","description":"Build draft processes + bots from all approved deliverables.","operationId":"batch_construct_api_v1_entity__entity_id__deliverables_2_processes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchConstructRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverables/process/{process_id}/construct":{"post":{"tags":["deliverables"],"summary":"Construct Process From Deliverable","description":"Build the steps of a single draft process backward from its deliverable.\nThe process record itself is the deliverable container (1 deliverable = 1 process).","operationId":"construct_process_from_deliverable_api_v1_entity__entity_id__deliverables_process__process_id__construct_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/deliverable_2_process":{"post":{"tags":["deliverables"],"summary":"Construct Process From Deliverable","description":"Build the steps of a single draft process backward from its deliverable.\nThe process record itself is the deliverable container (1 deliverable = 1 process).","operationId":"construct_process_from_deliverable_api_v1_entity__entity_id__deliverable_2_process_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"process_id","in":"query","required":true,"schema":{"type":"string","title":"Process Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/activate":{"post":{"tags":["deliverables"],"summary":"Activate Entity","description":"Activate entity, processes, bots and trigger first execution.","operationId":"activate_entity_api_v1_entity__entity_id__activate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity/{entity_id}/drafts_2_live":{"post":{"tags":["deliverables"],"summary":"Activate Entity","description":"Activate entity, processes, bots and trigger first execution.","operationId":"activate_entity_api_v1_entity__entity_id__drafts_2_live_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/init":{"post":{"tags":["user"],"summary":"Api User Init","description":"Idempotent: ensure the signed-in user has a person entity.\nSafe to call multiple times — returns existing entity if already created.\nFE calls this after every login/signup; response.data.entity_id goes into auth context.\n\nDuplicate-account protection (glowtest port, utils/duplicate_account_prevention.py):\nif the email is already provisioned under a DIFFERENT Firebase UID, a second\nperson entity is NOT created — returns 409 with the existing entity id instead.\nNew entities store the login email in entity_links[\"email\"] as the lookup key.\n\nPROJECT-077b T0106: on a brand-new entity only, queues an async possible-duplicate\ncheck (flag_possible_duplicate_person_async) after the response is sent — this login\npath stays exactly as fast as before (still generate_embedding=False; still no\nsynchronous matching call). The check itself, and the dashboard banner that surfaces\nits result, are what T0106-T0110 add — never a blocker here.\n\nBoth paths also queue embed_entity_async. This is load-bearing for dedup, not an\noptimisation: create_entity runs with generate_embedding=False here (login latency),\nand find_similar_entities' SQL filters on `embedding IS NOT NULL` — so without this,\na self-signup person entity is permanently un-findable as a duplicate candidate by\nanyone else. That's the exact \"one real person, two entity rows\" case PROJECT-077b\nexists to catch: the scraped copy would have an embedding, the self-signup copy never\nwould, and no search from either direction could ever match them. Queuing it on the\n`existing` path too backfills everyone created before this fix on their next login,\nrather than leaving them dependent on a manual sweep (scripts/backfill_person_\nembeddings.py, T0114, is still the way to catch accounts that don't log in soon).\nembed_entity_async no-ops when an embedding is already present, so the repeat call\non every subsequent login costs one indexed lookup.\n\nP091 (2026-09-21): the FREE START grant also runs on BOTH paths now — it used to run only when\nthe entity was created, which meant every account that already existed when the feature shipped\nnever received it. It is guarded by `credit_grants_received`, so it happens exactly once.","operationId":"api_user_init_api_v1_user_init_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/user/backfill-entities":{"post":{"tags":["user"],"summary":"Api Backfill Entities","description":"Admin-only: one-time backfill — creates a natural_person entity for every\nuser in entity_permissions that doesn't already have a natural_person entity.\nSafe to run multiple times (idempotent per uid).","operationId":"api_backfill_entities_api_v1_user_backfill_entities_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/user/set-admin":{"post":{"tags":["user"],"summary":"Api Set Admin","description":"Admin-only: grant or revoke the `admin` Firebase custom claim on a user.\n\nRequires the caller to already carry `admin: true` (validate_admin_token) —\nthe very first admin can't be created this way (no admin exists yet to\nauthorize the call) and must be bootstrapped once via\nscripts/grant_admin_claim.py. Every admin after that can be granted here.\n\nAlso requires the RAISY_FIREBASE_CONFIG service account to hold the\n\"Firebase Authentication Admin\" IAM role — without it this fails with the\nsame INSUFFICIENT_PERMISSION error as the script, regardless of caller.\n\nThe target user must sign out and back in (or force a token refresh) for\nthe claim change to take effect — it's baked into the ID token at mint time.","operationId":"api_set_admin_api_v1_user_set_admin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAdminRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/user/profile/{user_id}":{"get":{"tags":["user"],"summary":"Get User Profile","description":"Return public display info for a user — name, role, and entity association.\nUsed by connection cards to show recommended users without exposing private data.\nChecks person entity first, falls back to company entity.","operationId":"get_user_profile_api_v1_user_profile__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/credentials/sweep":{"post":{"tags":["integrations"],"summary":"Sweep Stored Credentials","description":"Verify every entity's stored credential and report pillar 1's numbers (T07 / `R-P1.4`).\n\nOperator-only on purpose: this walks EVERY entity's credentials, so an ordinary user token\nmust not reach it. The caller is the schedule — a scheduler, n8n, or the wake loop — and the\nschedule itself is deliberately not part of this route: @P136 requires the poller to *\"stay\nreplaceable\"*, so the substrate decision cannot be baked in here.","operationId":"sweep_stored_credentials_api_v1_integrations_credentials_sweep_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CredentialSweepRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/integrations/google/connect":{"post":{"tags":["integrations"],"summary":"Google Connect","description":"Return the Google OAuth authorization URL for the FE to navigate to.\nReturned as JSON (not a redirect) because this call needs the Firebase\nbearer header, which a raw browser navigation can't carry.","operationId":"google_connect_api_v1_integrations_google_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/integrations/google/callback":{"get":{"tags":["integrations"],"summary":"Google Callback","description":"Bare Google redirect — no Firebase auth header available here. The\nsigned `state` param is the CSRF protection and carries entity_id/uid.\n\nPROJECT-066 T15: NOTHING in this handler may raise. `GoogleOAuthCallbackPage.tsx` renders\nthe `reason` query param verbatim, so every exit is a redirect carrying a short machine\ncode and the detail goes to the log only. Before this, a DB failure escaped to\n`main.py`'s global handler as a raw 500 (leaking the DSN) *after* Google had already\ngranted the refresh token — the consent was spent and nothing was stored.","operationId":"google_callback_api_v1_integrations_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/google/status":{"get":{"tags":["integrations"],"summary":"Google Status","operationId":"google_status_api_v1_integrations_google_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/google/verify_credential":{"post":{"tags":["integrations"],"summary":"Google Verify Credential","description":"T18/T19 — verify one entity's stored Google credential and report its `status`.\nRefreshes server-side (the FE never sees a token) and records the verdict on the vault row.\n\nNaming (RULES_NAMING §3): verb-first with the resource it acts on, never verb-only. The\nanswer carries `status` — the canonical `IntegrationVault.status` vocabulary — rather than\na second word for the same concept (§4).\n\nA dead credential is a STATUS, never an exception: an unreachable Google or a DB hiccup is\na reportable condition, not a 500 (the rule T15 applies to the callback).","operationId":"google_verify_credential_api_v1_integrations_google_verify_credential_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityIdRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/integrations/google/disconnect":{"post":{"tags":["integrations"],"summary":"Google Disconnect","operationId":"google_disconnect_api_v1_integrations_google_disconnect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityIdRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/integrations/calendar/events":{"post":{"tags":["integrations"],"summary":"Calendar 2 Event Created","description":"Write one event into the entity's own calendar — the CALENDAR class's external effect.\n\n`send_updates` defaults to `\"none\"` in the service: an invitation reaches a real counterparty\nonly when the caller asks for it, never as a side effect of writing a row. A caller that wants\nthe invite says so.","operationId":"calendar_2_event_created_api_v1_integrations_calendar_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/mail/tone-presets":{"get":{"tags":["mail"],"summary":"List Tone Presets Route","description":"`@P291 T1421` (`D-138-022`/`023`/`024`) — the Tone Preset family, and the ONE number on the control.\n\nWHY THE SELECTION IS A QUERY PARAMETER AND NOT COMPUTED IN THE CLIENT. The cumulative value is\n`min()`, never a sum (`D-138-022` clause (d)) — that is a RULE, not a formatting choice, and a\nsecond implementation of it in the browser is a second home for one fact (`MR0v`). The client sends\nthe keys it has ticked and renders the number this returns.\n\nWHY THE WHOLE FAMILY IS RETURNED EVEN WHEN NOTHING IS TICKED. The card needs every choice before a\nperson can make one, and `confidence` is `null` for a preset that has never been measured and was\nnever declared — **`null` means NOT KNOWN, never `0`**, so the surface can say \"not yet measured\"\ninstead of \"worthless\".","operationId":"list_tone_presets_route_api_v1_mail_tone_presets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"selected","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated preset keys currently ticked, so the cumulative value is computed by the ONE implementation of `min()` rather than re-derived in the client.","default":"","title":"Selected"},"description":"Comma-separated preset keys currently ticked, so the cumulative value is computed by the ONE implementation of `min()` rather than re-derived in the client."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["mail"],"summary":"Save Tone Presets Route","description":"SAVE the Tone Preset selection for this workspace (`D-138-022` clause (c): the ENTITY, never the user).\n\nWHY THE SLUGS AND NOT THE KEYS. A tick means \"this TONE\", and a tone is identified by its slug; which\nrow currently carries it is an implementation detail that changes the moment a private copy shadows a\nseed. A client sending keys would be sending yesterday's answer.\n\nNO NEW STORE: a preset IS a `BD120` kernel (clause (a)), so the selection is expressed as the private\nkernels this workspace owns and the assembly already attaches them. A selection table would be a second\nhome for one fact (`MR0v`) and would drift from what the prompt actually contains.\n\nA REFUSAL WRITES NOTHING (`rule 0c`): an unknown slug raises before any row is touched, and the message\nnames it. **NO COMMIT ON A FAILURE**: the session rolls back, so a bad request cannot leave a partial\nselection behind.","operationId":"save_tone_presets_route_api_v1_mail_tone_presets_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TonePresetSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/mailboxes":{"get":{"tags":["mail"],"summary":"List Mail Mailboxes","description":"The mailboxes this entity can read, in ONE uid space (D-133-018).\n\nA mailbox the engine cannot open yet is still LISTED, with `readable: false` and a reason.\nOmitting it would make the surface look complete when it is not (FTUE implication 11,\n\"channel-complete\"); showing it as an empty folder would claim it holds no mail.","operationId":"list_mail_mailboxes_api_v1_mail_mailboxes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/send":{"post":{"tags":["mail"],"summary":"Send Mail","description":"Send one mail from a managed mailbox — the door the reply composer was waiting for.\n\nWHY THIS EXISTS (PO 2026-09-21). The composer posted here and the surface answered *\"Sending is\nnot available for this backend yet\"* because this route did not exist — while the rail that can\nsend sat one call away: InboxKit hands us the mailbox's app-password, the same credential the\nIMAP reader logs in with. The PO's objection was exact (*\"we have our own connection to listmonk\nand inboxkit\"*), and the missing thing was the wiring, not the capability.\n\nREPLIES GO OVER SMTP, NOT LISTMONK: a reply must carry `In-Reply-To`/`References` so it lands in\nthe recipient's conversation and must leave a copy in the mailbox's own Sent folder. Those are\nproperties of a mail client, not of a campaign sender (see `smtp_sender`).\n\nTHE TWO HONEST REFUSALS, both named rather than obscure:\n  * a Google-account mailbox → `scope_not_granted` (409): reading works, answering waits on the\n    Gmail send permission;\n  * an unknown platform → `provider_send_unsupported` (501): no SMTP endpoint is derived, and\n    guessing a mail server is how a send disappears.","operationId":"send_mail_api_v1_mail_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/mail/threads":{"get":{"tags":["mail"],"summary":"List Mail Threads","description":"One folder of a mailbox — the engine's folder listing (`GET /api/v1/mail/threads`).\n\nMEASURED, then stored (PO 2026-09-21): this call took **3.0–3.4 s on every request** because it\nopened the provider (Gmail API or IMAP) live each time — `imap_reader`'s own docstring says it\n\"does not cache message bodies on disk\". The PO's reading was right (*\"are we not saving it on\nour db and pulling first from db ?\"*). First step was a short in-process listing cache; **the\ndurable half landed 2026-10-07** (`R-P2.16` / `D-138-011`): the folder now renders from\n`mail_folder_listings`, and the provider is read only on a miss or `refresh=1`.\n\nEVERY ANSWER SAYS WHERE IT CAME FROM: `cached` is whether we served a listing we already held —\nso `False` means the provider is being read for you right now, which is the honest loading signal\n— and `fetchedAt` is WHEN THE PROVIDER WAS ACTUALLY READ, never \"now\". A warm answer is therefore\nnever presented as a live one, and an empty folder can be told apart from an unread one.","operationId":"list_mail_threads_api_v1_mail_threads_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mailbox_uid","in":"query","required":true,"schema":{"type":"string","description":"Resolved uid: `google:<entity_id>` or a managed uid","title":"Mailbox Uid"},"description":"Resolved uid: `google:<entity_id>` or a managed uid"},{"name":"folder","in":"query","required":false,"schema":{"type":"string","description":"inbox | sent | drafts | archive | junk. `junk` was added 2026-09-28 for @P080 `D-132`: the receiving side's placement is health evidence, and a message filed as junk was previously unreadable — the folder exists on every workspace mailbox but no listing could ask for it.","default":"inbox","title":"Folder"},"description":"inbox | sent | drafts | archive | junk. `junk` was added 2026-09-28 for @P080 `D-132`: the receiving side's placement is health evidence, and a message filed as junk was previously unreadable — the folder exists on every workspace mailbox but no listing could ask for it."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider page cursor from the previous page","title":"Cursor"},"description":"Provider page cursor from the previous page"},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Bypass the listing cache. A person's own Refresh must re-read the provider.","default":false,"title":"Refresh"},"description":"Bypass the listing cache. A person's own Refresh must re-read the provider."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/threads/{thread_id}":{"get":{"tags":["mail"],"summary":"Get Mail Thread","description":"One thread with its messages — what the engine calls when a row is opened.\n\nTHE STORE ANSWERS FIRST (P237 `R2-4`). A message we have read once is kept in `mail_messages`, so\na second open is a database read instead of a provider round trip — a message body cannot have\nchanged. When the stored copy is older than the refresh window the provider is asked again\nBEHIND this answer, so the next open is current without this one waiting. Only a thread we hold\nnone of falls through to the provider in the request (its first open, which is what fills the\nstore).\n\n`source` NAMES WHICH ANSWERED (P237 `R2-18`). The PO's rule: every mail that passed through\nraisy is served from OUR database, and the provider is touched only to SYNC — a reader must\nnever wait on it for mail we already hold. That rule is only checkable if the answer says\nwhich side it came from: `store` (the milliseconds path) or `live` (a first open, the one\nslow read that fills the store — after which every open is `store`). The listing's `cached`\nflag already carries this honesty on the folder side; this is the same contract per thread.","operationId":"get_mail_thread_api_v1_mail_threads__thread_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mailbox_uid","in":"query","required":true,"schema":{"type":"string","title":"Mailbox Uid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/threads/{thread_id}/actions":{"post":{"tags":["mail"],"summary":"Apply Mail Thread Action","description":"Archive · unarchive · delete · mark read — the four buttons the surface already renders.\n\nWHY THIS EXISTS. `mailApi.threadAction` has posted here since the engine shipped, and the route\ndid not exist: every one of those controls answered *\"the mail actions endpoint is not deployed\non the backend\"*. Four visible controls that cannot act is the defect this product refuses to\nship, and it is the last missing verb of T1329's mailbox-management half (D-133-017 promised\nmark-read/archive/labels, and D-133-020 established that IMAP can express all of them).\n\nAUTH IS THE SAME AS THE READ, deliberately: `_open_mailbox` resolves the uid and refuses a\nmailbox the caller cannot read (a Google uid is checked against its own entity; a managed uid\nagainst the provisioning record, and an unclaimed one is served as shared). One rule for\nreading and writing the same mailbox — a second, weaker rule here is how a mail client lets you\nchange somebody else's mail.\n\nTHE LISTINGS ARE INVALIDATED ON EVERY WRITE, so the folder the user is looking at can never\nshow the state an action just changed (`listing.invalidate_mailbox` — BOTH stores, so the rule\nsurvives a restart: a durable listing that outlived the action would be worse than the 45-second\nprocess cache it replaced).","operationId":"apply_mail_thread_action_api_v1_mail_threads__thread_id__actions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/threads/{thread_id}/verdict":{"post":{"tags":["mail"],"summary":"Set Mail Thread Verdict","description":"Record a triage verdict for one thread — the door the *Move to Focused / Other* control posts to.\n\nWHY THIS EXISTS. The engine has rendered that control since 2026-09-16 and posted here, and the\nroute did not exist because its STORE did not: the surface's own rollback message said so —\n*\"The verdict store is not deployed yet — your correction was not saved\"*. A control whose\nanswer is always failure is the dead control this product refuses to ship, and the comment it\ncarries (the reason a rejection requires one at all) is worth nothing if a tab-correction\ncannot be saved.\n\nAPPEND-ONLY, and that is the design, not an accident of the write: a person's correction must\nnot delete the machine's verdict, because the disagreement between the two is exactly the\nsignal the learning loop consumes (D-133-012, and D-145-001 (5) — *\"judgment is never\ndestructive\"*). The newest row per thread is the verdict in force, and the history stays\nauditable — the same shape as the immutable kernel versions behind it (MR8).\n\nThe entity is recorded when one is RESOLVED for this mailbox, and left NULL when none is: a\nmanaged mailbox with no provisioning record is shared and belongs to no workspace (D-133-021),\nso attributing the verdict to the caller's current workspace would be a claim about ownership\nnobody has made.","operationId":"set_mail_thread_verdict_api_v1_mail_threads__thread_id__verdict_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailVerdictRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/prepared-items":{"post":{"tags":["mail"],"summary":"List Prepared Items","description":"THE DRAFTS FOLDER'S LIST — the prepared items a person decides on, and nothing else.\n\nWHY THIS EXISTS (2026-09-28, P133 T1302/T1340). The folder listed unevaluated root\n`bot_call_logs` rows through `/bot/call-history`, which is the ledger of WHICH BOT RAN. Measured\non DEV: of the 7,924 rows that read matches, 4,676 are `user_id=bot_creator` kernel-minting\nbatches, and ONE entity's folder would render 3,759 \"drafts\" of which exactly one was a draft\nwritten for a person. An item exists to BE DECIDED ON, so the item is what the folder shows — and\nit is the SAME set the attention dot counts (`prepared_item_service.awaiting_query`), which is\nwhat stops the number and the list from meaning two different things (the defect T1029 paid for).\n\nTHE DECISION DOES NOT MOVE. The surface still posts `evaluateCall(callId)` for a row, and every\nrow here carries `source_call_id` — the call the item came from — so that one verdict reaches the\nitem (`decide_by_source_call`) and withdraws it from this list. No second endpoint, no second\nwrite, and the learning loop keeps the record it already reads.","operationId":"list_prepared_items_api_v1_mail_prepared_items_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparedItemsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/mail/prepared-items/{item_id}/reprepare":{"post":{"tags":["mail"],"summary":"Reprepare Prepared Item","description":"Prepare ONE stale item again, against the kernels that are current now (P133 T1341 / MR31).\n\nONE ITEM PER ASK, and that is the cost rule rather than an API style: MR31 exists because a person's\ntokens must not be spent on drafts he never asked for again, so a folder read may only SAY that items\nare stale (`dependency_facts` on the page) and regeneration is asked for one item at a time. A page of\ntwenty items can never become twenty regenerations.\n\nNO GUARD IS INVENTED FOR A MAILBOX THAT HAS NONE. This surface's rule (D-133-021) is that a mailbox may\nbe unclaimed, and an unclaimed mailbox's work belongs to no workspace — so the entity guard runs when\nthe item names one and is skipped when it does not, exactly as the folder read beside it does.\n\nTHE REFUSALS ARE ANSWERS, NOT ERRORS: `nothing_moved` (nothing to do), `person_edited_it` (your words\nstand), `already_settled`, `cannot_tell`, `guard_refused` (the fresh draft did not pass the writer's\nchecks, so yours was left alone). Each carries a short code and a sentence, so the surface can say\nwhich one happened instead of showing a failed button.","operationId":"reprepare_prepared_item_api_v1_mail_prepared_items__item_id__reprepare_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/delegation":{"get":{"tags":["mail"],"summary":"Read Mail Delegation","description":"How much of the review this mailbox's workspace has delegated to the machine (P133 T1343 · MR22(8)).\n\nKEYED BY THE MAILBOX like every other route on this surface, and it resolves the owner itself — a\nsurface that had to know its own entity id would be a second place that knows what a mailbox is.\n\nREAD-ONLY, and it reports the ladder's own answer rather than re-deriving it — one setting drives every\nsurface, which is what MR22(8) asks for. `guards` names what no mode may override, so the surface can\nsay what still stands instead of implying the machine now does everything.","operationId":"read_mail_delegation_api_v1_mail_delegation_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mailbox_uid","in":"query","required":true,"schema":{"type":"string","title":"Mailbox Uid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["mail"],"summary":"Set Mail Delegation","description":"Choose how much of the review is delegated. Writes the workspace's EXISTING preference.\n\nNO NEW HOME AND NO NEW VOCABULARY: `entities.preferences.approval_mode` is where an entity's approval\ndefault already lives, and the four modes are the ladder's own — a mail-specific copy would be a second\nanswer to \"who approves this\", and the two would disagree the first time somebody changed one.\n\nA REFUSAL WRITES NOTHING: an unknown mode is refused rather than coerced, because a stored value nobody\nrecognises reads afterwards as a choice the owner made.","operationId":"set_mail_delegation_api_v1_mail_delegation_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailDelegationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/prepared-items/{item_id}/draft":{"post":{"tags":["mail"],"summary":"Draft Prepared Item","description":"Write the reply for ONE prepared item, as a logged call (P133 T1314).\n\nWHY THE CONVERSATION IS READ HERE. The writer owns prose, not mailboxes (`reply_writer`'s own\nheader says why), so this route — which already holds the mailbox and knows what a provider is —\nreads the thread and hands the conversation in.\n\nTHE STORE ANSWERS FIRST (P237 `R2-18`). This route is a READER too: \"Prepare it again\" re-reads\nthe same thread a person already opened once, and a message we hold in `mail_messages` is handed\nto the writer from there — milliseconds, the same speed as the review surface. Only a thread we\nhold none of falls through to the provider, and THAT read is kept on the way in (`save_thread`),\nso the pipeline fills the store instead of paying the live read twice. (R2-4's store existed\nsince 2026-10-01 but only the human's open filled it — the writer's read went around it, which\nis half of why a founder kept waiting seconds for mail raisy had already seen.)\n\nTHE REFUSALS ARE ANSWERS, NOT ERRORS. `needs_a_human` is the honest one: the answer depends on\nsomething only the owner knows, so the machine writes nothing rather than inventing it in his own\nvoice one click from being sent. The others say the item is already answered, already has a reply\nwritten, or is not waiting for an answer at all. Each carries a sentence the surface can show.","operationId":"draft_prepared_item_api_v1_mail_prepared_items__item_id__draft_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/prepared-items/{item_id}/edit":{"post":{"tags":["mail"],"summary":"Edit Prepared Item","description":"THE OWNER'S OWN WORDS — the artifact `R-P2.7` needs and the tree had no way to capture.\n\nWHY THIS ROUTE EXISTS (measured 2026-10-08, `D-138-018`). Before it, the surface could answer a\nprepared item three ways — `approved`, `rejected`, or \"draft it again\" — and **not one carried his\nwords**. So his correction was expressed as a rejection, and the learner received *\"wrong\"* where it\ncould have received *\"say it like this\"*. Three parts were missing and this route is the first: the\nstate `edited` was in `STATES` and `TRANSITIONS` and **no caller reached it**.\n\nTHE MACHINE'S ORIGINAL IS RECORDED BEFORE THE OVERWRITE, and the order inside the transaction is the\npoint rather than an implementation detail. `content` is what surfaces render, so his words have to\nland there — but the moment they do, the text the machine wrote exists nowhere else. Recording it as\nrevision 1 first is what makes *\"what he changed\"* computable at all; the reverse order loses it\nsilently and the code still looks correct (`D-138-018` option A).\n\nA SECOND EDIT APPENDS AND DOES NOT MOVE THE STATE, because the machine forbids the move and the\nrefusal is right. `TRANSITIONS['edited']` does not contain `edited` — a state does not transition to\nitself — and `edited` ALREADY MEANS \"he changed it, awaiting a decision\", so a further edit makes that\nstatement no less true. The revision row is the record; the state was never the thing being counted.\nRefusing the second edit instead would make the first typo unfixable, which is not what `edited` means.\n\nEVERYTHING LANDS IN ONE COMMIT. The revision and the state move together (`T1416`/`000040`'s lesson):\na crash between them would leave an item whose text changed with nothing saying why, or a state that\nclaims a change the record cannot show.\n\nTHE READER IS `T1381` AND IT IS HANDED THE ITEM, NOTHING ELSE. He saves his words; the lesson is\nassembled from the store by `mail_learning_service` and poured after the response. This route decides\nnothing about learning and reports only what the reader returned — see `teaches` below.","operationId":"edit_prepared_item_api_v1_mail_prepared_items__item_id__edit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailItemEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/prepared-items/review-minutes":{"get":{"tags":["mail"],"summary":"Read Review Minutes","description":"`P2 KPI 7` (`review_minutes_per_item`) — the ruling efficiency KPI, read from its own two edges.\n\nWHAT IT ANSWERS: how long a prepared item is in front of a person before he answers it — a mean over\nthe reviews that were OBSERVED, plus the count of every row it left out and why\n(`services/review_timing_service`). `minutes_per_item` is `null` until something is measurable, since\na zero would be the one reading that is definitely false on the day this ships.\n\n⚠️ THE START COMES FROM `draft_views`, AND THIS ROUTE IS WHERE THAT DECISION LIVES. The first version\nof this feature stamped a NEW column from a NEW `/open` door and was withdrawn (`D-138-017` is\nrefuted): `draft_views` already records the moment, first-view-wins, written by the shipped surface\nand reachable here by `source_call_id` — so a second door and a second column would have given one\nfact two homes (`MR0pv`) while nothing called the new door at all.\n\nTHE SCOPE DOORS ARE THE FOLDER'S OWN. Both scopes are permission-checked exactly as\n`list_prepared_items` checks them (`_open_mailbox`, `_require_entity_read`) and `union` carries the\nsame opt-in meaning, because the items measured and the items shown must be the same set — the\nT1029 defect, which this project has already paid for once.","operationId":"read_review_minutes_api_v1_mail_prepared_items_review_minutes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mailbox_uid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailbox Uid"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},{"name":"union","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Union"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/send-window":{"post":{"tags":["mail"],"summary":"Read Mail Send Window","description":"THE VISIBLE FENCE (P133 T1323) — when this mailbox may send, said out loud.\n\nWHY IT EXISTS. The gate already HELD a send outside its window (see\n`email_delivery_service._send_window_gate`), and a hold the person cannot see is indistinguishable\nfrom a send that silently failed — the \"hidden throttle\" this task forbids in those words.\nMeasured 2026-09-28: the frontend contained `send_window` exactly ONCE, in an unrelated comment,\nso the limit was real and the fence was invisible.\n\nIT READS THE SERVICE THE GATE READS — `send_window_service.verdict`, the entity's DECLARED\ntimezone, the compliance kernel's `limits.send_windows` — so the sentence a person reads and the\ndecision the send path makes cannot drift apart. This route decides NOTHING; it reports.","operationId":"read_mail_send_window_api_v1_mail_send_window_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailSendWindowRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/mail/triage":{"post":{"tags":["mail"],"summary":"Triage Mail Threads","description":"Judge the newest UNJUDGED threads — T1308's judging half, on demand.\n\nWHY ON DEMAND (2026-09-28). G2 (does InboxKit's webhook deliver inbound mail — event-driven or\npolled) had parked this task on the reasoning that triage needs an arrival EVENT. It does not: the\nread path already lists real threads, so the judge can be asked about what is already readable,\nand the webhook answer decides only whether triage ALSO runs on arrival. Two tasks sat behind one\nfact they only half depended on.\n\nWHICH BOT is fork 4, closed 2026-09-27 by construction: the reuse candidates take an investor\nRECORD and produce outbound mail, so the judge is `raisy_05711_mail_triage_judge` — built, pinned\nto this vocabulary, and proven on DEV.\n\nNO CACHE INVALIDATION, and that property is worth stating: verdicts are attached to listings on the\nway OUT (`_with_verdicts`), never stored inside them, so a verdict written here is visible to the\nvery next read even when that read is served from the listing cache.","operationId":"triage_mail_threads_api_v1_mail_triage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailTriageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/mail/threads/{thread_id}/draft":{"post":{"tags":["mail"],"summary":"Request A Draft","description":"Draft a reply the machine decided not to write — the door `R-P2.24`'s control posts to.\n\nWHY THIS EXISTS. Every other drafting path starts with the MACHINE deciding a draft is owed, which\nleaves the mail the judge classed `other` with no door at all. `T1413`: one action, a prepared item,\nand the override RECORDED so it teaches.\n\nIT IS A SEPARATE ROUTE FROM `/triage`, deliberately. `/triage` is a bounded pass over a folder — it\njudges and drafts what the machine chose. This is one person pointing at one mail and saying *\"write\nthis one\"*, and the two have different budgets, different bounds and different meanings. Folding them\ntogether would put a human's explicit request under a cost rule designed for automatic work.\n\nTHE BOUNDARY IS NOT HERE, IT IS IN `draft_override`: a structural refusal (`already_decided`,\n`not_a_reply_item`) is a fact about the object and is refused with its own word; the judge's own\nrefusal is an opinion the owner outranks. Keeping the rule out of the route is what lets it be tested\nwithout a token.","operationId":"request_a_draft_api_v1_mail_threads__thread_id__draft_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/mailboxes/{mailbox_uid}/owner":{"post":{"tags":["mail"],"summary":"Mailbox 2 Owner","description":"Say whose mailbox this is - the act that gives an address an owner.\n\nWHY THIS EXISTS (D-134-009). Ownership is READ everywhere and, until now, WRITTEN nowhere: a\nmailbox whose provisioning job finished after the person had left has no owner, and the only way\nto give it one was to buy it again. This is the write.\n\nTHE POSTURE IS FAIL-CLOSED ON EVERY PATH (D-134-012) - deliberately against the READ beside it,\nwhich SERVES a mailbox no record claims because nobody's data is behind it. A write that failed\nopen would CREATE the ambiguous state that read is careful about, so every refusal here writes\nNOTHING and says which of the five it is:\n\n  1. the uid is held by another workspace        -> 409 `mailbox_claimed`, naming the holder\n  2. we hold no record of the uid at all         -> 404 `no_mailbox`\n  3. the caller may not write the workspace      -> 403 `cross_entity`\n  4. the record could not be written             -> 502 `owner_write_failed`, rolled back\n  5. the workspace does not exist                -> 404 `unknown_entity`\n\nTHE CLAIM ALSO ATTRIBUTES WHAT WAS PREPARED BEFORE IT (P133 T1352 / D-133-036). An item prepared\nwhile this mailbox was unclaimed names no workspace - deliberately - and this act is where the\nworkspace becomes a fact: the item's own `entity_id` is filled from the binding recorded here, so\nthe work already waiting in the mailbox appears in the workspace's queue. The response says how\nmany items it brought (`items_attributed`), and a release (`owned=false`) attributes nothing,\nbecause which workspace an item was prepared for is part of that item's history.\n\nMoving a mailbox OUT from under the party holding it is NOT this call: that is the explicit\ntransfer act (D-134-010), and this refusal is what keeps a mailbox from being moved silently. A\nCONNECTED mailbox is refused as well - its owner is the connection that made it and its uid\ncarries the workspace, so there is nothing here to correct.\n\nONE TRANSACTION, so a half-applied owner cannot exist. The row carries `updated_at`, so the\nrecord of the change is the record it changed.","operationId":"mailbox_2_owner_api_v1_mail_mailboxes__mailbox_uid__owner_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mailbox_uid","in":"path","required":true,"schema":{"type":"string","title":"Mailbox Uid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxOwnerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/prepared-items/{item_id}/send":{"post":{"summary":"Send Prepared Item","description":"Send one approved/pending_send mail item now. The retry door — see the module docstring.","operationId":"send_prepared_item_api_v1_mail_prepared_items__item_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin/connect":{"post":{"tags":["linkedin"],"summary":"Linkedin Connect","description":"Return the LinkedIn OAuth authorization URL for the FE to navigate to.\nJSON (not redirect) because the Firebase bearer header can't ride a browser nav.","operationId":"linkedin_connect_api_v1_linkedin_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/linkedin/callback":{"get":{"tags":["linkedin"],"summary":"Linkedin Callback","description":"Bare LinkedIn redirect — no Firebase auth header. The signed `state` carries\nentity_id/uid (CSRF) and the target this connect asked for.\n\nPROJECT-066 T23: NOTHING in this handler may raise. `LinkedInOAuthCallbackPage.tsx` renders\nthe `reason` query param, so every exit is a redirect carrying a short machine code and the\ndetail goes to the log only. Before this change the vault write sat outside any try — a DB\nfailure escaped to `main.py`'s global handler as a raw 500 *after* LinkedIn had issued\ntokens, so the consent was spent and nothing was stored — and `reason=str(e)` put an\nexception's own text into the user's URL.","operationId":"linkedin_callback_api_v1_linkedin_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin/status":{"get":{"tags":["linkedin"],"summary":"Linkedin Status","operationId":"linkedin_status_api_v1_linkedin_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin/verify_credential":{"post":{"tags":["linkedin"],"summary":"Linkedin Verify Credential","description":"Check the stored LinkedIn credential NOW and report its status (T35 — the LinkedIn half\nof T19). Existence alone is not health: before this, a dead credential still read\n\"connected\" on the card, and the only way to find out was a failed publish.\n\nNever 500s: an unexpected failure answers `unchecked` rather than a stack trace, and an\nunreachable LinkedIn does NOT mark a working credential dead (T18's rule).","operationId":"linkedin_verify_credential_api_v1_linkedin_verify_credential_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInEntityIdRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/linkedin/disconnect":{"post":{"tags":["linkedin"],"summary":"Linkedin Disconnect","operationId":"linkedin_disconnect_api_v1_linkedin_disconnect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInEntityIdRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/linkedin/posts":{"post":{"tags":["linkedin"],"summary":"Linkedin Create Post","description":"Create + publish a LinkedIn post via the official Posts API, gated by the\napproval mode. Under a gate (SEMI_AUTO/MANUAL/default) the post is STAGED —\nLinkedIn is NOT called — and no post is published without explicit approval.","operationId":"linkedin_create_post_api_v1_linkedin_posts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInPublishRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/linkedin/posts/{post_urn}":{"get":{"tags":["linkedin"],"summary":"Linkedin Get Post","description":"Verify a post. Best-effort live read-back via the official API when the token has\nr_member_social (restricted/approval-only on LinkedIn); otherwise confirms via the\npublish-time record (LinkedIn 201 + x-restli-id) and returns the public feed URL.","operationId":"linkedin_get_post_api_v1_linkedin_posts__post_urn__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_urn","in":"path","required":true,"schema":{"type":"string","title":"Post Urn"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin/blog/publish-linkedin":{"post":{"tags":["linkedin"],"summary":"Linkedin Blog Publish","description":"Convenience: publish a blog entry to LinkedIn. The auto-draft bot (T0105) is not\nwired yet, so `commentary` is required from the caller. Gated exactly like /posts.","operationId":"linkedin_blog_publish_api_v1_linkedin_blog_publish_linkedin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInBlogPublishRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/linkedin-messaging/status":{"get":{"tags":["linkedin-messaging"],"summary":"Linkedin Messaging Status","description":"The card's read: is the engine up, is an account signed in, and which account?\n\nCosts one page load of the signed-in member's OWN profile — the engine's only tool that carries\n`readOnlyHint: True` for messaging-relevant state. It deliberately does NOT read the inbox: see\nthe adapter's read-marking note, where a status probe built on `get_inbox` would spend the\nperson's unread state to draw a pill.","operationId":"linkedin_messaging_status_api_v1_linkedin_messaging_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Re-ask the engine instead of serving the cached answer","default":false,"title":"Refresh"},"description":"Re-ask the engine instead of serving the cached answer"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin-messaging/summary":{"get":{"tags":["linkedin-messaging"],"summary":"Linkedin Messaging Summary","description":"The channel's state and its last known count — for any surface that is NOT the inbox (T0112).\n\n⚠️ The distinction this endpoint exists to make. `/conversations` DRAWS the list, and drawing it\nclick-visits up to `limit` rows in LinkedIn's own UI, marking them read in the person's account\n(D-205-012). So a surface that only wants to SAY something about this channel — a hub badge, a\nswitcher's dot, a \"3 conversations\" line, the page's own instant header — must not call\n`/conversations` to get its number.\n\nThis answers from what we already hold: the connection state (one page load of the signed-in\nmember's OWN profile — the engine's only `readOnlyHint` read for messaging state, which marks\nnothing) plus the count in this process's cache, if any. `count` is `null` with\n`count_reason: \"not_read_yet\"` when the inbox has not been read. The age travels with the number,\nbecause a stale count presented as current is the invented number this channel refuses (rule 0c).\n\nThe payload states `enumerates: false` and `read_marked: 0` as facts rather than leaving the\nreader to infer them from a docstring.","operationId":"linkedin_messaging_summary_api_v1_linkedin_messaging_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"The click budget whose LAST KNOWN count is reported. It only decides which cached count is read — this call never enumerates the inbox, so it never spends that budget.","default":20,"title":"Limit"},"description":"The click budget whose LAST KNOWN count is reported. It only decides which cached count is read — this call never enumerates the inbox, so it never spends that budget."},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Re-ask the connection state instead of the cached answer","default":false,"title":"Refresh"},"description":"Re-ask the connection state instead of the cached answer"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin-messaging/conversations":{"get":{"tags":["linkedin-messaging"],"summary":"Linkedin Messaging Conversations","description":"The conversation list, in ONE engine call (T0115's one-navigation reader).","operationId":"linkedin_messaging_conversations_api_v1_linkedin_messaging_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"How many conversations to load — and, because the engine click-visits each row to capture its thread id, how many threads this read may mark as read in LinkedIn.","default":20,"title":"Limit"},"description":"How many conversations to load — and, because the engine click-visits each row to capture its thread id, how many threads this read may mark as read in LinkedIn."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin-messaging/conversations/{thread_id}":{"get":{"tags":["linkedin-messaging"],"summary":"Linkedin Messaging Conversation","description":"One conversation, opened by its thread id — the path that never enumerates, so it marks\nnothing read. Called when a row is opened, never prefetched (D-205-011).","operationId":"linkedin_messaging_conversation_api_v1_linkedin_messaging_conversations__thread_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin-messaging/search":{"get":{"tags":["linkedin-messaging"],"summary":"Linkedin Messaging Search","description":"Search messages by keyword. Carries the same click budget as the list read, and says so.","operationId":"linkedin_messaging_search_api_v1_linkedin_messaging_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"keywords","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Keywords"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/linkedin-messaging/conversations/{thread_id}/prepare":{"post":{"tags":["linkedin-messaging"],"summary":"Linkedin Messaging Prepare","description":"Prepare a reply for one conversation — Layer 1, which is NEVER gated (P136 §16.6).\n\nPrepares; it does not send. The prepared item is a `bot_call_logs` row, so the surface reviews it\nwith the same accept/reject control the email lane uses and the verdict lands on that row — the\nlearning loop's label (D-205-005, T0104).\n\nReads the thread BY ID, so it opens a conversation rather than enumerating the inbox: preparing a\nreply must not mark anybody's threads read (D-205-012).","operationId":"linkedin_messaging_prepare_api_v1_linkedin_messaging_conversations__thread_id__prepare_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Scopes the logged call row and pulls in that entity's own kernels","title":"Entity Id"},"description":"Scopes the logged call row and pulls in that entity's own kernels"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api/v1/gill/run":{"post":{"tags":["gill"],"summary":"Api Gill Run","description":"Run full GILL loop on a bot.\nMode: full = assess + fix, assess = assess only, fix = apply previous assessment.","operationId":"api_gill_run_api_v1_api_v1_gill_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GILLRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gill/bot_2_verdict":{"post":{"tags":["gill"],"summary":"Api Gill Run","description":"Run full GILL loop on a bot.\nMode: full = assess + fix, assess = assess only, fix = apply previous assessment.","operationId":"api_gill_run_api_v1_api_v1_gill_bot_2_verdict_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GILLRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gill/assess":{"post":{"tags":["gill"],"summary":"Api Gill Assess","description":"Assess-only mode. Runs bot once and assesses output. No improvements.","operationId":"api_gill_assess_api_v1_api_v1_gill_assess_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GILLAssessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gill/verdict_2_kernel":{"post":{"tags":["gill"],"summary":"Api Gill Assess","description":"Assess-only mode. Runs bot once and assesses output. No improvements.","operationId":"api_gill_assess_api_v1_api_v1_gill_verdict_2_kernel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GILLAssessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gill/fix":{"post":{"tags":["gill"],"summary":"Api Gill Fix","description":"Fix mode. Apply a previous assessment to generate improved kernel content.","operationId":"api_gill_fix_api_v1_api_v1_gill_fix_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GILLFixRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gill/bot_2_assess_2_kernel":{"post":{"tags":["gill"],"summary":"Api Gill Fix","description":"Fix mode. Apply a previous assessment to generate improved kernel content.","operationId":"api_gill_fix_api_v1_api_v1_gill_bot_2_assess_2_kernel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GILLFixRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gill/assessors":{"get":{"tags":["gill"],"summary":"Api Gill Assessors","description":"List available assessors from the gill_assessor_schedule.","operationId":"api_gill_assessors_api_v1_api_v1_gill_assessors_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_key","in":"query","required":false,"schema":{"type":"string","default":"sp_default","title":"Schedule Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api/v1/gepa/evolve":{"post":{"tags":["gepa"],"summary":"Api Gepa Evolve","description":"Start a GEPA evolution run on a kernel.\nGenerates candidate variants, batch evaluates, Pareto selects, queues winner for review.","operationId":"api_gepa_evolve_api_v1_api_v1_gepa_evolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GEPAEvolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gepa/suite_2_evolved_kernels":{"post":{"tags":["gepa"],"summary":"Api Gepa Evolve","description":"Start a GEPA evolution run on a kernel.\nGenerates candidate variants, batch evaluates, Pareto selects, queues winner for review.","operationId":"api_gepa_evolve_api_v1_api_v1_gepa_suite_2_evolved_kernels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GEPAEvolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gepa/run/{run_id}":{"get":{"tags":["gepa"],"summary":"Api Gepa Run Status","description":"Check status of a GEPA evolution run.","operationId":"api_gepa_run_status_api_v1_api_v1_gepa_run__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api/v1/gepa/test-suite":{"post":{"tags":["gepa"],"summary":"Api Gepa Test Suite Upload","description":"Upload a golden test suite for a kernel.","operationId":"api_gepa_test_suite_upload_api_v1_api_v1_gepa_test_suite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GEPATestSuiteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api/v1/gepa/test-suite/{kernel_key}":{"get":{"tags":["gepa"],"summary":"Api Gepa Test Suite Get","description":"Get test suite for a kernel.","operationId":"api_gepa_test_suite_get_api_v1_api_v1_gepa_test_suite__kernel_key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernel_key","in":"path","required":true,"schema":{"type":"string","title":"Kernel Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api/v1/gepa/batch-eval":{"post":{"tags":["gepa"],"summary":"Api Gepa Batch Eval","description":"Manually run batch evaluation on kernel variants.","operationId":"api_gepa_batch_eval_api_v1_api_v1_gepa_batch_eval_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GEPABatchEvalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kpi/evaluate":{"post":{"tags":["kpi"],"summary":"Evaluate Kpi","description":"Evaluate a KPI formula from its D80_KPI kernel.\nResolves inputs, evaluates formula, computes delta, stores result.","operationId":"evaluate_kpi_api_v1_kpi_evaluate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KpiEvaluateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kpi_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kpi/data_2_measurement":{"post":{"tags":["kpi"],"summary":"Evaluate Kpi","description":"Evaluate a KPI formula from its D80_KPI kernel.\nResolves inputs, evaluates formula, computes delta, stores result.","operationId":"evaluate_kpi_api_v1_kpi_data_2_measurement_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KpiEvaluateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kpi/{entitykey}/dashboard":{"get":{"tags":["kpi"],"summary":"Get Dashboard","description":"Get KPI dashboard for an entity: current values, deltas, trends.","operationId":"get_dashboard_api_v1_kpi__entitykey__dashboard_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entitykey","in":"path","required":true,"schema":{"type":"string","title":"Entitykey"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d|90d)$","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kpi_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kpi/{entitykey}/history/{kpi_key}":{"get":{"tags":["kpi"],"summary":"Get History","description":"Get time-series history for one KPI.\n\nT0172: the path value may name a CLASS (`reply_rate`) as before, or one of its\nchannel-specific spellings (`Email Reply Rate`) from before `T0170` — both resolve\nto the same set of rows, because the class is read through `kernel_id` and the old\nlabels map at read time, never by rewriting a record (`@P105` D-014 / `T0189`).\nEvery returned row states its own `class` and `channel`, so one metric is now\nreadable **per channel** instead of only in total.","operationId":"get_history_api_v1_kpi__entitykey__history__kpi_key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entitykey","in":"path","required":true,"schema":{"type":"string","title":"Entitykey"}},{"name":"kpi_key","in":"path","required":true,"schema":{"type":"string","title":"Kpi Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The channel the row MEASURED, in the register's own app vocabulary (`BD195_Channel`: EMAIL / WHATSAPP / LINKEDIN / …). Narrows the class's series to one channel. Omitting it returns the class across every channel, each row still stating its own `channel` and `label`, so the two are never summed into one line. An unknown value is refused (422, `code: unknown_kpi_channel`).","title":"Channel"},"description":"The channel the row MEASURED, in the register's own app vocabulary (`BD195_Channel`: EMAIL / WHATSAPP / LINKEDIN / …). Narrows the class's series to one channel. Omitting it returns the class across every channel, each row still stating its own `channel` and `label`, so the two are never summed into one line. An unknown value is refused (422, `code: unknown_kpi_channel`)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kpi_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kpi/{entitykey}/aggregate":{"get":{"tags":["kpi"],"summary":"Aggregate Kpi","description":"Aggregate process KPIs up to entity KPI.\nPer MR13: \"Entity KPIs are aggregated from process KPIs — never defined separately by hand.\"\n\nT0172: `channel` narrows the aggregate to one MR29 class. **Aggregating ACROSS\nchannels is not offered here on purpose** — a `sum`/`avg` over two channels blends\ntheir units (the PO's own example: a reply in seconds with a reply in days), and the\nonly legal cross-channel figure is \"% within each channel's own SLA\", which is a\nproperty of the measure and lands with T0188. An unknown channel is a 422, never an\nempty success.","operationId":"aggregate_kpi_api_v1_kpi__entitykey__aggregate_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entitykey","in":"path","required":true,"schema":{"type":"string","title":"Entitykey"}},{"name":"kpi_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to specific KPI key","title":"Kpi Key"},"description":"Filter to specific KPI key"},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The channel to aggregate, in the register's own app vocabulary (`BD195_Channel`: EMAIL / WHATSAPP / …), not the MR29 class. Omitting it aggregates across channels.","title":"Channel"},"description":"The channel to aggregate, in the register's own app vocabulary (`BD195_Channel`: EMAIL / WHATSAPP / …), not the MR29 class. Omitting it aggregates across channels."},{"name":"agg","in":"query","required":false,"schema":{"type":"string","pattern":"^(sum|avg|count|min|max)$","default":"sum","title":"Agg"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d|90d)$","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kpi_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kpi/health/report":{"post":{"tags":["kpi"],"summary":"Health Report","description":"T038's unblocked half: the health FINDINGS for one entity's KPI dimension, readable by the\n(future) n8n workflow or any internal alerting service.\n\nTHIS ROUTE READS AND REPORTS — IT NEVER SENDS. Turning findings into an email or a Slack\nmessage is `T038`'s blocked remainder: the n8n container is not running, and the delivery\nchannels (admin address, Slack webhook) are PO-held configuration. A route that judged AND\nsent would be an alert channel nothing can switch off.\n\nThe response is `health_findings`' output — counts for every state, findings worst-first,\neach with its reason — scoped to this entity through the same definition resolution the\ndashboard reads, fed the facts the layer already holds (definition shape via `T040`'s guard,\nproducer presence, live rows, the caller-stated staleness window, target/direction from the\nnewest row). The route invents no verdict of its own.\n\nERRORS, by this file's conventions:\n- **401** — missing/invalid token, refused by `validate_service_or_user_token` BEFORE the\n  handler runs. SP Rule 9's unauthorized-access path is carried by the dependency, exactly\n  as on every sibling route — this route adds no auth logic of its own.\n- **404** — unknown entitykey, the same honest treatment the dashboard route gives it.\n- **422** — a body that is not a health report request (missing `entitykey`, or a window\n  that is not an integer ≥ 1).","operationId":"health_report_api_v1_kpi_health_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KpiHealthReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__kpi_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/entities/{entity_id}/ideas":{"post":{"tags":["ideas"],"summary":"Submit Idea","description":"Submit an idea for an entity. Classifies it and creates a draft Process.\nReturns 202-Accepted + process_id handle.","operationId":"submit_idea_api_v1_entities__entity_id__ideas_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitIdeaRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitIdeaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ideas/{process_id}":{"get":{"tags":["ideas"],"summary":"Get Idea","description":"Get idea classification result via its underlying process.","operationId":"get_idea_api_v1_ideas__process_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ideas/{process_id}/proposals":{"get":{"tags":["ideas"],"summary":"Get Proposals","description":"Get asset-mode candidate deliverables (Forward Proposer output).","operationId":"get_proposals_api_v1_ideas__process_id__proposals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ideas/{process_id}/select":{"post":{"tags":["ideas"],"summary":"Select Proposals","description":"User picks which proposed deliverables to build.","operationId":"select_proposals_api_v1_ideas__process_id__select_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectProposalsRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/ideas/{process_id}/construct":{"post":{"tags":["ideas"],"summary":"Construct From Idea","description":"Run full construction pipeline on a classified idea.\nReturns process_id for polling.","operationId":"construct_from_idea_api_v1_entities__entity_id__ideas__process_id__construct_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/idea_2_assess_2_x":{"post":{"tags":["ideas"],"summary":"Idea To Assess To X","description":"Universal pragmatic idea intake (PROJECT-052 + PROJECT-080 alignment).\n\nThe user has an idea but does not declare whether the output should be a\ndeliverable proposal, a process, or a bot. We assess internally, then default\nto building a process around the idea. Ambiguous or asset classifications are\nlogged in process metadata but do NOT block construction — a process is the\nmost useful default output.\n\nReturns 202 Accepted + process_id/call_id for polling via /jobs/{process_id}.","operationId":"idea_to_assess_to_x_api_v1_entities__entity_id__idea_2_assess_2_x_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConstructProcessRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{process_id}":{"get":{"tags":["ideas"],"summary":"Get Job Status","description":"Poll latest construction call status for the idea process.","operationId":"get_job_status_api_v1_jobs__process_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processes/{process_id}/webhooks":{"post":{"tags":["ideas"],"summary":"Register Webhook","description":"Register a callback URL for construction events on a process.","operationId":"register_webhook_api_v1_processes__process_id__webhooks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRegistrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processes/{process_id}/draft":{"get":{"tags":["ideas"],"summary":"Get Process Draft","description":"Review constructed process tree before approval (MR0 gate).","operationId":"get_process_draft_api_v1_processes__process_id__draft_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processes/{process_id}/adjust":{"post":{"tags":["ideas"],"summary":"Adjust Process","description":"Amend a node — triggers partial re-construction of affected sub-tree only.","operationId":"adjust_process_api_v1_processes__process_id__adjust_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustProcessRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/processes/{process_id}/approve":{"post":{"tags":["ideas"],"summary":"Approve Process","description":"MR0 approval gate. Approve → persist process as active.\nReject → keep as draft or archive.","operationId":"approve_process_api_v1_processes__process_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"process_id","in":"path","required":true,"schema":{"type":"string","title":"Process Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveProcessRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skill-callback/{provider_slug}/{raisy_job_id}":{"post":{"tags":["skill-callback"],"summary":"Receive Skill Callback","description":"Inbound webhook from GlowTest (or any provider) on every job state transition.","operationId":"receive_skill_callback_api_v1_skill_callback__provider_slug___raisy_job_id__post","parameters":[{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}},{"name":"raisy_job_id","in":"path","required":true,"schema":{"type":"string","title":"Raisy Job Id"}},{"name":"x-raisy-callback-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Raisy-Callback-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillCallbackPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skill-run/traced":{"post":{"tags":["skill-run"],"summary":"Run Skill Traced Endpoint","description":"Execute a local UV skill and return the full setup → build → run trace.\n\nNever raises 500 — all errors are captured in the trace's stage status fields\nand overall_status. The caller can render each stage independently.\n\nT0413: the run is ALSO recorded to `bot_call_logs` (see `services.skill_run_history`),\nwhich is what makes the next run preloadable. That write is best-effort by design — a\nhistory row is worth far less than the run the operator just waited for, so its failure\nis loud in the log and invisible here.","operationId":"run_skill_traced_endpoint_api_v1_skill_run_traced_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRunTrace"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/skill-run/history":{"post":{"tags":["skill-run"],"summary":"Get Skill Run History","description":"Runs of a skill, newest first, scoped to what the caller may read.\n\nScope rule and the measurement behind it: `services.skill_run_history` module docstring.\nA non-admin sees runs of entities they can open **plus their own runs** — the second\nbranch is what makes these rows visible at all, because every BD155 skill kernel in the\ndeployment is global (`entity_id = NULL`), so an entity-only rule returns an empty list\nto every plain caller while looking perfectly healthy.\n\n`lastInput` is returned when `skill_key` is given: the caller's own most recent input for\nthat skill, which is what the run form preloads (T0412's pairing with T0413). One\nrequest rather than two, because the modal always wants both.","operationId":"get_skill_run_history_api_v1_skill_run_history_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRunHistoryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Skill Run History Api V1 Skill Run History Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/room/{hermes_session_id}/memory":{"get":{"tags":["room-ws"],"summary":"Room Memory","operationId":"room_memory_api_v1_room__hermes_session_id__memory_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hermes_session_id","in":"path","required":true,"schema":{"type":"string","title":"Hermes Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/room/open":{"post":{"tags":["room-ws"],"summary":"Room Open","description":"Open a room and hand the browser the id its socket needs.\n\nWHY THIS EXISTS: the shell MINTS the ``hermes_session_id``, and the shell is\nintranet-only (T0402) — the browser cannot reach it. This is the HTTP half of\nthe same idea the WebSocket broker is the socket half of: the browser's only\npath to the shell. Without it the broker is unreachable, because nothing else\nin raisy_BE asks the shell to open a session.\n\nTHE CALLER'S OWN TOKEN IS FORWARDED, NEVER THE SERVICE TOKEN (D-052). The\nshell resolves the entity by calling raisy_BE's ``/harness/session/open`` WITH\nTHAT CREDENTIAL and binds the agent to what comes back. Substituting the\nservice token here would open every room as the service account and silently\ngive every caller the same scope — exactly the defect D-052 closed.\n\nThis endpoint therefore decides NOTHING about authorization. It carries the\ncredential and returns the id. ONE authority (the shell + /harness/session/open),\nnot two — a second opinion about scope is a second bug surface.","operationId":"room_open_api_v1_room_open_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomOpenRequest"}}},"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/room/list":{"post":{"tags":["room"],"summary":"List Rooms","description":"Every room this company has, Chief of Staff Room first.\n\nEnsures before it reads: the Chief of Staff Room and one room per non-archived\nprocess exist as records, so the answer is derived from the company's OWN record and\nnever from a hardcoded menu. A company with no processes honestly returns exactly one\nroom — that is the correct answer, not an empty screen.","operationId":"list_rooms_api_v1_room_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomListRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/room/{room_id}":{"get":{"tags":["room"],"summary":"Get Room","description":"One room, with the sessions that have happened in it.","operationId":"get_room_api_v1_room__room_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/room/{room_id}/transcript":{"get":{"tags":["room"],"summary":"Room Transcript","description":"What was SAID in this room — the last sitting, oldest line first.\n\nWHY THIS EXISTS (PO, 2026-09-21): *\"if i reenter /harness/room, then all chat is gone.\"*\nIt was gone, and for two structural reasons — neither of them the socket:\n\n  1. **Every visit is a NEW sitting.** The shell mints a fresh ``hermes_session_id`` on\n     every ``POST /session/open`` (``raisy_shell/server.py``, ``uuid.uuid4()``) and its\n     agent slot is created there, so nothing can *reattach* to the previous sitting.\n     The room is the place that outlives it (`000019_rooms`, D-136-043: a room holds\n     state, never memory).\n  2. **The conversation had no browser-readable route at all.** The turns are readable\n     only by ``/hermes/session/{id}/turns``, a SERVICE-token route, so the FE could read\n     the room's memory receipts (``/room/{id}/memory``) and never the words around them.\n     The room forgot what it said while the record still held it.\n\nSo this returns the record's own words for the room's most recent sitting, plus WHICH\nsitting they belong to — so the surface can say what it is showing instead of leaving the\nperson to conclude the conversation never happened.\n\nONLY TEXT IS EXPOSED (role · content · when) plus the audit link. ``call_id`` was\ndeliberately left out while nothing filled it (@P127 T112) — an always-null field in an\nAPI is an invitation to read a false fact. **Something fills it now** (the governed door,\nT112/T113): it is the `bot_call_logs` row that produced this answer, and it is exposed\nfor exactly the reason it was withheld — a reader must be able to tell an AUDITED turn\nfrom an unaudited one, and a NULL here is that fact rather than a missing field.","operationId":"room_transcript_api_v1_room__room_id__transcript_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":60,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/room/{room_id}/state":{"put":{"tags":["room"],"summary":"Set Room State","description":"Set a room's state — the one thing a room owns rather than remembers (D-136-043).","operationId":"set_room_state_api_v1_room__room_id__state_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/room/{room_id}/queue":{"get":{"tags":["room"],"summary":"Get Room Queue","description":"This room's Decide queue: the platform's gate lane, scoped by the room.\n\nThe Chief of Staff Room sees the whole company's gate; a process room sees its own\nprocess's items. Same rows and same code as `/harness/decide-queue` — the room's queue\nis that queue at a different altitude, never a second implementation (MR0v).","operationId":"get_room_queue_api_v1_room__room_id__queue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/room/validate-session":{"post":{"tags":["room"],"summary":"Validate Room Session","description":"P223 T0201 — validate a room's shell session at the AUDIO edge and return its entity.\n\nWHY THIS EXISTS. The room broker (`room_ws.py`) authorises a browser socket against the\nsession's entity at connect. The voice path (P223 D-223-003 F1-b) opens a SECOND socket\ndirectly to the raisy_com pipeline, which is a different service and cannot reuse the\nbroker's in-process gate. This endpoint is that gate, exposed: raisy_com calls it ONCE at\nsession bind with the room's `hermes_session_id` + the caller's OWN token, and it answers\nthe SAME question the broker answers — \"may this caller drive this session, and which\nentity does it belong to?\" — using the SAME authority (`_authorize_session`), so the audio\nedge passes the identical gate as the browser (D-052: entity resolved server-side, never\nclient-named; a voice socket without a bound entity refuses 403, never guesses).\n\nThe token is validated (Firebase JWT / service token) and then checked against the session\nexactly as the broker does: a service caller may, a user must be able to READ the session's\nentity (`can_read_entity`, the PROJECT-058 IDOR guard).","operationId":"validate_room_session_api_v1_room_validate_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ingest/from-source":{"post":{"tags":["ingest"],"summary":"Ingest From Source","description":"Ingest raw markdown/text and allocate/classify/store reusable patterns.","operationId":"ingest_from_source_api_v1_ingest_from_source_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFromSourceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ingest/source_2_patterns":{"post":{"tags":["ingest"],"summary":"Ingest From Source","description":"Ingest raw markdown/text and allocate/classify/store reusable patterns.","operationId":"ingest_from_source_api_v1_ingest_source_2_patterns_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFromSourceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ingest/upload-file":{"post":{"tags":["ingest"],"summary":"Ingest Upload File","description":"Upload a file, store the original in S3, extract text, and run the ingest pipeline\nin the background. Returns immediately with an ingestion_id for polling/streaming.","operationId":"ingest_upload_file_api_v1_ingest_upload_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_upload_file_api_v1_ingest_upload_file_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ingest/link_2_patterns":{"post":{"tags":["ingest"],"summary":"Ingest Link","description":"Turn a LINK into material and open the same ingestion job a file upload opens.\n\nPROJECT-201 / D-201-001, extended by D-201-006 and D-201-011: ANY link is accepted. The resolver is\nchosen by the link's own host, and a host without a bespoke resolver goes through the LADDER — the\nmedia engine, then the page's own words — so \"we never asked\" is no longer an answer anyone meets.\nWhen both come back empty the state names what each engine tried. A post we cannot reach says so and\nnames the next step. Nothing here logs in anywhere — no credential is ever held.","operationId":"ingest_link_api_v1_ingest_link_2_patterns_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ingest/job/{job_id}/approve":{"post":{"tags":["ingest"],"summary":"Approve Ingest Job","description":"THE GO — build the chain that was previewed, and nothing else (T0265 / D-201-023).\n\nMinting from the plan the person approved — never a second planner call — is what makes the\npreview TRUE rather than indicative: an LLM asked twice can answer differently, and a preview\nthat drifts from its result is worse than no preview at all.\n\nRefuses honestly (409) when the job is not waiting for a go, which is also what stops a second\nclick from building the same chain twice.","operationId":"approve_ingest_job_api_v1_ingest_job__job_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"auto_approve","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Auto Approve"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/job/{job_id}/discard":{"post":{"tags":["ingest"],"summary":"Discard Ingest Job","description":"THE NO — end the job having minted nothing, and say so in the job's own record.\n\nA gate with no \"no\" is not a gate. The job ends `completed` rather than `failed` because\nnothing went wrong: a person declining to build is a normal end, and `failed` would put it in\nthe error paths.","operationId":"discard_ingest_job_api_v1_ingest_job__job_id__discard_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/job/{job_id}/another-go":{"post":{"tags":["ingest"],"summary":"Another Go On Ingest Job","description":"ANOTHER GO — run a source you already brought, again (T0266, capability rows #10 and #11).\n\nTWO SHAPES, because a source can be stuck in two different ways, and THE JOB ITSELF says which:\n\n  - IT HOLDS THE WORDS (rows #10). The common case and the cheap one: a chain you set aside at\n    the preview gate, a run that minted nothing, or the same source at a higher tier. Nothing\n    is re-downloaded and nothing is re-uploaded — the words never went away.\n  - IT HOLDS ONLY A LINK (row #11). The read itself never landed — a host that would not answer,\n    a wall, a deadline. Then the address is what we have, so the LINK DOOR is opened again with\n    it: the same route, the same ladder, the same deadline, no second implementation to drift.\n\nA job with NEITHER is refused and told what is missing, because \"try again\" over nothing is a\nbutton that cannot work.\n\nA NEW job is opened rather than the old one re-run: the first run's chain, result and logs are\nthe record of what happened, and re-running in place would overwrite the only thing that says so.","operationId":"another_go_on_ingest_job_api_v1_ingest_job__job_id__another_go_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"model_tier","in":"query","required":false,"schema":{"type":"string","default":"fast","title":"Model Tier"}},{"name":"preview","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Preview"}},{"name":"auto_approve","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Auto Approve"}},{"name":"source_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/job/{job_id}":{"get":{"tags":["ingest"],"summary":"Get Ingest Job","description":"Poll ingestion progress and artifacts.","operationId":"get_ingest_job_api_v1_ingest_job__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/job/{job_id}/stream":{"get":{"tags":["ingest"],"summary":"Ingest Job Stream","description":"Server-Sent Events stream of ingestion progress.","operationId":"ingest_job_stream_api_v1_ingest_job__job_id__stream_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/sources":{"get":{"tags":["ingest"],"summary":"List Uploaded Sources","description":"List uploaded primary sources.","operationId":"list_uploaded_sources_api_v1_ingest_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__source_ingest_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/sources/{source_id}/download":{"get":{"tags":["ingest"],"summary":"Download Uploaded Source","description":"Redirect to a fresh presigned download URL for the original file.","operationId":"download_uploaded_source_api_v1_ingest_sources__source_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/benchmark/generate-sp":{"post":{"tags":["benchmark"],"summary":"Generate System Prompt","description":"Generate a system prompt from a meta-prompt + task X.","operationId":"generate_system_prompt_api_v1_benchmark_generate_sp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSPResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/benchmark/raisy-vs-baseline":{"post":{"tags":["benchmark"],"summary":"Benchmark Raisy Vs Baseline","description":"Compare a Raisy bot against a direct LLM baseline on the same task.\nThe same `model` is pinned in both arms (ceteris paribus).","operationId":"benchmark_raisy_vs_baseline_api_v1_benchmark_raisy_vs_baseline_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/benchmark/setup-run":{"post":{"tags":["benchmark"],"summary":"Benchmark Setup Run","description":"T0900 — write a COMPLETED setup run as benchmark records, ONE PER RUNG.\n\nThe run is read from its own two tables (never from a log), and the mapper above is pure, so\nthe same rows always produce the same records. `write: false` answers the records without\nappending them — the rehearsal path for a reader who wants to see before recording.","operationId":"benchmark_setup_run_api_v1_benchmark_setup_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupRunBenchmarkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupRunBenchmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/email/click":{"get":{"tags":["email"],"summary":"Click Redirect","description":"project092 T0220 — PUBLIC click redirect.\n\nThe recipient clicks a link in their email; we record the click on the send's own\n`communications` row and bounce them to where they meant to go. NO auth: the person clicking is\nthe recipient, not a Raisy user.\n\nTHE SIGNATURE IS THE WHOLE SECURITY MODEL. The token is verified before anything is recorded or\nredirected, so a forged `?t=` cannot turn our domain into an open redirect (`D-012`, and the\nTHREAT_MODEL rule it cites). An unverifiable token gets a plain 404 — never a redirect.\n\n`status_code=307` is deliberate: the destination is meant to be reached the same way it was\nasked for, and 307 preserves the method across the hop instead of letting a client downgrade it.","operationId":"click_redirect_api_v1_email_click_get","parameters":[{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/email/unsubscribe":{"get":{"tags":["email"],"summary":"Unsubscribe Landing","description":"P093 D-075 — PUBLIC opt-out landing.\n\nThe recipient clicks this from their email. Records the opt-out for the token's\nrecipient (idempotent) and confirms in plain language. NO auth: the person clicking\nis the recipient, not a Raisy user. The unguessable token scopes the write to its\nown recipient — no address appears in the URL.","operationId":"unsubscribe_landing_api_v1_email_unsubscribe_get","parameters":[{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/email/send":{"post":{"tags":["email"],"summary":"Send Email","description":"Send one outbound email through Listmonk.\n\nThe compliance gate runs first. A `Communication` row is always created,\neven if the send is blocked or Listmonk is not configured, so the attempt\nis auditable.","operationId":"send_email_api_v1_email_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/email/compliance/check":{"post":{"tags":["email"],"summary":"Check Compliance","description":"Check whether a send would pass the compliance gate without sending.","operationId":"check_compliance_api_v1_email_compliance_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/email/warmup/status":{"get":{"tags":["email"],"summary":"Warmup Status","description":"P093 T0100 — where one sending identity stands against the D-044 warm-up limits.\n\nThe read side of the send-time gate: the identity's warm-up day, today's\nallowance vs what it has actually sent (counted from the `communications`\nledger), the date cold outreach opens, and the reliability counters the\nthresholds are compared against. @P120 renders this per mailbox.","operationId":"warmup_status_api_v1_email_warmup_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from_address","in":"query","required":true,"schema":{"type":"string","title":"From Address"}},{"name":"use_case","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"}},{"name":"content_class","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Class"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/email/events":{"post":{"tags":["email"],"summary":"Record Delivery Event","description":"Record one bounce or complaint against the send it belongs to.\n\nThe push half of the return path: a provider webhook, or an operator acting on a report\na person read. Idempotent per (send, kind, code) — replaying a webhook cannot move a\ncounter twice. A report for an address we never mailed is still recorded, and the\nanswer says `matched_send: false` rather than pretending it was attached.","operationId":"record_delivery_event_api_v1_email_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/email/delivery-scan":{"post":{"tags":["email"],"summary":"Run Delivery Scan","description":"Read one sending mailbox for DSNs and abuse reports, and record what it holds.\n\nThis is what ARMS the two dormant reliability rules: the run writes a `delivery_scan`\nrow, and the gate reads that row to decide whether a zero is a measurement or an\nabsence of one. A mailbox we cannot resolve is answered as such (`no mailbox to read`)\n— never as a scan that found nothing.","operationId":"run_delivery_scan_api_v1_email_delivery_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/email/compliance/countries":{"get":{"tags":["email"],"summary":"List Compliance Countries","description":"List the jurisdictions in the email compliance registry.","operationId":"list_compliance_countries_api_v1_email_compliance_countries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/send":{"post":{"tags":["investor-outreach"],"summary":"Send Investor Outreach","description":"Send the BD196 ask-for-advice template to the selected investors.\n\nE8 (project091 D-061): the number of REACHOUTS is governed by the payer's\ncredit balance — each real (non-dry-run) reachout debits 1 credit from the\ncanonical person Entity (D-057). `limit` is a per-request safety ceiling only;\nthe real limiter is the credit reserve (402 + upgrade prompt when short).\nService-token (internal) callers have no person entity and bypass the gate.\n\nGlobal mode: pass `investor_entity_ids` from /candidates; no owner_entity_id\nor relationship rows required. Legacy mode: pass `owner_entity_id` to use\nactive investor relationships.\n\nRequires:\n  - migration 108 (communications table)\n  - migration 109 (email compliance registry)\n  - migration 110 (BD196 template kernel)\n  - Listmonk configured in config.py / secrets (real sends only)","operationId":"send_investor_outreach_api_v1_investor_outreach_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorOutreachSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/candidates":{"get":{"tags":["investor-outreach"],"summary":"List Investor Candidates","description":"Return ranked investor candidates for the outreach campaign.\n\nIf owner_entity_id is provided, ranks active investor relationships for that owner\n(legacy mode). Otherwise ranks all imported investor entities in the global funnel.\n\nLoads the latest BD90.6 runtime kernel per investor, runs the deterministic fit\nscorer, and returns the top N.","operationId":"list_investor_candidates_api_v1_investor_outreach_candidates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner_entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional: legacy relationship-aware mode","title":"Owner Entity Id"},"description":"Optional: legacy relationship-aware mode"},{"name":"raising_stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company raising stage, e.g. seed, Series A","title":"Raising Stage"},"description":"Company raising stage, e.g. seed, Series A"},{"name":"sector","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company sector, e.g. SaaS, fintech","title":"Sector"},"description":"Company sector, e.g. SaaS, fintech"},{"name":"target_geography","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Target geography (soft scoring signal), e.g. Europe, US","title":"Target Geography"},"description":"Target geography (soft scoring signal), e.g. Europe, US"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hard filter: investor region/continent, e.g. Europe, Asia","title":"Region"},"description":"Hard filter: investor region/continent, e.g. Europe, Asia"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hard filter: investor country, e.g. Germany, Singapore","title":"Country"},"description":"Hard filter: investor country, e.g. Germany, Singapore"},{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hard filter: keyword match against investor sector/focus (free text)","title":"Focus"},"description":"Hard filter: keyword match against investor sector/focus (free text)"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hard filter: case-insensitive substring match on investor firm name","title":"Name"},"description":"Hard filter: case-insensitive substring match on investor firm name"},{"name":"min_data_quality","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"description":"Hard filter: drop investors below this data-quality score","title":"Min Data Quality"},"description":"Hard filter: drop investors below this data-quality score"},{"name":"raising_amount","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Raising amount, e.g. $500k, $2M","title":"Raising Amount"},"description":"Raising amount, e.g. $500k, $2M"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max candidates to return","default":10,"title":"Limit"},"description":"Max candidates to return"},{"name":"min_email_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by email status: verified, accept_all, unverified, unknown","title":"Min Email Status"},"description":"Filter by email status: verified, accept_all, unverified, unknown"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/pool-stats":{"get":{"tags":["investor-outreach"],"summary":"Investor Pool Stats","description":"Lightweight funnel stats over the imported investor database (PROJECT-080/090).\n\nReturns the total number of investor entities in Raisy plus a region/country\nbreakdown (read from each investor's BD90.6 runtime kernel). The FTUE wizard\nuses this to show the user the funnel — \"a massive list, narrowed by geography\nand stage, then you review the top ranked\" — instead of a blank form.","operationId":"investor_pool_stats_api_v1_investor_outreach_pool_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/raise-profile":{"get":{"tags":["investor-outreach"],"summary":"Get Raise Profile","description":"Restore the declared raise round for a company (D-074).\n\nReads the entity's newest BD90.6 \"Raise Profile Runtime Data\" kernel — the\nMR0w.1 single source of truth written by /api/v1/entity/update — and returns\nit as the declared round: {raising_stage, raising_amount, check_size, sector,\ntarget_geography, region, country}. For a Firebase (non-service) caller it also\nmerges the legacy per-user preferences-bag keys so profiles saved before D-074\nstill restore. Empty object = nothing declared yet (first visit must declare).","operationId":"get_raise_profile_api_v1_investor_outreach_raise_profile_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","description":"The raising company's entity_id","title":"Entity Id"},"description":"The raising company's entity_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/campaigns":{"get":{"tags":["investor-outreach"],"summary":"List Campaigns","description":"Owner-scoped campaign list for the founder hub (MR23 / D-090/091/092).\n\nReturns every Campaign (identity/lifecycle spine) for the entities the caller\nowns/edits, newest declared first, plus each campaign's honest reachout count\n(MR20) and, for `equity` campaigns, the entity's declared raise profile (read\nfrom the BD90.6 raise-profile kernel, as `/raise-profile` does) so the hub card\ncan render round + amount without a per-campaign kernel yet.\n\nScope: Firebase caller → active entity_permissions (owner/editor); explicit\n`entity_id` narrows to that entity. Service token without `entity_id` → 400\n(no cross-tenant enumeration).","operationId":"list_campaigns_api_v1_investor_outreach_campaigns_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Explicit owning-entity scope; default = all entities this user owns/edits (MR23 founder hub)","title":"Entity Id"},"description":"Explicit owning-entity scope; default = all entities this user owns/edits (MR23 founder hub)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/campaign/{campaign_id}/deck":{"post":{"tags":["investor-outreach"],"summary":"Post Campaign Deck","description":"@P279 T0200 — give the raise its deck.\n\nTWO CALLS, ON PURPOSE, AND THEY ARE DIFFERENT JOBS. The FILE is uploaded through\n`POST /investor-outreach/attachment` (@P092 T0211), which owns the bytes, the S3 store and the\nMIME/size allow-list; THIS route adds the half that was missing — WHICH RAISE that file belongs\nto. A deck is per-UPLOADER today (that route's own docstring: *\"the file belongs to the UPLOADER,\nwhich is what the schema supports\"*), so without this call no raise can name its own deck and the\nwizard's step 2 has nothing to require.\n\nREPLACES rather than appends — a raise has one deck (migration 000052's header says why a `*_ref`\narray was rejected for a single-valued fact). Owner-only, and the deck may only be bound to a\nraise of the SAME entity the caller declares, so a raise of one company cannot be re-decked by\nanother. A file that does not exist, or is not a presentable one, is refused with its reason.","operationId":"post_campaign_deck_api_v1_investor_outreach_campaign__campaign_id__deck_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeckLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["investor-outreach"],"summary":"Get Campaign Deck","description":"@P279 T0200 — read the raise's deck, and say PLAINLY when there is none.\n\n`has_deck: false` is the honest answer for a raise that has not attached one — that is the state\nwizard step 2 (T0400) reports as *\"attach a deck\"*, and it is not an error. A deck that is NAMED\nbut unreadable is a DIFFERENT answer and surfaces as a 500 carrying its reason, never as\n`has_deck: false`: an absent deck and a broken link lead to opposite messages on the surface, and\ncollapsing the two is how a raise gets sent without the thing investors ask for first.","operationId":"get_campaign_deck_api_v1_investor_outreach_campaign__campaign_id__deck_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","description":"The company that owns the raise","title":"Entity Id"},"description":"The company that owns the raise"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/scores":{"get":{"tags":["investor-outreach"],"summary":"Get Raise Scores","description":"Centralised raise scores for one round (MR26 / D-116).\n\nReturns TWO measures, never merged:\n  - coverage:    0–100 supply share (reach ÷ pool) + neutral band + methodology string\n  - engagement:  per-investor warmth rollup from the campaign's REAL outbound\n                 communications (event-driven + freshness decay); honest None/0\n                 when no outreach has happened yet.\nBoth numbers and their plain-language explanations come from this ONE backend\ncall — the FE renders the payload and never re-derives bands (MR26).\n\nScope mirrors /campaigns: Firebase caller must own the entity (or it is a 403);\na service token must pass an explicit `entity_id`.","operationId":"get_raise_scores_api_v1_investor_outreach_scores_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","description":"The raising company's entity_id (the round's owner)","title":"Entity Id"},"description":"The raising company's entity_id (the round's owner)"},{"name":"campaignkey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional campaign stable key to scope engagement to this round's real outreach","title":"Campaignkey"},"description":"Optional campaign stable key to scope engagement to this round's real outreach"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/analytics":{"get":{"tags":["investor-outreach"],"summary":"Get Outreach Analytics","description":"project092 / T0209 — investor-outreach analytics over the `communications` ledger.\n\nReturns the rates the ledger can PROVE — reachouts actually sent, replies, bounces,\nand the reply/bounce rates they give — plus a per-campaign breakdown. Signals nothing\nwrites yet (opens, clicks, meetings, templates, segments) come back as an explicit\n`not_measured` map with the reason in words, never as a fabricated `0`.\n\nA zero denominator is `null`, not `0%` (HONESTY). Both numbers and their explanations\ncome from this one call (MR26). Scope mirrors /scores: a Firebase caller must own the\nentity or it is a 403; a service token must pass an explicit `entity_id`.","operationId":"get_outreach_analytics_api_v1_investor_outreach_analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","description":"The raising company's entity_id (the round's owner)","title":"Entity Id"},"description":"The raising company's entity_id (the round's owner)"},{"name":"campaignkey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional campaign stable key, to scope the read to one round","title":"Campaignkey"},"description":"Optional campaign stable key, to scope the read to one round"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Window start, YYYY-MM-DD (default: 90 days before end_date)","title":"Start Date"},"description":"Window start, YYYY-MM-DD (default: 90 days before end_date)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Window end, YYYY-MM-DD (default: today, UTC)","title":"End Date"},"description":"Window end, YYYY-MM-DD (default: today, UTC)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/investor-activity":{"get":{"tags":["investor-outreach"],"summary":"Get Investor Activity","description":"project092 / T0217 — one investor's real history with one raising company.\n\nReturns the engagement ladder (`sent → delivered → opened → clicked → replied → meeting\nbooked`) with each rung marked `measured`, plus the chronological event feed. Rungs with\nno producer come back `measured: false` so the surface says *\"not tracked yet\"* rather\nthan showing a rung nobody reached (the same D-004 rule as `/analytics`).\n\nScope is BOTH keys: `entity_id` (the company, which the caller must own) and\n`investor_entity_id`. Either alone would leak one company's outreach to another.","operationId":"get_investor_activity_api_v1_investor_outreach_investor_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","description":"The raising company's entity_id (the owner scope)","title":"Entity Id"},"description":"The raising company's entity_id (the owner scope)"},{"name":"investor_entity_id","in":"query","required":true,"schema":{"type":"string","description":"The investor whose history is read","title":"Investor Entity Id"},"description":"The investor whose history is read"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Most recent events returned","default":50,"title":"Limit"},"description":"Most recent events returned"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/import/contacts":{"post":{"tags":["investor-outreach"],"summary":"Post Import Contacts","description":"project092 / T0215 — bring a contact list in.\n\nEvery row leaves with an OUTCOME. A file whose headers we cannot read is REFUSED rather than\nimported as zero rows, because \"0 imported, nothing wrong\" would let a founder believe her list\nlanded when the file was simply not understood.","operationId":"post_import_contacts_api_v1_investor_outreach_import_contacts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/import/exclusions":{"post":{"tags":["investor-outreach"],"summary":"Post Import Exclusions","description":"project092 / T0215 — never contact these again.\n\nREFUSES any row that would be INERT. The suppression gate holds on the `(recipient, sender)` pair\nor on the PERSON; an address nobody here knows has no person, so its exclusion can only bind one\nsending identity — and a row with no bound sender matches nothing while looking like an exclusion.","operationId":"post_import_exclusions_api_v1_investor_outreach_import_exclusions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorExclusionImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/export/contacts":{"get":{"tags":["investor-outreach"],"summary":"Get Export Contacts","description":"project092 / T0215 — the owner's investors as CSV, so a list can leave the way it arrived.","operationId":"get_export_contacts_api_v1_investor_outreach_export_contacts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/investor-notes":{"get":{"tags":["investor-outreach"],"summary":"Get Investor Notes","description":"project092 / T0206 — her own note and tags about one investor.\n\nA READ NEVER CREATES: an absent relationship reads as empty rather than being materialised, so\nopening a profile cannot be the act that starts writing rows.","operationId":"get_investor_notes_api_v1_investor_outreach_investor_notes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"investor_entity_id","in":"query","required":true,"schema":{"type":"string","title":"Investor Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["investor-outreach"],"summary":"Post Investor Notes","description":"project092 / T0206 — write her note and/or tags.\n\nSTORED ON THE RELATIONSHIP, not the entity: a note is the OWNER's words about an investor, and the\nsame investor can carry a different note for a different owner. An entity-level note would show\none owner's private words to every other owner.","operationId":"post_investor_notes_api_v1_investor_outreach_investor_notes_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorNotesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/schedule":{"post":{"tags":["investor-outreach"],"summary":"Post Schedule Send","description":"project092 / T0212 — record a scheduled outreach send.\n\nThe moment is stored THREE ways (`D-017`): the instant the scheduler fires on, the wall clock she\ntyped, and the zone she typed it in. An instant alone cannot survive a change to a zone's DST\nrules — the send would move an hour with nothing in the record to say it moved, which is why RFC\n5545 carries `DTSTART` beside `TZID`.\n\nThe response also carries `send_at_cet`, the BE's own reading of the same instant (`D-013`: CET is\nthe normalisation standard, never the screen's label), so a caller can compare without re-deriving\neither.","operationId":"post_schedule_send_api_v1_investor_outreach_schedule_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/schedules":{"get":{"tags":["investor-outreach"],"summary":"Get Schedules","description":"project092 / T0212 — the founder's OWN schedules, oldest moment first. Scoped by owner.","operationId":"get_schedules_api_v1_investor_outreach_schedules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/schedule/{schedule_id}/cancel":{"post":{"tags":["investor-outreach"],"summary":"Post Schedule Cancel","description":"project092 / T0212 — withdraw a pending schedule.\n\nScoped to the owner entity, and a schedule belonging to someone else answers **404, never 403**:\na caller must not learn that an id exists on another entity (`D-007` — a key is an identifier,\nnever a permission).","operationId":"post_schedule_cancel_api_v1_investor_outreach_schedule__schedule_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","title":"Schedule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelScheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/meeting-booked":{"post":{"tags":["investor-outreach"],"summary":"Post Meeting Booked","description":"project092 / T0221 — write the MR30 meeting receipt on the send it came from.\n\nPRECONDITION, NOT YET MET BY ANY CALLER (`D-012`): a meeting can only be receipted when it was\nbooked through a surface we own. `freeBusy` is content-blind so there is no passive detection,\nand the calendar booking write (`gmail_calendar.create_event`) is not yet wired to a route. This\nendpoint is the receipt contract that the booking surface calls when it lands.\n\nThe receipt is an inbound EVENT row (`eventType='meeting_booked'`, `status='delivered'`) attached\nto the send — the house convention for a fact that arrived from outside, not a new status word.\nIdempotent: a replay returns `already_receipted` rather than minting a second meeting.","operationId":"post_meeting_booked_api_v1_investor_outreach_meeting_booked_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBookedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/test-send":{"post":{"tags":["investor-outreach"],"summary":"Post Test Send","description":"project092 / T0213 — send the founder her own email, to her own address, as a check.\n\nTHE RECIPIENT IS EXACTLY ONE FIELD: `sender.email` — the review form's **\"Your email\"** input.\nIt is not the sending identity: `sender.from_address` (defaulting to the platform's\n`hello@raisy.team`) is the From, and `sender.reply_to` (defaulting to\n`outreach@getraisy.net`) is the Reply-To. The test therefore arrives in the founder's own\ninbox and, if she replies to it, lands in the same place an investor's reply would.\n\nNOT a reachout: no credit is debited and no `communications` row is written, because the\nledger is the audit of real investor contact and a test is not contact. She receives exactly\nwhat the transport will send (same payload builder, same dispatch, same From/Reply-To), which\nis the only way to see what an investor will see.","operationId":"post_test_send_api_v1_investor_outreach_test_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/attachment":{"post":{"tags":["investor-outreach"],"summary":"Post Attachment","description":"project092 / T0211 — store a pitch deck so it can ride along with an outreach send.\n\nReuses the existing S3 store and the `uploaded_sources` table (the \"upload anything\" path\nalready owns both). The file belongs to the UPLOADER, which is what the schema supports —\n`resolve_attachments` will only ever hand back the caller's own files.\n\nRefused before storage: anything but pdf/pptx/docx/png/jpg, an empty file, or one over 5 MB.","operationId":"post_attachment_api_v1_investor_outreach_attachment_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_post_attachment_api_v1_investor_outreach_attachment_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/attachments":{"get":{"tags":["investor-outreach"],"summary":"Get Attachments","description":"project092 / T0211 — the files THIS caller may attach (their own uploads, newest first).","operationId":"get_attachments_api_v1_investor_outreach_attachments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/template/save":{"post":{"tags":["investor-outreach"],"summary":"Post Save Template","description":"project092 / T0204 — save the founder's own email wording as a reusable template.\n\nMints a BD196 kernel owned by her company (private scope), which later sends can choose by\nkey. A placeholder Raisy cannot fill is refused here rather than reaching an investor as\nbracketed text. Owner-only, like every other entity-scoped write.","operationId":"post_save_template_api_v1_investor_outreach_template_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveTemplateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/templates":{"get":{"tags":["investor-outreach"],"summary":"Get Templates","description":"project092 / T0204 — the templates this company may send with: Raisy's own plus the ones it\nsaved itself. Another company's private template is never listed.","operationId":"get_templates_api_v1_investor_outreach_templates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","description":"The company whose templates to list","title":"Entity Id"},"description":"The company whose templates to list"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/templates/selection":{"get":{"tags":["investor-outreach"],"summary":"Get Template Selection","description":"P135 T1434 / IN-28 — which of its templates this company has chosen to offer, and where that\nanswer came from.\n\n`default: true` with `selected: null` means the company has never chosen, so every template it\ncan send with is on. That is not the same as `selected: []`, which is a company that switched\nthem all off, so the two are never collapsed into one empty answer.","operationId":"get_template_selection_api_v1_investor_outreach_templates_selection_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","description":"The company whose template selection to read","title":"Entity Id"},"description":"The company whose template selection to read"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["investor-outreach"],"summary":"Put Template Selection","description":"P135 T1434 / IN-28 — set which of its templates this company offers.\n\nStored on the COMPANY (`entities.preferences.email_templates`), not on the user who clicked: the\nchoice governs everyone's outreach from this company, so a per-user copy would be a second answer\nto one question. A key the company cannot send with is REFUSED and nothing is written — a stored\nkey nobody can honour reads afterwards as a choice the owner made.\n\n\"Apply to all companies\" is this route called once per company, by the caller that shows the\nblast radius; there is deliberately no bulk endpoint, because a bulk write with no list on screen\nis the thing `D-135-049` rejected when it chose inheritance over copying.","operationId":"put_template_selection_api_v1_investor_outreach_templates_selection_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSelectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-outreach/presend-check":{"post":{"tags":["investor-outreach"],"summary":"Post Presend Check","description":"project092 / T0214 — the pre-flight check, run BEFORE the batch is sent.\n\nRuns the SAME compliance gate the send enforces (`EmailComplianceService.check_send`) plus the\ndeterministic content checks, and returns both together with the facts this cannot measure\n(domain reputation, a spam score) named in words. `sendable` is false when any check FAILS.\n\nNothing is written: this is a read of the rules, not a send. The caller supplies the sender\nwording; no entity data is read, so there is nothing here to scope by owner.","operationId":"post_presend_check_api_v1_investor_outreach_presend_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreSendCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/enrich-fields":{"post":{"tags":["investor-outreach"],"summary":"Investor Llm Enrich Fields","description":"LLM per-column investor enrichment (D-064).\n\nFor each selected investor, re-fetches the investor's website and asks the LLM\nto find ONLY the missing fields (stage_focus, check_size, sector_focus,\ndescription, city, linkedin, contact_name, website), each with its own targeted\nstrategy. Email is deliberately left to Hunter enrichment. Only empty fields are\nfilled; every run mints a fresh BD90.6 kernel. The user is the database curator.","operationId":"investor_llm_enrich_fields_api_v1_investor_outreach_enrich_fields_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorLlmEnrichFieldsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/prepare-sender":{"post":{"tags":["investor-outreach"],"summary":"Investor Outreach Prepare Sender","description":"P080 D-086 — Draft the sender wording block via a registered drafter bot.\n\nThe founder's outreach copy (one-line pitch / round description / LIA) is drafted\nby a REGISTERED BOT through raisy_1000 whose context is kernel-fed: the BD1\npersona (raisy_BD1_00080), a BD196 template as tone/structure reference, the\nentity's own private BD90 raise-profile kernel (auto-loaded via entity scope),\nand the declared-round facts as the BD0 input block. Every call is logged to\nbot_call_logs (MR0t). Nothing is sent — the founder edits the draft before send.","operationId":"investor_outreach_prepare_sender_api_v1_investor_outreach_prepare_sender_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorOutreachPrepareSenderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/find-and-add":{"post":{"tags":["investor-outreach"],"summary":"Investor Find Add","description":"Find & add an investor (D-064 / D-064b).\n\nGive a fund's website URL OR just its name: with a name we resolve it (DB first, then\nHunter Discover → website) and reuse the URL path. Identifies the investor via LLM and\ncreates the entity + BD90.6 kernel in one shot — so the user can grow and maintain the\ninvestor database themselves. Returns the new entity (or the existing one if it already\nexists by website/name).","operationId":"investor_find_add_api_v1_investor_outreach_find_and_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFindAddRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/resolve":{"post":{"tags":["investor-outreach"],"summary":"Resolve Investor Candidates","description":"Resolve a typed fund name / person name / URL → candidate investors to add (D-079).\n\nNever guesses: the FE shows the candidates and the user picks the right one (auto-add only\nwhen the resolve is unambiguous). Candidates are ENTITIES (MR1): firm names → company Entity\n(DB, Hunter domain, or resolver); person names → person Entity + their firm Entity. The add\nreuses find-and-add / add-person (with the Crawlbase fetch fallback for JS/blocked sites).","operationId":"resolve_investor_candidates_api_v1_investor_outreach_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/add-person":{"post":{"tags":["investor-outreach"],"summary":"Investor Add Person","description":"Add a PERSON as a first-class investor Entity (D-082, MR1).\n\nPersons are Entities like firms. Creates a `prospect` person Entity, links them to their\naffiliation firm (employee relationship, MR1) when we hold that firm, and links them to the\nraising entity via an `investor` edge when one is given. Dedupes by exact person name.","operationId":"investor_add_person_api_v1_investor_outreach_add_person_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorPersonAddRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/person-email":{"post":{"tags":["investor-outreach"],"summary":"Investor Person Email","description":"D-083 — corporate-first, verified corporate email for a person investor.\n\nFirm domain (person's employee-linked firm or an explicit firm) → Hunter domain-search\n(personal) → match by name → verify → store on the person's entity_links.email.\nNever guesses a private address.","operationId":"investor_person_email_api_v1_investor_outreach_person_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorPersonEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/enrich/enqueue":{"post":{"tags":["investor-outreach"],"summary":"Investor Enrich Enqueue","description":"D-088 — enqueue investor entities (persons AND firms) into the enrich_investor farm.\n\nOne job per entity (per-entity, idempotent at the queue level). Returns the batch\n(execution) handle the FE polls — `add` stays thin + fast, the farm is background.","operationId":"investor_enrich_enqueue_api_v1_investor_outreach_enrich_enqueue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorEnrichEnqueueRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/enrich/worker":{"post":{"tags":["investor-outreach"],"summary":"Investor Enrich Worker","description":"D-088 — run the FIFO enrich worker. Scheduler/poll calls this; each job runs the\nexisting per-entity enrich body (company → LLM BD90.6, person → corporate email),\nfailing LOUDLY per job otherwise. Long external calls never hold a DB txn.","operationId":"investor_enrich_worker_api_v1_investor_outreach_enrich_worker_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorEnrichWorkerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/enrich/status":{"post":{"tags":["investor-outreach"],"summary":"Investor Enrich Status","description":"D-088 / D-086 — latest enrich-job state for ONE entity (the readiness-gate input).\nReturns 200 with `data.status` in (queued|in_progress|done|failed|skipped) or\n`data: null` when no job has ever been queued for the entity.","operationId":"investor_enrich_status_api_v1_investor_outreach_enrich_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorEnrichStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-outreach/enrich/batches":{"get":{"tags":["investor-outreach"],"summary":"Investor Enrich Batches","description":"D-088 — list enrich batches (execution handles) for FE visibility.","operationId":"investor_enrich_batches_api_v1_investor_outreach_enrich_batches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by batch status","title":"Status"},"description":"Filter by batch status"},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-funnel/nl-search":{"post":{"tags":["investor-funnel"],"summary":"Nl Investor Search","description":"PROJECT-107 / T0208 — NL investor search: parse → confidence gate → coverage\ncheck → respond (instant-DB-hit vs. honest thin/scrape-pending signal).","operationId":"nl_investor_search_api_v1_investor_funnel_nl_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NlSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-funnel/search":{"post":{"tags":["investor-funnel"],"summary":"Faceted Search","description":"D-004: instant structured faceted search — DB-only, <100ms target, NO LLM in the hot\npath. This is the primary Discover surface; /nl-search is the async facet pre-filler.","operationId":"faceted_search_api_v1_investor_funnel_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetedSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-funnel/acquisition/enqueue":{"post":{"tags":["investor-funnel"],"summary":"Acquisition Enqueue","description":"D-004: enqueue a batch/list — returns the execution handle (batch_id) + ETA. Never blocks.","operationId":"acquisition_enqueue_api_v1_investor_funnel_acquisition_enqueue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcquisitionEnqueueRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-funnel/acquisition/batches":{"get":{"tags":["investor-funnel"],"summary":"Acquisition Batches","description":"D-004: queue visibility — list batches with live counters/ETA (expectation management).","operationId":"acquisition_batches_api_v1_investor_funnel_acquisition_batches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by batch status","title":"Status"},"description":"Filter by batch status"},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-funnel/acquisition/batches/{batch_id}":{"get":{"tags":["investor-funnel"],"summary":"Acquisition Batch Detail","description":"D-004: inspect one batch + its per-URL jobs.","operationId":"acquisition_batch_detail_api_v1_investor_funnel_acquisition_batches__batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/investor-funnel/acquisition/worker":{"post":{"tags":["investor-funnel"],"summary":"Acquisition Worker","description":"D-004: run the FIFO batch worker. Scheduler/poll calls this; fetches via Crawlbase\n(needs RAISY_CRAWLBASE_API_TOKEN) — fails LOUDLY per URL otherwise.","operationId":"acquisition_worker_api_v1_investor_funnel_acquisition_worker_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcquisitionWorkerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-funnel/ingest":{"post":{"tags":["investor-funnel"],"summary":"Funnel Ingest","description":"Ingest an external investor list into entities + relationships + BD90.6 kernels.","operationId":"funnel_ingest_api_v1_investor_funnel_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-funnel/rank":{"post":{"tags":["investor-funnel"],"summary":"Funnel Rank","description":"Rank active investor relationships against a raise profile.","operationId":"funnel_rank_api_v1_investor_funnel_rank_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelRankRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-funnel/enrich":{"post":{"tags":["investor-funnel"],"summary":"Funnel Enrich","description":"Run Hunter enrichment on selected investor relationships.","operationId":"funnel_enrich_api_v1_investor_funnel_enrich_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelEnrichRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/investor-funnel/run":{"post":{"tags":["investor-funnel"],"summary":"Funnel Run","description":"Run the full funnel: ingest → rank → enrich → re-rank.","operationId":"funnel_run_api_v1_investor_funnel_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/check":{"post":{"tags":["pitch"],"summary":"Check Artefact","description":"Run the versioned rule set against one artefact.\n\n⚠️ WHERE A REFUSAL ACTUALLY ARRIVES — MEASURED 2026-10-11, and it is NOT the HTTP status.\nEvery path answers **HTTP 200**, because this route returns a plain object and the code the\nchecker chose rides in the body's `statusCode` (400 unknown kind · 404 no such entity · 403\nunreadable entity · 422 the audit was incomplete · 503 the rule set is unavailable · 502 the\naudit call failed). `status=False` and, for an audit refusal, `data[\"refusals\"]` carry the\nreasons. **A caller MUST branch on `status`, never on the HTTP status** — and this docstring\nused to claim otherwise (\"the HTTP status the service chose\"), which the wire disproved with two\nindependent refusals: `statusCode` 400 and 404 both arrived on HTTP 200. The false claim was\nalso generated into the FE client (`raisy_FE/src/services/api/generated/api/pitch/pitch.ts`),\nso it existed in two homes. A caller that renders a refused report as a pass is rendering a\nreceipt for work that was not done — and trusting the HTTP status is exactly how that happens.","operationId":"check_artefact_api_v1_pitch_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtefactCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/gates":{"post":{"tags":["pitch"],"summary":"Preparation Gates","description":"P280 T0201 — can preparation start for this entity, and if not, what clears it?\n\nTHE MENU ASKS THIS BEFORE IT OPENS (SD-2). It answers all three gates every time, each with\nthe one action that clears it, so a surface never has to say \"no\" without saying what to do.\n\nNOT A READ OF THE ENTITY'S CONTENT, so it does not leak one: the response carries gate names,\nthe reason each was answered the way it was, and remedies. It never returns the entity's\nfields, and a caller who cannot read the entity is refused rather than told the answer.\n\nA SERVICE PRINCIPAL IS ADMITTED WITHOUT A UID, exactly as `/check` admits it (`D-280-004`): a\nharness asks the same question a person does. It is NOT admitted without an entity_id — the\ngates are per-entity by construction, so there is nothing to answer.","operationId":"preparation_gates_api_v1_pitch_gates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparationGatesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/queue":{"post":{"tags":["pitch"],"summary":"Pitch Queue","description":"P280 T0203 — the pitch artefacts awaiting a decision, each with the report behind it.\n\nTHE SAME ROWS THE DECIDE LANE COUNTS, from the SAME definition (`awaiting_query`, narrowed by\nkind) — so the number on the door and the items behind it cannot disagree. This endpoint returns\nthe FULL item (the artefact, the per-rule report and its provenance) because the surface must\nshow her the text beside the verdict; the lane returns only enough to render a row.\n\nREADING CHANGES NOTHING. A view moves `proposed -> opened`, and both states are AWAITING, so\nopening an item leaves the count exactly where it was (T0203's measurable).","operationId":"pitch_queue_api_v1_pitch_queue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchQueueRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/item/decide":{"post":{"tags":["pitch"],"summary":"Pitch Decide","description":"ONE decision on ONE artefact — the move T0203's queue exists to take.\n\nIT MOVES THROUGH THE ESTATE'S OWN TRANSITION (`prepared_item_service.decide`), never by writing\na state directly: that function owns the rules (`terminal_state`, `illegal_transition`,\n`decider_required`) and the commit, and a second writer would be a second home for what a state\nmeans.\n\nTHE MAPPING IS SMALL AND DELIBERATE. `approve`/`reject` are the surface's verbs; the store's\nstates are `approved`/`rejected`. Only those two are accepted — `opened` is a VIEW and `sent` is\na different machine's move, so neither is reachable from this door.\n\nA service principal decides as the SYSTEM and may name no person; a user decides as themselves,\nbecause `validate_transition` refuses a decision that names nobody (`decider_required`) and an\nanswer that cannot say who gave it is not an answer.","operationId":"pitch_decide_api_v1_pitch_item_decide_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PitchDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/deliverables":{"get":{"tags":["pitch"],"summary":"Pitch Deliverables","description":"What we provide for a fundraise, what each row's automation state is, and what it costs.\n\nTHE SURFACE RENDERS THIS AND COMPUTES NOTHING. A row's `request` block says whether there is\nanything to ask for, and — for the manual row — its price and its channel, so a surface cannot\nshow an automated affordance for work a person does. `requestable_today` is DERIVED from the\nrows rather than listed, so it cannot fall out of step with them.","operationId":"pitch_deliverables_api_v1_pitch_deliverables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/deliverable/request":{"post":{"tags":["pitch"],"summary":"Pitch Request Deliverable","description":"Ask for one deliverable. Records the ask; a PERSON does the work and sends the answer.\n\n⚠️ WHAT THIS ROUTE DOES NOT DO, and it must not grow into it: it sends **no** email and starts\n**no** build. `IN-12` is explicit — *\"JUST SEND EMAIL for now until we are done with a new\nproject auto build financial project (NOT YET DONE)\"* — so the ask is recorded as a prepared\nitem and a human answers it.\n\n⚠️ **AND IT IS A PREPARED ITEM OF ITS OWN KIND, WHICH THIS ROUTE GOT WRONG FIRST** (measured\n2026-10-12, `T0501` §D26 check 6). It recorded the ask under `PITCH_ARTEFACT_KIND`, so it came\nback in `/pitch/queue` as an *artefact awaiting a decision* — with no artefact text, with the\ncount on the door raised, and refused by `/item/decide`'s own kind guard (above), i.e. a\ndead-ended phantom in the founder's review queue rather than our work list. It reads back\nthrough `/deliverable/requests` now.\n\nTHE ENTITY RULE IS THE SAME ONE `/check` LEARNED (T0402 defect (a)): the entity must EXIST for\nevery principal, or a stale id writes an item no read door will ever show. A service caller is\nexempt from the read PERMISSION (D-280-004) and never from existence.","operationId":"pitch_request_deliverable_api_v1_pitch_deliverable_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverableRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/deliverable/requests":{"post":{"tags":["pitch"],"summary":"Pitch Deliverable Requests","description":"The deliverables ALREADY ASKED FOR — the door for whoever must answer them.\n\n⚠️ THIS ROUTE EXISTS BECAUSE OF A DEFECT (see `pitch_request_deliverable`'s docstring): the ask\nwas first recorded under the ARTEFACT kind, where the founder's own review queue returned it and\nwhere `/item/decide`'s kind guard refused it — so it was recorded and readable by nobody who\ncould ACT on it. A request no surface can list is the same as an unrecorded one, which is why\nthe repair is a kind AND a door rather than either alone.\n\nIT SERVES BOTH SIDES ON PURPOSE. The person who must build the model reads it as their work\nlist; the founder reads it as *\"what have I asked for, and is it still waiting\"*. Same rows, same\n`awaiting_query` definition the rest of the estate counts with, so the number and the items\ncannot disagree (`prepared_item_service`'s own law). A caller who may read the entity sees them;\na service token does, and existence is required first for every principal (`T0402` defect (a)).","operationId":"pitch_deliverable_requests_api_v1_pitch_deliverable_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverableAsksRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/review-link":{"post":{"tags":["pitch"],"summary":"Pitch Create Review Link","description":"Open a door onto ONE artefact. Returns the link; a person does nothing else.\n\nTHE ENTITY RULE FIRST (`T0402` defect (a)'s law, and `T0603`'s order): existence, then the\nprincipal, then the permission — so a ghost id answers the same way for everyone.","operationId":"pitch_create_review_link_api_v1_pitch_review_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/review-links":{"post":{"tags":["pitch"],"summary":"Pitch List Review Links","description":"The doors THIS entity's founder opened — and whether anyone walked through.\n\nA revocation surface with no read is a control nobody can use: the founder must be able to SEE the\nlink before she can close it, which is why this exists rather than only mint and revoke.","operationId":"pitch_list_review_links_api_v1_pitch_review_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewLinkListRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/review-link/revoke":{"post":{"tags":["pitch"],"summary":"Pitch Revoke Review Link","description":"Close one door. Idempotent — the first hand that closed it is the one recorded.","operationId":"pitch_revoke_review_link_api_v1_pitch_review_link_revoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewLinkRevokeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/review":{"post":{"tags":["pitch"],"summary":"Pitch Public Review","description":"⚠️ THE ONE PUBLIC ROUTE — the review leaves the building.\n\nNO PRINCIPAL, BY DESIGN, and that is the whole feature (T-3): an outside reader with the link and\nnothing else reads the ONE artefact it opens. Everything that makes that safe is elsewhere and\ndeliberate — the token's own signature and window, the row's liveness (`revoked`/`expired`), the\ntoken↔row agreement on WHICH artefact, and `public_payload`'s allow-list, which is what stops this\nfrom becoming a general read of the entity.\n\nA REFUSAL HERE NAMES NOTHING ABOUT WHY beyond the reason code, because the answer to \"is this link\nreal?\" must not become an oracle: a forged token and a revoked one are both simply refused. The\nreason is logged with the link id for the founder's benefit, not returned for the attacker's.","operationId":"pitch_public_review_api_v1_pitch_review_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReviewRequest"}}},"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/pitch/comparison":{"post":{"tags":["pitch"],"summary":"Pitch Create Comparison","description":"Open a comparison from its own document. **The engine block decides whether it may exist at all.**","operationId":"pitch_create_comparison_api_v1_pitch_comparison_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/comparison/read":{"post":{"tags":["pitch"],"summary":"Pitch Read Comparison","description":"The whole comparison: declaration, cells with their witnesses, marks, and the DERIVED verdict.","operationId":"pitch_read_comparison_api_v1_pitch_comparison_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonReadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/comparison/score":{"post":{"tags":["pitch"],"summary":"Pitch Score Comparison","description":"Record or CORRECT one cell — *\"a score can be challenged and corrected\"* (`T0311`'s acceptance).\n\nA second score for the same (variant, criterion) UPDATES the cell and keeps the hand that moved it, so\na correction is an act with an author rather than an overwrite. The refusal codes come from the\nengine's own rules (`no_witness`, `bad_basis`, `unknown_criterion`).","operationId":"pitch_score_comparison_api_v1_pitch_comparison_score_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonScoreRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pitch/comparison/mark":{"post":{"tags":["pitch"],"summary":"Pitch Mark Comparison","description":"Challenge a CRITERION — a disagreement that outlives the session (`@R36-COMPARE` §6 rule 4).","operationId":"pitch_mark_comparison_api_v1_pitch_comparison_mark_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonMarkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/domain/catalog":{"post":{"tags":["domain"],"summary":"Domain Catalog","description":"FE SSOT contract (MR0v): the TLD index + provisioning metrics, read from the kernels.\n\nFE never hardcodes TLDs, costs, or DNS estimates — it fetches here and ranks/filters\nclient-side (cheap/reliable/geo presets). local-part/SLD/TLD suggestions come from the\ndomain-suggestion bot (a separate asset), user picks each component on the FE.","operationId":"domain_catalog_api_v1_domain_catalog_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCatalogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/domain/suggest":{"post":{"tags":["domain"],"summary":"Domain 2 Suggested Identity","description":"D-051 wizard Step 1 — USER CHOOSES the sending identity.\n\nWraps the Domain Suggestion Bot (registered asset, MR0t/MR0x logged) with the SSOT\n`raisy_tld_index` kernel trim (cheap/reliable/geo presets). Returns the bot's proposal\n(local-part @ SLD . TLD) with real money/value attached from the kernel — never LLM\nnumbers. `dry_run=true` returns the candidate shortlist + request WITHOUT an LLM call\n(schema/UX preview). Never a gate: {ok:False, reason} degrades gracefully.","operationId":"domain_2_suggested_identity_api_v1_domain_suggest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainSuggestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/domain/availability":{"post":{"tags":["domain"],"summary":"Domain 2 Availability","operationId":"domain_2_availability_api_v1_domain_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainAvailabilityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/domain/pricing":{"post":{"tags":["domain"],"summary":"Domain 2 Pricing","operationId":"domain_2_pricing_api_v1_domain_pricing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainPricingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/domain/purchase":{"post":{"tags":["domain"],"summary":"Domain 2 Registered","operationId":"domain_2_registered_api_v1_domain_purchase_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainPurchaseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/domain/webhook":{"post":{"tags":["domain"],"summary":"Domain Provisioning Webhook","description":"Porkbun webhook receiver — PUBLIC (Porkbun sends no user token); authenticated by HMAC signature.\n\nSubscribes to domain.registered / dns.record.created|updated|deleted (Porkbun \"All events\").\nVerifies X-Porkbun-Signature (HMAC-SHA256 over '{timestamp}.{rawBody}', endpoint secret =\nPORKBUN_WEBHOOK_SECRET), then appends the measured event to the domain_provisioning_metrics\nkernel (real DNS-forward timing — the UX=speed metric).","operationId":"domain_provisioning_webhook_api_v1_domain_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/inboxkit/domain/connect":{"post":{"tags":["inboxkit"],"summary":"Domain 2 Inboxkit Connected","operationId":"domain_2_inboxkit_connected_api_v1_inboxkit_domain_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitDomainConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/domain/nameservers":{"post":{"tags":["inboxkit"],"summary":"Domain 2 Nameservers Set","operationId":"domain_2_nameservers_set_api_v1_inboxkit_domain_nameservers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitDomainNameserversRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/domain/forwarding":{"post":{"tags":["inboxkit"],"summary":"Domain 2 Forwarding Set","operationId":"domain_2_forwarding_set_api_v1_inboxkit_domain_forwarding_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitDomainForwardingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/mailbox/buy":{"post":{"tags":["inboxkit"],"summary":"Mailbox 2 Bought","operationId":"mailbox_2_bought_api_v1_inboxkit_mailbox_buy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitMailboxBuyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/billing/plans":{"get":{"tags":["inboxkit"],"summary":"Inboxkit 2 Billing Plans","description":"Live InboxKit pricing plans from the API (authoritative, not the marketing page).\n\nRaisy pricing policy: client price = InboxKit cost * 2.0 (100% premium). Each plan is\nreturned raw (authoritative) plus `raisy_markup_multiplier` and a computed `client_price`.","operationId":"inboxkit_2_billing_plans_api_v1_inboxkit_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/account":{"get":{"tags":["inboxkit"],"summary":"Inboxkit 2 Account","description":"Admin: wallet credits + plan + mailbox slots (InboxKit GET /v1/api/account).\n\ncredits_remaining = the P093 low-balance signal (check before any wallet-billed buy).\nsubscription_mailbox_slots_purchasable=false → slot buys would 402 — surface before a buy.","operationId":"inboxkit_2_account_api_v1_inboxkit_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/domains":{"get":{"tags":["inboxkit"],"summary":"Inboxkit 2 Domains","description":"Admin: list domains + nameserver health (InboxKit POST /v1/api/domains/list).\n\nnameserver_match_status (matched/moved/pending/unknown) = DNS health signal; moved =\nnameservers changed at registrar → action required. assigned/available_mailboxes per domain.","operationId":"inboxkit_2_domains_api_v1_inboxkit_domains_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inboxkit/mailboxes":{"get":{"tags":["inboxkit"],"summary":"Inboxkit 2 Mailboxes","description":"Admin: list mailboxes (InboxKit POST /v1/api/mailboxes/list). Granular status per mailbox.\n\n⚠️ \"Admin\" IS THE DOCSTRING'S WORD AND WAS NEVER A DOOR — the guard is service-or-user, and this\nroute lists the deployment's OWN receiving mailboxes (`healthcheck@getraisy.com`,\n`mailmonitor@getraisy.net`) to any signed-in user until 2026-10-11. MEASURED: `/mail/mailboxes`\napplied D-010's visibility rule (PO directive 2026-10-09) and this route did not, and this is the\none a user surface calls (`SendingDomainConnectPanel.tsx:132` calls `listMailboxes()`). One rule,\ntwo doors, one door locked — see `services/mail_visibility.py`.","operationId":"inboxkit_2_mailboxes_api_v1_inboxkit_mailboxes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inboxkit/mailboxes/status":{"post":{"tags":["inboxkit"],"summary":"Inboxkit 2 Mailbox Status","description":"Status poll for specific mailboxes (InboxKit POST /v1/api/mailboxes/status).\n\nThis is the provisioning-progress signal the FE wizard polls (scheduled→…→active) and the\nfeed for measured provisioning-time tracking (D-051 expectation management).","operationId":"inboxkit_2_mailbox_status_api_v1_inboxkit_mailboxes_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitMailboxStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/mailboxes/{uid}":{"get":{"tags":["inboxkit"],"summary":"Inboxkit 2 Mailbox Detail","description":"Admin: single mailbox detail (InboxKit GET /v1/api/mailboxes/details?uid=).","operationId":"inboxkit_2_mailbox_detail_api_v1_inboxkit_mailboxes__uid__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","title":"Uid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inboxkit/mailboxes/{uid}/health":{"get":{"tags":["inboxkit"],"summary":"Inboxkit 2 Mailbox Health","description":"The sending identity's health readings (@P080 `D-132` leg 2) — what RECEIVERS did with its mail.\n\nThe seven readings are computed from evidence this repository already holds. **A reading with\nnothing behind it comes back with `value: null` and the reason it is absent — never as a 0.** A 0\non a screen is indistinguishable from a measured rejection, and telling a client her mailbox\nscores 0 is a worse answer than telling her we cannot see it yet.\n\n`probe_uid` is optional: the mailbox that receives this identity's own sends (a seed, or the\nhealth-test mailbox). Without it the received-verdict readings stay absent by design rather than\nbeing estimated, and the contract reports how many of the seven could be measured at all.","operationId":"inboxkit_2_mailbox_health_api_v1_inboxkit_mailboxes__uid__health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","title":"Uid"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Window Days"}},{"name":"probe_uid","in":"query","required":false,"schema":{"type":"string","default":"","title":"Probe Uid"}},{"name":"monitor_uid","in":"query","required":false,"schema":{"type":"string","default":"","title":"Monitor Uid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inboxkit/dns":{"get":{"tags":["inboxkit"],"summary":"Inboxkit 2 Dns","description":"Admin: DNS records for a domain (InboxKit GET /v1/api/dns/list?domain=|uid=).\n\nPer-record status (pending/propagated/failed) = the D-048 DNS-forward signal the wizard\nuses to show setup progress. Provide either domain name or domain uid.","operationId":"inboxkit_2_dns_api_v1_inboxkit_dns_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string","default":"","title":"Domain"}},{"name":"uid","in":"query","required":false,"schema":{"type":"string","default":"","title":"Uid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inboxkit/webhook":{"post":{"tags":["inboxkit"],"summary":"Inboxkit Webhook","description":"InboxKit webhook receiver — PUBLIC (InboxKit sends no user token).\n\nSignature = X-InboxKit-Signature: 'sha256=<hex sha256 of team API key>' (NOT HMAC — InboxKit\ndocs corrected this). Constant-time compare. Events: domain.status_changed, mailbox.status_changed,\nconsent_request.status_changed, client_id_request.status_changed. Mailbox events carry PLAINTEXT\ncredentials in transit — never log them; HTTPS endpoint required. Idempotency key = data.<entity>.uid.","operationId":"inboxkit_webhook_api_v1_inboxkit_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/inboxkit/cloudflare/connect":{"post":{"tags":["inboxkit"],"summary":"Cloudflare 2 Domains Connected","description":"Connect a domain the user already owns, keeping its zone at Cloudflare (D-134-027).\n\nWHY THIS EXISTS. The BYO arm had one shape — delegation, which moves the WHOLE zone (the\nwebsite's DNS with it). For a domain the user already runs a site on, that is the harm\nD-134-021 named. This is the other shape: the zone stays at Cloudflare and InboxKit writes only\nthe mail records through the user's own token, scoped Zone:Read + DNS:Edit.\n\nTHE POSTURE IS FAIL-CLOSED, and every refusal names which one it is:\n  - the caller may not write the workspace        -> 403 `cross_entity`\n  - the workspace does not exist                  -> 404 `unknown_entity`\n  - the account is held by another workspace      -> 409 `account_already_used` (the vendor's own\n    ACCOUNT_ALREADY_USED / CREDENTIAL_CONFLICT — a retry cannot succeed, so we say who holds it)\n  - too many connects (10 per 5 minutes)          -> 429 `rate_limited`\n  - the zone's existing mail records would clash  -> 200 with `dns_conflict`, naming the records\n    to remove — NOT an error: it is the guided moment, and the user acts on it\n  - the token is bad / lacks DNS access           -> 400 `cloudflare_rejected`, with the vendor's words\n\nThe token is written to the vault ONLY when the connect succeeded, so a refused connect never\nleaves a credential behind.","operationId":"cloudflare_2_domains_connected_api_v1_inboxkit_cloudflare_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitCloudflareConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/cloudflare/zones":{"get":{"tags":["inboxkit"],"summary":"Cloudflare 2 Zones Listed","description":"The zones the connected Cloudflare credentials can reach (D-134-027).\n\nShown BEFORE the user picks one, so he sees which of his domains we can see — and which are\nalready connected — rather than being asked to type a name we could have listed.","operationId":"cloudflare_2_zones_listed_api_v1_inboxkit_cloudflare_zones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inboxkit/domain/nameservers/check":{"post":{"tags":["inboxkit"],"summary":"Domain 2 Nameservers Propagation","description":"Has the nameserver change landed? — the vendor's own answer, so the step can promise\n*\"we check it ourselves\"* rather than asking the user to come back and tell us.\n\nRead-only: no confirm gate, because nothing is changed. `propagated` is the boolean the wizard\nacts on, and `status` distinguishes `active` from `expired_propagation`.","operationId":"domain_2_nameservers_propagation_api_v1_inboxkit_domain_nameservers_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitNameserverRecoveryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/inboxkit/domain/nameservers/regenerate":{"post":{"tags":["inboxkit"],"summary":"Domain 2 Nameservers Regenerated","description":"Fresh nameservers for a delegation that lapsed — the recovery, and it is NOT a retry.\n\nThe vendor creates new Cloudflare zones and returns a NEW pair, resetting the domain to\n`not_connected`; the user must set that pair at his registrar. The vendor processes only\ndomains in `expired_propagation` or `nameserver_match_status: 'moved'` and silently skips the\nrest, so `count` is reported as-is: a caller that assumes success would tell a user to change\nnameservers that were never regenerated.","operationId":"domain_2_nameservers_regenerated_api_v1_inboxkit_domain_nameservers_regenerate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxKitNameserverRecoveryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/provision/{job_id}":{"get":{"tags":["provision","provision"],"summary":"Provision 2 Status","description":"Get the persisted provisioning job state (safe view — never credentials).","operationId":"provision_2_status_api_v1_provision__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provision":{"get":{"tags":["provision","provision"],"summary":"Provision 2 List","description":"List recent provisioning jobs (filter by domain_name / entity_id).","operationId":"provision_2_list_api_v1_provision_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string","default":"","title":"Domain"}},{"name":"entity_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline-stage/assess":{"post":{"tags":["pipeline-stage"],"summary":"Assess Stage","description":"LLM-assess the current BD70.x stage from a transcript window and persist it.","operationId":"assess_stage_api_v1_pipeline_stage_assess_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessStageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pipeline-stage/set":{"post":{"tags":["pipeline-stage"],"summary":"Set Stage","description":"Manual override: validate and write a BD70.x stage on the relationship edge.","operationId":"set_stage_api_v1_pipeline_stage_set_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pipeline-stage/board":{"get":{"tags":["pipeline-stage"],"summary":"Pipeline Board","description":"D-109 - read the owner's raise pipeline as a stage board (canonical BD70.x columns + people counts).","operationId":"pipeline_board_api_v1_pipeline_stage_board_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner_entity_id","in":"query","required":true,"schema":{"type":"string","description":"Raise/owner entity whose pipeline to show","title":"Owner Entity Id"},"description":"Raise/owner entity whose pipeline to show"},{"name":"relationship_type","in":"query","required":false,"schema":{"type":"string","description":"Relationship edge type (default investor)","default":"investor","title":"Relationship Type"},"description":"Relationship edge type (default investor)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipeline-stage/board/set":{"post":{"tags":["pipeline-stage"],"summary":"Board Set Stage","description":"D-109 - manual override of one person's stage on the raise pipeline board.","operationId":"board_set_stage_api_v1_pipeline_stage_board_set_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardSetStageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/conversation/save":{"post":{"tags":["conversation"],"summary":"Save Conversation","description":"Persist a call conversation: participants → relationship edges → conversation kernel.","operationId":"save_conversation_api_v1_conversation_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveConversationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/conversation/participant/resolve":{"post":{"tags":["conversation"],"summary":"Resolve Participant","description":"Get-or-create a participant entity (Party A/B). Creates as `prospect` per MR15 when missing.","operationId":"resolve_participant_api_v1_conversation_participant_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveParticipantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/session/upsert":{"post":{"tags":["hermes"],"summary":"Hermes Session Upsert","operationId":"hermes_session_upsert_api_v1_hermes_session_upsert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesSessionUpsertRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/turn/persist":{"post":{"tags":["hermes"],"summary":"Hermes Turn Persist","operationId":"hermes_turn_persist_api_v1_hermes_turn_persist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesTurnPersistRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/session/{hermes_session_id}/turns":{"get":{"tags":["hermes"],"summary":"Hermes Session Turns","operationId":"hermes_session_turns_api_v1_hermes_session__hermes_session_id__turns_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hermes_session_id","in":"path","required":true,"schema":{"type":"string","title":"Hermes Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/recall":{"post":{"tags":["hermes"],"summary":"Hermes Recall","operationId":"hermes_recall_api_v1_hermes_recall_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesRecallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/entity_brief/{entity_id}":{"get":{"tags":["hermes"],"summary":"Hermes Entity Brief","description":"Name, type, classification, about, processes, bots and the entity's own facts.","operationId":"hermes_entity_brief_api_v1_hermes_entity_brief__entity_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/memory/facts":{"get":{"tags":["hermes"],"summary":"Hermes Memory Facts","description":"The entity's remembered lines with their trust, exposure count and status.","operationId":"hermes_memory_facts_api_v1_hermes_memory_facts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"kernel_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernel Key"}},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}},{"name":"cap","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Cap"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/memory/facts/rejudge":{"post":{"tags":["hermes"],"summary":"Hermes Memory Rejudge","description":"Re-judge stored facts' subjects against the closed set (P127 T114). DRY RUN BY DEFAULT.\n\n`{\"entity_id\": \"...\", \"apply\": false}` — `apply` must be sent EXPLICITLY as true to write.\nA default of \"yes, write\" would make an exploratory call a migration.","operationId":"hermes_memory_rejudge_api_v1_hermes_memory_facts_rejudge_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/memory/facts/feedback":{"post":{"tags":["hermes"],"summary":"Hermes Memory Feedback","description":"Move one fact's trust: a right memory is reinforced, a wrong one sinks.","operationId":"hermes_memory_feedback_api_v1_hermes_memory_facts_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/memory/facts/exposures":{"post":{"tags":["hermes"],"summary":"Hermes Memory Exposures","description":"Count what was SHOWN. The shell reports after budgeting, so a fact dropped for\nbudget is not counted as seen — the whole distinction the counter depends on.","operationId":"hermes_memory_exposures_api_v1_hermes_memory_facts_exposures_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryExposuresRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/memory/consolidate":{"post":{"tags":["hermes"],"summary":"Hermes Memory Consolidate","description":"Run the memory cadence for one entity: reconcile, record conflicts, retire.","operationId":"hermes_memory_consolidate_api_v1_hermes_memory_consolidate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryConsolidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/distill":{"post":{"tags":["hermes"],"summary":"Hermes Distill","description":"T0300d: offline/batch distillation trigger (D-028) — distills an entity's new\nhermes_turns into ONE versioned BD90.7 hermes-memory kernel via the registered\ndistillation bot. Loud 503 until the bot is provisioned (T0601) — never fake success.","operationId":"hermes_distill_api_v1_hermes_distill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesDistillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/ops-kpi":{"post":{"tags":["hermes"],"summary":"Hermes Ops Kpi","description":"T0300e: deterministic (MR16) readout of the learning / autonomy / proactivity KPI\nfamilies from the existing logged substrate. Readout-only in v1 (no kpi_results write —\nthat needs a D80_KPI kernel per metric, T0300e-r2; never the D-056 over-mint).","operationId":"hermes_ops_kpi_api_v1_hermes_ops_kpi_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesOpsKpiRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/mast":{"post":{"tags":["hermes"],"summary":"Hermes Mast","description":"T0300f: deterministic (MR16) per-bot MAST evidence readout (protocol D-043) —\ncompletion (METR-style) + real approval verdicts -> SAE/MR5b ladder + composite +\nwindow delta. v1 writes NO rows (replay engine + mast table = T0300f-r2, D-056).","operationId":"hermes_mast_api_v1_hermes_mast_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesMastRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/attribution/credit":{"post":{"tags":["hermes"],"summary":"Hermes Attribution Credit","description":"T0300g: deterministic (MR16) credit scan — for an entity's unscanned kpi_results rows,\ncredit the producing bot call + kernel context (run_id_match verified / window_candidate\npending). Requires migration 130 (loud fail-open if absent).","operationId":"hermes_attribution_credit_api_v1_hermes_attribution_credit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesAttributionCreditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/attribution":{"get":{"tags":["hermes"],"summary":"Hermes Attribution List","operationId":"hermes_attribution_list_api_v1_hermes_attribution_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},{"name":"kpi_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kpi Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/attribution/verify":{"post":{"tags":["hermes"],"summary":"Hermes Attribution Verify","description":"T0300g verify-before-credit: manually approve/reject a pending window_candidate credit;\napproving attaches the producing bot call's kernel context.","operationId":"hermes_attribution_verify_api_v1_hermes_attribution_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesAttributionVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/wake/check":{"post":{"tags":["hermes"],"summary":"Hermes Wake Check","description":"T0300h: deterministic (MR16) wake-trigger check — schedule/event/KPI-deviation due\nfor an entity. No LLM in the check; the wake ACT (run) is the MR0t-logged bot call.","operationId":"hermes_wake_check_api_v1_hermes_wake_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesWakeCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/recurring-tasks":{"get":{"tags":["hermes"],"summary":"Hermes Recurring Tasks","description":"project146 T0185 — the SEVEN COLUMNS the owner reads: what runs · which domain · how\noften · last run (+ its call id) · next due · on/off · and whether anything watches it.\n\nThe **verdict is deliberately absent**: the gate writes it and reads it from the gate, so a\ncopy here would be a second store for one fact (the same reason the table has no verdict\ncolumn). An `event` row comes back as `unwatched`, which is the honest answer while no code\nreads its source.\n\nGATE (D-045 + MR24): the FOUNDER reads this with a user token, so it uses\n`_require_entity_access`, not `_require_service` — a service-only gate here would 403 the very\nsurface that reads it. Service callers bypass; user callers must be able to read the entity.","operationId":"hermes_recurring_tasks_api_v1_hermes_recurring_tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/recurring-tasks/run-due":{"post":{"tags":["hermes"],"summary":"Hermes Recurring Tasks Run Due","description":"project146 T0183's run path — dispatch what is due, and let each run discharge its own row.\n\n`triggered_by=\"cron\"` is deliberate, not cosmetic: `hermes_ops_kpi_service` counts exactly\n`cron` and `webhook` as the proactive triggers, so a task that ran on its own appears in the\n`proactivity_self_initiated` measure instead of looking like a human API call.\n\nGATE: dispatching is an ACT, not a read, so it needs `editor` — a viewer can watch the work\nwithout being able to start it.","operationId":"hermes_recurring_tasks_run_due_api_v1_hermes_recurring_tasks_run_due_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hermes/recurring-tasks/declare-upkeep":{"post":{"tags":["hermes"],"summary":"Hermes Recurring Tasks Declare Upkeep","description":"project146 T0210 — **the register contains its own upkeep.**\n\nDeclares the eight angle checks (`direction` · `operations` · `demand` · `money` · `law` ·\n`technology` · `people` · `knowledge`) and the row that re-tests the angle set, each as a real\nrow in the register: visible in `Pacing`, switchable one by one, with a rhythm. `D-157-006` is\nthe reason this is rows and not a service: *\"self-sustaining = the register contains the rows\nthat keep the machine alive\"* — upkeep as declared work rather than an assumption.\n\nIDEMPOTENT: an angle already declared is skipped and reported, so this is safe to call twice and\nsafe for a setup path to call. A **sector angle** (a clinic's `clinical`, a factory's `safety`)\nis the owner's own addition, declared through the same call.\n\nGATE: declaring is an ACT, not a read, so it needs `editor` — a viewer may read the register\nwithout being able to grow it.","operationId":"hermes_recurring_tasks_declare_upkeep_api_v1_hermes_recurring_tasks_declare_upkeep_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringTaskUpkeepRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/recurring-tasks/declare":{"post":{"tags":["hermes"],"summary":"Hermes Recurring Tasks Declare","description":"project146 T0206 — **the birth of a declaration.** Nothing could create a row until now, so\nthe register had no way to become non-empty and the whole feature stayed invisible.\n\nGATE: `editor` — declaring work is an act. The decider is recorded (`MASTER` §2.23): `owner`\nwhen he authors it, `owner_accepted_proposal` when he accepts one from the Chief of Staff.","operationId":"hermes_recurring_tasks_declare_api_v1_hermes_recurring_tasks_declare_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringTaskDeclareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/recurring-tasks/update":{"post":{"tags":["hermes"],"summary":"Hermes Recurring Tasks Update","description":"project146 T0208 — THE OWNER'S EDIT: change one rhythm, or switch one row off.\n\nGATE: `editor` (an edit is an act). The service records **who** decided it (`MASTER` §2.23),\nrefuses a cadence outside 1–168 hours — the same range the harness pacing accepts — and looks\nthe row up scoped by entity (MR24), so a row id from another company finds nothing.\n\nA refusal is returned as a reason (`cadence_out_of_range`, `row_not_found`, `no_change`), never\nas a silent success: the surface must be able to tell the owner that his edit did not land.","operationId":"hermes_recurring_tasks_update_api_v1_hermes_recurring_tasks_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringTaskUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/wake/run":{"post":{"tags":["hermes"],"summary":"Hermes Wake Run","description":"T0300h: check + fire the MR0t-logged wake bot call (registered 'Hermes Coordinator Wake',\nT0300h-r2). Loud 503 until that bot is provisioned — never fake success.","operationId":"hermes_wake_run_api_v1_hermes_wake_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesWakeRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/hermes/room/digest":{"post":{"tags":["hermes"],"summary":"Hermes Room Digest","description":"D-045: founder 'round room' READ digest — the FE's single source of truth for the\ntop-down see-state view (T0500). Entity-GATED for user tokens (can_read_entity), service\nbypass. Composition only, no logic duplication: calls the SAME deterministic services the\nservice-token endpoints expose (wake/ops-kpi/mast/recall) + a recent bot_call_logs read.\nWrites nothing (FE never writes the audit/memory path — the shell stays the writer).","operationId":"hermes_room_digest_api_v1_hermes_room_digest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HermesRoomDigestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/harness/session/open":{"post":{"tags":["harness"],"summary":"Harness Session Open","description":"D-052 — resolve a chat session's entity from the CALLER, server-side.\n\nWhy this endpoint exists: the shell's own ``/session/open`` took ``entity_id`` from\nthe client and bound the agent to it, and the shell authenticates nothing. A caller\ncould therefore name ANY entity, and every isolation guarantee downstream would\ninherit a client-chosen scope — D-054's toolset grant, D-061's memory read, D-062's\ndrafts. This endpoint is the authority instead; the shell binds the session to what\nTHIS returns and never to what it was asked for.","operationId":"harness_session_open_api_v1_harness_session_open_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionOpenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/harness/decide-queue":{"post":{"tags":["harness"],"summary":"Get Decide Queue","description":"GET-equivalent (POST-first) per-entity Decide queue: real lanes only, honest empties.\n\nData: {entity_id, generated_at, total, any_due, lanes:[process-gate, hermes-wake,\noutreach-drafts]}. Every count traces to a real row or the wake service. The drafts\nlane counts ledger rows since T102b; where migration 000010 is absent it says so and\nreports wired:false rather than a fabricated number.","operationId":"get_decide_queue_api_v1_harness_decide_queue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideQueueRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/harness/portfolio":{"post":{"tags":["harness"],"summary":"Get Harness Portfolio","description":"T103 / D-009 — ONE aggregate poll of per-entity outstanding counts (the rail's\nred badges + the portfolio zoom state). Reuses the SAME lane builders as the\ndecide-queue (single source of truth, no duplicated counting logic). MR24: a user\ncaller's entity set is resolved server-side via get_entities_by_owner — never a\nclient-trusted list. Read-only.\n\nPO rule (2026-09-21) — ANY preparation or question is a blocker and must be marked with\nthe ONE red dot, summarized, channeled through here. So this aggregate carries BOTH: the\nquestions (a process output awaiting approve/reject, a wake asking for a decision) and\nthe preparations (a draft written and waiting). A preparation missing from this sum is a\nred dot that never lights while work waits — which is exactly what happened to the\nprepared drafts before `preparation` was added. New attention sources belong in this sum,\nnever in a second badge (design-implication 8).","operationId":"get_harness_portfolio_api_v1_harness_portfolio_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/harness/command":{"post":{"tags":["harness"],"summary":"Post Harness Command","description":"T105 — issue an operator command/ask. Editor-gated (an act on the company, MR24).\nA named bot_id executes synchronously through the MR0t-logged runner; a free-form\ndirective is durably logged and honestly lands 'waiting_on_you' (no operator-gated\ncoordinator actuator exists by design — D-045).","operationId":"post_harness_command_api_v1_harness_command_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarnessCommandRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/harness/jobs":{"post":{"tags":["harness"],"summary":"Get Harness Jobs","description":"T105 — jobs drawer poll: newest-first durable jobs for the active entity, each with\nhonest status + freshness + duration + bot_call_id (receipts trace to Audit). Viewer-gated (MR24).","operationId":"get_harness_jobs_api_v1_harness_jobs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HarnessJobsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/harness/pacing":{"post":{"tags":["harness"],"summary":"Get Harness Pacing","description":"T107 — read the entity's pacing (viewer-gated, MR24): effective wake cadence +\npreset + whether defaults are active + who changed it last. Operator surface — service\ncallers are refused (they are not the operator).","operationId":"get_harness_pacing_api_v1_harness_pacing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PacingReadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/harness/pacing/update":{"post":{"tags":["harness"],"summary":"Update Harness Pacing","description":"T107 — set the entity's wake cadence (editor-gated act, MR24). Provide a preset\n(steady 24h / active 12h / close 6h) or an explicit cadence — not both. Every change\nrecords who + when (audit). Autonomy is never granted here — earned via MAST.","operationId":"update_harness_pacing_api_v1_harness_pacing_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PacingUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/outreach-ledger/recipient":{"post":{"tags":["outreach-ledger"],"summary":"Add Recipient","description":"Put a recipient on the board (status `selected`). Idempotent for an already-pending\nrecipient — the lane counts rows, so a duplicate would be a fabricated workload.","operationId":"add_recipient_api_v1_outreach_ledger_recipient_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientAddRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/outreach-ledger/recipient/{recipient_id}":{"patch":{"tags":["outreach-ledger"],"summary":"Set Recipient Status","description":"Move a row to a state we can prove: selected → drafted → sent.","operationId":"set_recipient_status_api_v1_outreach_ledger_recipient__recipient_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recipient_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipient Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["outreach-ledger"],"summary":"Remove Recipient","description":"Take a PENDING row off the board. A `sent` row is refused — it records something that\nhappened, and deleting it would erase evidence rather than undo work.","operationId":"remove_recipient_api_v1_outreach_ledger_recipient__recipient_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recipient_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipient Id"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/outreach-ledger/pending":{"get":{"tags":["outreach-ledger"],"summary":"Pending","description":"The Decide lane's read: pending drafts (selected/drafted), newest first.","operationId":"pending_api_v1_outreach_ledger_pending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/outreach-ledger/recipients":{"get":{"tags":["outreach-ledger"],"summary":"Recipients","description":"The board's own view: every row for the entity, whatever its state.","operationId":"recipients_api_v1_outreach_ledger_recipients_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/outreach-ledger/toggle":{"post":{"tags":["outreach-ledger"],"summary":"Toggle Recipient","description":"The board's checkbox, server-side. `on` is idempotent (a re-checked box does not\ncreate a second row); `off` removes only a PENDING row — unchecking a box cannot\nun-send an email, and the answer says so rather than pretending otherwise.","operationId":"toggle_recipient_api_v1_outreach_ledger_toggle_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientToggleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/outreach-ledger/status":{"post":{"tags":["outreach-ledger"],"summary":"Mark Recipient","description":"Mark the recipient the board holds: `drafted` when a draft was assembled, `sent`\nwhen the send happened. No row id needed — the board knows the pair, not the row.","operationId":"mark_recipient_api_v1_outreach_ledger_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientMarkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/waitlist/join":{"post":{"tags":["waitlist"],"summary":"Join Waitlist","operationId":"join_waitlist_api_v1_waitlist_join_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__waitlist_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/guest/taste":{"post":{"tags":["guest"],"summary":"Start Guest Taste","operationId":"start_guest_taste_api_v1_guest_taste_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestTasteRequest"}}},"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/guest/taste/{job_id}":{"get":{"tags":["guest"],"summary":"Get Guest Taste","operationId":"get_guest_taste_api_v1_guest_taste__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/guest/_durable":{"get":{"tags":["guest"],"summary":"Durable Probe","operationId":"durable_probe_api_v1_guest__durable_get","parameters":[{"name":"run_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/guest/pool":{"get":{"tags":["guest"],"summary":"Read Pool Facts","description":"How many investors the doorway can rank, and when the pool last changed.\n\nPublic and unauthenticated, like the rest of this router. It returns a COUNT and a timestamp and\nnothing else — no investor is named, listed or countable by anyone but us, and the count is the\nsame number the ranking will draw from, because both read one predicate (investor_pool_service).","operationId":"read_pool_facts_api_v1_guest_pool_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/guest/taste/claim":{"post":{"tags":["guest"],"summary":"Claim Guest Taste","description":"T1025 (P100 D-020/D-021) — the doorway's promise, kept.\n\nThe five emails a visitor was shown become his company's own prepared drafts, so\n`/messages` reaches them in the Drafts folder with the review the rest of the product\nalready has. No new table and no migration: the drafts' home is the call log the mail\nsurface already reads, so the claim REPLAYS the run scoped to the entity (D-020).\n\nAUTHORITY — what this endpoint deliberately does NOT do. It never adopts a company by\nname. An existing company is a company, and attaching a caller to one they do not own\nis the exact class `/api/v1/entity/claim-identity` was fixed for in P058 (a sibling\nruling on the same shape of fact, so it governs here). A company this endpoint creates\nis created FOR the caller, who is granted `owner` on it in the same transaction; a\ncompany that already exists is named back to the caller and left alone.\n\nIDEMPOTENT. The stamp the guest run wrote into each draft call (T1026) is the key: a\nrow already carrying this run and this entity proves that draft was claimed, so a\nrefresh, a second tab or a retry mints nothing and reports what already landed.","operationId":"claim_guest_taste_api_v1_guest_taste_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestTasteClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/feedback/sections":{"get":{"tags":["feedback"],"summary":"List Sections","description":"The dropdown's options for ONE page. Public, and deliberately so — the popup needs them\nbefore anyone has an account, and they are page structure rather than anything about a person.","operationId":"list_sections_api_v1_feedback_sections_get","parameters":[{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caller's pathname (`/`, `/blog/x`). Decides WHICH list is returned — see `sections_for_path`. Omitted means the page-agnostic list.","title":"Path"},"description":"The caller's pathname (`/`, `/blog/x`). Decides WHICH list is returned — see `sections_for_path`. Omitted means the page-agnostic list."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Store one visitor's message. Public — no auth, which is why the limiter exists.\n\n⚠️ **A REFUSAL SETS THE REAL HTTP STATUS, AND THE ENVELOPE IS NOT ENOUGH — measured, not\npreferred.** This estate's `ApiResponse` convention puts the code in the BODY\n(`statusCode: 400`) and returns it from a handler as FastAPI's default **HTTP 200**. That is\nfine for a caller written against the envelope, and it is a silent trap for one that is not:\nthe popup's own client (`apiClient.ts`) throws only on a non-2xx answer, so a 200 carrying\n`status: false` reads as **success** — the visitor would be shown *\"thank you\"* for a message the\nserver refused. Found by testing the route through the ASGI layer instead of calling the handler\ndirectly, which is the only way that gap is visible.\n\nSo both are now true: the envelope still carries `statusCode` for the estate's own readers, and\n`response.status_code` is set to match, so the HTTP layer tells the truth as well. `T0289.31`'s\nacceptance says *\"refused with 400\"* and now means it literally. The rate limit's **429** matters\nmost here: a monitoring check or a bot must not see 200 for a refusal.","operationId":"submit_feedback_api_v1_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feedback/list":{"get":{"tags":["feedback"],"summary":"List Feedback","description":"Every message the public panel captured, newest first, each beside the request it filed.\n\nThe request column is the answer to the only question a reader has about a row: *did this\nbecome work, and where is that work?* It is resolved by the queue's own de-duplication key\n(`subject_of`), which is the same key the bridge wrote the row under — so the link is the\nqueue's identity rather than a second column that could disagree with it.","operationId":"list_feedback_api_v1_feedback_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Pagesize"}},{"name":"signal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"negative | positive | neutral | comment. Omitted returns every message.","title":"Signal"},"description":"negative | positive | neutral | comment. Omitted returns every message."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call/{callId}/attribution":{"post":{"tags":["span-feedback"],"summary":"Span → kernel-candidate map for a completed call","description":"T0201 / D-007. Deterministic: no LLM call, no added latency on the bot run,\nand no marker ever enters the deliverable.\n\n`resolution: \"signature\"` is a real answer, not a degraded one — it means the\noutput had no field structure, so feedback on it takes the unmarked path (D-005).","operationId":"get_call_attribution_api_v1_bot_call__callId__attribution_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","title":"Callid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call/{callId}/span-rewrite":{"post":{"tags":["span-feedback"],"summary":"Mark + feedback → rewritten span (FAST, target p90 ≤ 3 s)","description":"T0300. Returns a CANDIDATE span and writes an exchange row. Writes no kernel —\nthe deliverable is only changed if the user accepts, and even then only in the\nview; the kernel learning is the async half (Phases 3–5, not yet enabled).\n\n`latencyMs` on the response is the number T0301 is measured on.","operationId":"rewrite_span_api_v1_bot_call__callId__span_rewrite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","title":"Callid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpanRewriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call/{callId}/span-rewrite/verdict":{"post":{"tags":["span-feedback"],"summary":"Accept / decline a rewritten span","description":"T0302 / T0303. The verdict lands in the exchange row's `evaluation`.\n\n**T0809 / D-019 — this route no longer learns anything itself.** It used to fire a\ncomplete second learning path (`62` → digest → write) beside the one the fan-out runs,\nso one accepted mark could write a memory line *and* propose a rewrite. There is now\none learning caller, and this route is one of its two entry points:\n\n  - **declined** → a chain starts HERE. A reject is a first-class signal (D-002/IN-03)\n    and there is no compose step to carry it.\n  - **accepted** → the chain starts at `/compose-version`, when the user applies the\n    mark. Learning follows the change actually committed to.\n\n`learningQueued` reports what HAS happened and is therefore always False here — the\nchain runs after the response. `learning.chainEligible` is what says what will.","operationId":"record_verdict_api_v1_bot_call__callId__span_rewrite_verdict_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","title":"Callid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerdictRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call/{callId}/compose-version":{"post":{"tags":["span-feedback"],"summary":"Apply accepted spans to produce the v+1 output — no model call","description":"T0804 / D-014. The parent's output with the accepted spans substituted in, written\nas a real call row under the ORIGINAL bot — which is what lets the existing\n`CompareOutputsModal` diff it against the parent with no new FE component (D-016).\n\n**No LLM runs here.** A re-run would regenerate every field, so it cannot produce\n\"the previous output with this sentence fixed\"; `modelInvoked: false` says so on\nevery response rather than leaving a reader to infer it.\n\n422 covers the refusals that are legitimate outcomes: a pending verdict, overlapping\nspans, or an offset that no longer matches the parent's text. Each is a case where\napplying the edit anyway would produce a plausible-looking wrong deliverable.","operationId":"compose_output_version_api_v1_bot_call__callId__compose_version_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","title":"Callid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeVersionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call/{callId}/versions":{"get":{"tags":["span-feedback"],"summary":"Every output version in this call's lineage, v1 first","description":"T0819 — the version switcher's source.\n\nAny version in the lineage may be passed and the same complete set comes back: the\nservice walks UP to the original before walking down. Selecting v3 in the UI and\nre-fetching must not lose v1.","operationId":"get_output_versions_api_v1_bot_call__callId__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","title":"Callid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call/{callId}/versions/select":{"post":{"tags":["span-feedback"],"summary":"Make this version the selected one for its lineage","description":"T0835 — the select half of the version switcher.\n\nSets `is_selected` on this row and clears it on every other version in the lineage, in\none transaction. Returns the refreshed lineage, so a caller writes and re-renders in a\nsingle round trip.\n\n⚠️ This is the ONLY endpoint that mutates a `bot_call_logs` row's own columns, and the\nonly one that ever should be. `is_selected` is a pointer into the lineage, not a fact\nabout the call; every fact stays write-once.\n\nIdempotent: selecting the already-selected version clears and re-sets the same row.","operationId":"select_output_version_api_v1_bot_call__callId__versions_select_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","title":"Callid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bot/call/{callId}/exchanges":{"get":{"tags":["span-feedback"],"summary":"The full v+1 exchange chain for one original call","description":"T0303's acceptance: one query returns the whole chain for one original callId.","operationId":"get_exchange_chain_api_v1_bot_call__callId__exchanges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string","title":"Callid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/kernel/most-relevant":{"post":{"tags":["span-feedback"],"summary":"62_single_kernel_most_relevant — candidates + feedback → exactly ONE kernelKey","description":"T0401 / Phase 3. The lean router: FAST tier, `deterministic=True`, and the candidates'\nindex blocks only — never a full assembly, never a kernel body.\n\n**Writes nothing.** It chooses; it does not persist, and it does not decide whether\nanything may be persisted. `below_floor` reports which side of the confidence floor\nthe answer fell on, and Phase 4's write gate is what refuses a write — a router that\nalso ruled on persistence would be two rules in one place (R-02).\n\nThe floor itself is **provisional** until T0107 derives it from T0403's hand-checked\nset; the response says so in `confidence_floor_provisional`.","operationId":"most_relevant_kernel_api_v1_kernel_most_relevant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MostRelevantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/patch-run/proposals":{"post":{"tags":["span-feedback"],"summary":"Everything one background kernel-fix run produced — proposals, not writes","description":"T0807 / D-016. The multi-kernel side of the diff: one `patchRunId` in, every kernel\nthe run proposed a change to out, each with its **current** content and the\n**proposed** content beside it — ready for `UnifiedDiffViewer` with no new component.\n\nA proposal is REBUILT here, not stored: the `73` row holds `delta_ops`, and those are\nre-applied to the kernel's current content at read time. So the diff is against what\nthe kernel says now, not a snapshot that may have moved underneath — and an op that no\nlonger applies comes back in `skippedOps` rather than vanishing.\n\n**Nothing here is in force.** D-017 stops the chain at a proposal; accepting one means\nPOSTing its `proposedContent` to `/kernel/apply-patch` with the same `patchRunId`,\nwhich is the one path where `guard_kernel_write` runs. `applied: true` marks the ones\nalready accepted, so a partly-accepted run reads as partly accepted.\n\nPOST rather than GET because the read is parameterised by entity — and `entity_id`\ndecides which VERSION each proposal is diffed against, so it belongs in a body where\nit is explicit rather than in a query string where it is easy to omit.","operationId":"get_patch_run_proposals_api_v1_kernel_patch_run_proposals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRunProposalsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/patch-run/verdict":{"post":{"tags":["span-feedback"],"summary":"Approve or REJECT one kernel proposal (T0842)","description":"T0842 — the review queue's OUTBOX.\n\nThe panel used to offer Apply-or-ignore, so **\"reviewed and rejected\" was\nindistinguishable from \"never opened\"** — R-01c's silent-state failure moved up one\nlevel onto the review step — and `73` could re-propose the same rejected edit forever\nwith nothing recording that a human had already said no. At the SPAN level a decline is\na first-class signal (D-002/IN-03); at the KERNEL level it was recorded nowhere.\n\n**This records a DECISION; it does not apply anything.** Applying still goes through\n`/kernel/apply-patch`, the one path where `guard_kernel_write` runs (D-017, R-01a).\n`approved` is accepted here too, so \"was this reviewed?\" is answerable — a store that\nonly held rejections could not answer it.\n\nPermission mirrors the write path: deciding the fate of a proposal on a kernel you\ncould not edit is not a decision, it is a note on someone else's work.","operationId":"record_patch_proposal_verdict_api_v1_kernel_patch_run_verdict_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalVerdictRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/patch-run/revert":{"post":{"tags":["span-feedback"],"summary":"Undo an auto-applied kernel patch (D-029)","description":"D-029 — the undo half of auto-learn, and the reason auto-apply is defensible at all.\n\n🚨 Auto-learn applies `73`'s patch to EVERY kernel including shared ones (👤's ruling),\nso nothing reviews the write before it lands. Reversibility stands in for review here —\nwhich is what the persona actually asks for (\"every action auditable and reversible\") —\nand that makes this endpoint load-bearing rather than a convenience.\n\nRestores the version immediately before the auto-applied one, as a NEW version. Nothing\nis deleted: the reverted version stays readable, or \"what did auto-learn do\" becomes\nunanswerable the moment it is undone.\n\nRefuses when the kernel has moved on since auto-learn wrote it — restoring then would\nsilently discard whoever edited on top, which is a lost update.\n\nPermission mirrors the write path: undoing a change on a kernel you could not edit is\nnot a correction, it is an edit to someone else's work.","operationId":"revert_auto_applied_patch_api_v1_kernel_patch_run_revert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertPatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/patch-runs":{"post":{"tags":["span-feedback"],"summary":"Every background kernel-fix run — the review queue's inbox (T0844)","description":"T0844. Until this existed, a run was reachable ONLY from the output that started it:\n`KernelFixRunPanel` is mounted inside `MarkableOutput` and needs the `patchRunId` that\n`/compose-version` returned. Navigate away and the run was **unreachable from the UI** —\nits proposals still existed, nothing listed them.\n\nThat is D-002's blind spot moved up one level. D-002 concedes nobody is watching at\nWRITE time; this was nobody being able to watch at REVIEW time either, so a run whose\nproposals no one applied looked exactly like a run that never happened. Paired with\nT0842 (no reject), the queue had neither an inbox nor an outbox.\n\n**POST, not GET** — same reason as `/patch-run/proposals`: `entity_id` changes the\nanswer and is access-checked, so it belongs in a body where omitting it is explicit\nrather than in a query string where it is easy to drop.\n\nReturns aggregates only. Open one run with `/patch-run/proposals` to see its diffs —\nthis endpoint never rebuilds proposed content, so listing is cheap.","operationId":"list_kernel_patch_runs_api_v1_kernel_patch_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRunListRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/patch-run/resume":{"post":{"tags":["span-feedback"],"summary":"Finish the marks a stopped run never routed","description":"T0810 / D-020. A background run whose process died leaves some marks unrouted. This\nruns **only those** — the difference between the marks the run was started for\n(journalled on the composed row before the task was ever queued) and the marks that\nalready have a router call.\n\nRe-running the whole run instead would mint duplicate `73` calls under the same id\nand make the run's own record ambiguous, which is the thing `patch_run_id` exists to\nprevent.\n\nReturns immediately with what it queued. Like every other chain entry point it\n**proposes and writes nothing** (D-017) — except the below-floor branch, which writes\na bounded memory line through the same gate as always (D-019).","operationId":"resume_patch_run_api_v1_kernel_patch_run_resume_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRunProposalsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/kernel/{kernelKey}/memory":{"get":{"tags":["span-feedback"],"summary":"Read the memory block on a kernel","description":"T0503. D-002 gives the user nothing at write time, so this is what owes them an\nanswer afterwards: every memory line on the kernel, each stamped with the exchange\nthat created it.\n\nReverting is a **forward version**, never a delete — kernels are append-only and a\n`bot_call_logs` row points at every version.","operationId":"read_kernel_memory_api_v1_kernel__kernelKey__memory_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kernelKey","in":"path","required":true,"schema":{"type":"string","title":"Kernelkey"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routes__span_feedback_manager__ApiResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/credits/get_credit_balance":{"post":{"tags":["credits"],"summary":"Api Get Credit Balance","description":"Return the authenticated user's canonical credit balance (1 indexed read, D-057).","operationId":"api_get_credit_balance_api_v1_credits_get_credit_balance_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/credits/get_user_statistics":{"post":{"tags":["credits"],"summary":"Api Get User Statistics","description":"Balance + ledger usage summary for the authenticated user.","operationId":"api_get_user_statistics_api_v1_credits_get_user_statistics_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/credits/get_credit_history":{"post":{"tags":["credits"],"summary":"Api Get Credit History","description":"The signed-in user's own movements — what moved, why, and the balance after it.\n\nThe customer-facing half of D-103: the wallet already showed ONE number, and a number that\ncannot be explained is a number nobody can trust (a support conversation could only confirm it).\nAn empty list is a real answer: this wallet has not moved since the record began.","operationId":"api_get_credit_history_api_v1_credits_get_credit_history_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditHistoryRequest","default":{"limit":50,"offset":0}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/credits/get_user_credits":{"post":{"tags":["credits"],"summary":"Api Get User Credits","description":"ADMIN ONLY — read ANY user's wallet, by uid or entity id (D-103 / T0111).\n\nWHY THIS ROUTE HAD TO EXIST. D-103 measured the asymmetry: `update_user_credits` carried the\nadmin token, while both read routes (balance, statistics) were user-scoped — so an operator could\nCHANGE a customer's credits and could not READ them. \"What has this customer spent\" was answerable\nonly from the customer's own screen or from a database session.\n\nIt returns the customer's own payload (same function) PLUS the two figures an operator actually\nneeds on the call: the rate this payer's plan debits per send, and therefore how many sends the\nbalance still buys. `ledger.matches` is three-valued — see `_wallet_read`: None means nothing has\nbeen recorded, which is not the same fact as a record that disagrees with the balance.","operationId":"api_get_user_credits_api_v1_credits_get_user_credits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreditsReadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/credits/get_guarantee_standing":{"post":{"tags":["credits"],"summary":"Api Get Guarantee Standing","description":"ADMIN ONLY — the First-Conversation Guarantee, MEASURED (P091 D-077, step 1 of MEASURE → GRANT → SURFACE).\n\nWHY THIS READ EXISTS. Growth and Scale are sold with a promise — *\"one investor response in your\nfirst 200 reachouts, or we keep sending free\"* — and D-077 recorded the honest state of it: the\npromise lived only in copy, and *\"a promise we cannot detect is honoured only when the customer\ncomplains.\"* The detection is now possible (`record_reply` marks the send a person answered), so\nthis route exposes, for one account: the reachouts it has sent, whether a human reply landed\ninside the promised window, and therefore whether the guarantee has been KEPT, is still IN\nPROGRESS, or is OWED.\n\n**IT GRANTS NOTHING.** `grant_due` is a fact, not an action: the grant is D-077's step 2 and runs\non the `credit_entity` rail, deliberately not here — a measurement that can also pay is a\nmeasurement nobody can check. `automated_reply_detectable` is reported on every reading because it\nis what makes `grant_due` trustworthy: it was False until 2026-10-05, when the reply path gained\n`dsn_scanner.is_automated_message` and an out-of-office could finally be told from a human reply\n(D-077 §5, D-129). A caller must read it before acting on `grant_due`.","operationId":"api_get_guarantee_standing_api_v1_credits_get_guarantee_standing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreditsReadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/credits/grant_guarantee":{"post":{"tags":["credits"],"summary":"Api Grant Guarantee","description":"ADMIN ONLY — pay the First-Conversation Guarantee, on demand, ONCE. (P091 D-077 step 2, D-130)\n\nWHAT IT DOES. Re-measures the account, decides whether the promise owes a block, and if it does,\ngrants `200 x the payer's own per-reachout rate` through `credit_entity` with reason\n`guarantee:<tier>` — the SAME rail every other credit arrives on (D-077: *\"no second balance\"*).\nThe ledger kind is `guarantee_grant`, its own, because this is the one kind **no human decides**.\n\nWHY IT REFUSES MORE OFTEN THAN IT PAYS. A refusal is a 409 carrying the reason in words an operator\ncan quote — *\"a person answered inside the window\"*, *\"the promise has already funded 400\nreachouts and 217 have been sent\"*. The expensive failure is not a missed grant, it is a second\none, so every not-owed branch returns without moving money. Idempotency is arithmetic (the ledger\ncount against `200 x (grants + 1)`), not a flag that could disagree with the money.\n\n⚠️ **UNTIL THE `000047` MIGRATION IS APPLIED IN BOTH DATABASES, A GRANT IS REFUSED BY THE DATABASE**\n— `guarantee_grant` is not in the CHECK constraint yet, so the write fails rather than land. That is\nthe correct order: the constraint has to exist before a writer may use its value (the vocabulary\ncomment in `entity_credit_utils.py`), because the alternative is a 500 on a money path. Apply\n`playano-db/raisy/migrations/000047_credit_ledger_guarantee_kind.up.sql` first.\n\n**THIS IS NOT YET THE PROMISE.** The promise is *\"we keep sending free\"* — without the customer\nasking, and without an operator noticing. The automatic trigger belongs at the send gate, where the\npromise is already being evaluated with the payer's own facts in hand, and D-130 records why it\ndoes not land before the migration does. Until then this route is the honest intermediate: strictly\nbetter than D-077's recorded state (*\"honoured only when the customer complains\"*), and not the\nwhole thing.","operationId":"api_grant_guarantee_api_v1_credits_grant_guarantee_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreditsReadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/credits/update_user_credits":{"post":{"tags":["credits"],"summary":"Api Update User Credits","description":"ADMIN ONLY — credit or debit a user's canonical balance.\n\nPorted from glowtest's update_user_credits (admin credit-correction surface),\nre-keyed to the person Entity. A negative amount performs an atomic debit.","operationId":"api_update_user_credits_api_v1_credits_update_user_credits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserCreditsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/setup-run/_pool":{"get":{"tags":["setup-run"],"summary":"Get Pool State","description":"What the app's OWN connection pool is doing right now.\n\nAdded 2026-09-19 (RULES_MASTER §2.19, never assume): three explanations of the same\n`QueuePool limit ... reached` failure were each refuted by a measurement, and no view from\noutside the process can settle it — `pg_stat_activity` is a snapshot that cannot see a burst,\nand at rest the pool looks healthy. This reports the pool object's own counters, so the\nquestion \"is it the app holding its own connections?\" becomes a number anyone can read,\nincluding whether it CLIMBS between calls.\n\n⚠️ DECLARED BEFORE `/setup-run/{run_id}` ON PURPOSE: FastAPI matches routes in declaration\norder, so the parameterised route first would swallow `_pool` and read it as a run id.","operationId":"get_pool_state_api_v1_setup_run__pool_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Pool State Api V1 Setup Run  Pool Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/setup-run/{run_id}":{"get":{"tags":["setup-run"],"summary":"Get Setup Run","operationId":"get_setup_run_api_v1_setup_run__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Setup Run Api V1 Setup Run  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/setup-run/entity/{entity_id}/latest":{"get":{"tags":["setup-run"],"summary":"Get Latest Setup Run","operationId":"get_latest_setup_run_api_v1_setup_run_entity__entity_id__latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Latest Setup Run Api V1 Setup Run Entity  Entity Id  Latest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/setup-run/{run_id}/stop":{"post":{"tags":["setup-run"],"summary":"Stop Setup Run","description":"Ask the run being walked RIGHT NOW to stop before its next step.\n\nA refusal here is the honest answer, not a failure: if this process is not walking that run there\nis nothing to stop, and saying \"stopped\" would be a label with no mechanism behind it.","operationId":"stop_setup_run_api_v1_setup_run__run_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stop Setup Run Api V1 Setup Run  Run Id  Stop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/setup-run/{run_id}/resume":{"post":{"tags":["setup-run"],"summary":"Resume Setup Run","description":"Continue a run whose rungs are not all finished.\n\nCarries the rungs that SUCCEEDED — `_settled_rungs` reads their persisted `done` state and the\nwalk skips them instead of repeating them, which is the rule: a rung that succeeded is never\nre-done. It matters most at L3, which CONSTRUCTS processes.","operationId":"resume_setup_run_api_v1_setup_run__run_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resume Setup Run Api V1 Setup Run  Run Id  Resume Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/setup-run/loop/{entity_id}/{rung}":{"get":{"tags":["setup-run"],"summary":"Get Loop Comparison","description":"One rung across two runs of the same entity — the loop's own reading.\n\nRead-only on purpose: the comparison is what a person decides ON, and the decision itself goes\nthrough the proposal-verdict path (`SetupLoopService.decide`), which refuses to keep a\nregression and refuses a change confirmed by its own proposer (D-136-053). Exposing the\nreading without exposing a keep is the whole point of that separation.\n\nWithout named runs it takes the entity's two most recent FINISHED ones; with fewer than two it\nsays so rather than comparing a run against itself, because one run is a baseline, not a trend.\n\n⚠️ NOT YET THE FULL ITERATION (T0206): nothing here RE-RUNS a rung. This reports the comparison\nof two runs that already exist. The re-run step is unbuilt and is the loop's open fork.","operationId":"get_loop_comparison_api_v1_setup_run_loop__entity_id___rung__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"rung","in":"path","required":true,"schema":{"type":"string","title":"Rung"}},{"name":"previous_run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Run Id"}},{"name":"current_run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Loop Comparison Api V1 Setup Run Loop  Entity Id   Rung  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/setup-run/loop/{run_id}/{rung}/iterate":{"post":{"tags":["setup-run"],"summary":"Iterate Setup Loop","description":"RE-RUN ONE RUNG inside its own run, and hand back what changed.\n\nThis is the piece that turns the loop from something a person calls by hand into something the\nmachine asks for: the comparison route above READS two runs, this one makes the second.\n\nIt does not keep the change. Keeping is a proposal-and-verdict act (the proposer cannot be the\nconfirmer, D-136-053), so the harness gets the reading and a human gets the decision — a route\nthat kept its own change would be the open loop with extra steps.\n\nThe walk runs on its own database session in a worker thread, like starting and resuming a run:\na re-run is not a request-sized act, and holding the request's connection across it is how a\nrun gets killed by a pool timeout (measured 2026-09-22).","operationId":"iterate_setup_loop_api_v1_setup_run_loop__run_id___rung__iterate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"rung","in":"path","required":true,"schema":{"type":"string","title":"Rung"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Iterate Setup Loop Api V1 Setup Run Loop  Run Id   Rung  Iterate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/setup-run":{"post":{"tags":["setup-run"],"summary":"Start Setup Run","description":"Run the whole act and return the record. The stream is the console's path; this is\nthe path a script or a test uses, and it must produce the SAME record — if the two ever\ndiverge, the console is showing something the ledger does not hold.","operationId":"start_setup_run_api_v1_setup_run_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Setup Run Api V1 Setup Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/subscription/webhook":{"post":{"tags":["subscription"],"summary":"Webhook","description":"Stripe webhook endpoint. Signature-verified; idempotent per event_id.","operationId":"webhook_api_v1_subscription_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/subscription/payment-links":{"get":{"tags":["subscription"],"summary":"Api Payment Links","description":"THE BUY BUTTONS, served from the config kernel so minting a link needs no frontend deploy.\n\nA Payment Link URL is public by nature — it is the address a customer clicks — and it is CONFIG, not\ncode: it lives in `cfg/raisy_subscription_plans.json` (`stripe.payment_link_ids`), the same kernel\nthat holds the tier grants. The frontend used to carry these as BUILD-TIME env (`VITE_STRIPE_*`),\nwhich made every new link a code edit plus a frontend rebuild; a link that exists in Stripe but not\nin a deployed bundle is a customer who cannot pay, and on 2026-09-20 the DEV frontend had not\nredeployed 40 minutes after a push, which is exactly the wrong dependency for a buy button.\n\nUnauthenticated on purpose: it returns only what a public Stripe page already shows. Unconfigured\nlinks are OMITTED rather than returned empty, so the caller can tell \"not minted yet\" from \"minted\".","operationId":"api_payment_links_api_v1_subscription_payment_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/subscription/checkout-credits":{"post":{"tags":["subscription"],"summary":"Api Checkout Credits","description":"Open a Stripe Checkout Session for the amount the customer chose ON THE CARD.\n\nWHY A SESSION RATHER THAN THE PAYMENT LINK. The Add-credits Payment Link is a pay-what-you-want\npage: the amount is typed AT STRIPE, so our card could only describe it and the customer met the\none field that decides the purchase on somebody else's page. A Payment Link cannot be told an amount\nfrom outside it (there is no parameter for it), so putting the choice on our own card — what the PO\nasked for (2026-09-21) — means creating the session here.\n\nTHE TWO THINGS THE WEBHOOK NEEDS, both set by us and NEITHER inferable from the amount:\n  * `client_reference_id` = the raisy uid. This is how `_grant_for_payment` resolves the payer, and\n    a payment it cannot attribute is REFUSED and deferred — so this is the line that makes the money\n    land on the right account;\n  * `metadata.tier = \"credits\"`, which selects the CREDITS rail. Without it the rail is inferred\n    from the amount, and a $49 top-up is exactly Starter's price (D-082) — a correct top-up would be\n    recorded, and audited, as a subscription.\n\nNO TAX IS ENABLED on the session, so `amount_total` IS the amount he chose — the field the webhook\nreads, per the kernel's tax-inclusive rule (`stripe.tax_behavior`). And the credits returned here are\ncomputed from the kernel's `credits_per_usd`, the same number the grant will use: the figure the card\nshows and the figure that lands come from one home.","operationId":"api_checkout_credits_api_v1_subscription_checkout_credits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreditsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/subscription/my_subscription":{"post":{"tags":["subscription"],"summary":"Api My Subscription","description":"Current credit balance + tier grant summary for the authenticated user.","operationId":"api_my_subscription_api_v1_subscription_my_subscription_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/subscription/portal":{"post":{"tags":["subscription"],"summary":"Api Subscription Portal","description":"D-059 — create a Stripe Customer Portal session for the user's stored\nstripe_customer_id and return the hosted URL (self-serve cancel, invoices,\npayment method — RULES_APP_LEGAL_COMPLIANCE §4.3: cancel as easy as sign-up).","operationId":"api_subscription_portal_api_v1_subscription_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/mail/sender-trust":{"get":{"tags":["mail"],"summary":"Domain 2 Sender Trust","description":"Sender trust (D-145-002): 1-15 composite of NAMED public signals\n(SPF/DKIM-configured/DMARC + domain age + DNSBL cleanliness), computed\nlive from DNS/RDAP/DNSBL with a 1h shared cache. score=null = unrated\n(honest) — never a fabricated middle score.","operationId":"domain_2_sender_trust_api_v1_mail_sender_trust_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"Sender domain, e.g. gmail.com","title":"Domain"},"description":"Sender domain, e.g. gmail.com"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mail/domain-situation":{"get":{"tags":["mail"],"summary":"Domain 2 Situation","description":"WHAT THIS DOMAIN IS, so the email-setup journey can serve a client we have\nnever seen (P134 T1352, D-134-028): is it registered, who holds the zone\n(Cloudflare decides how it is connected), is there a website, is mail already\nrunning, and is the mail authentication up.\n\nFacts only - no score, no advice, and `null` where DNS did not answer.","operationId":"domain_2_situation_api_v1_mail_domain_situation_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"The domain the customer brings or we registered, e.g. example.com","title":"Domain"},"description":"The domain the customer brings or we registered, e.g. example.com"},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"force a fresh read - the wizard's own re-check","default":false,"title":"Refresh"},"description":"force a fresh read - the wizard's own re-check"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainSituationEnvelope"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warmup/readiness":{"get":{"tags":["warmup"],"summary":"Warmup Readiness","description":"@P120 — one identity's readiness record: measurement · recommendation · sub-scores.\n\nThe answer the PO asked for: **does this mailbox need warming, and if not, what does it need?**\nA receiving-only mailbox is `NOT-APPLICABLE` and never `ready` — the defect D-012 exists to end.","operationId":"warmup_readiness_api_v1_warmup_readiness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"identity","in":"query","required":true,"schema":{"type":"string","description":"Sending mailbox, e.g. outreach@getraisy.net","title":"Identity"},"description":"Sending mailbox, e.g. outreach@getraisy.net"},{"name":"role","in":"query","required":false,"schema":{"type":"string","description":"sender · receiver · health_test_target · shared_mailbox","default":"sender","title":"Role"},"description":"sender · receiver · health_test_target · shared_mailbox"},{"name":"use_case","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case"}},{"name":"content_class","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Class"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Window Days"}},{"name":"score","in":"query","required":false,"schema":{"type":"boolean","description":"run the engine battery against a canonical message from this identity (the hover sub-scores). Off by default: a panel open must not wait on four engines.","default":false,"title":"Score"},"description":"run the engine battery against a canonical message from this identity (the hover sub-scores). Off by default: a panel open must not wait on four engines."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warmup/engines/health":{"get":{"tags":["warmup"],"summary":"Warmup Engine Health","description":"@P120 A1/A4 — is the engine battery ANSWERING, and would the composite stand on every family?\n\n⚠️ WHY A ROUTE AND NOT ONLY A LOG (D-018 §6, measured 2026-10-05/06): three sibling engines went\nabsent, the deploy still reported success, and **nothing said so** — the composite read\n`1 of 3 families`, correctly labelled and invisible until somebody opened a panel or read the\njournal. This is the reading that answers it on demand, from inside the network the BE already\nlives on, so the next absence is one GET away instead of a `docker ps` on the box.\n\nIt is a DIAGNOSTIC, not a customer surface: it names endpoints and container reasoning that\nbelong to us (D-017 governs what the founder reads, and this route is not in her panel). The\nengines' own display names she sees stay in the FE's map.","operationId":"warmup_engine_health_api_v1_warmup_engines_health_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"probe","in":"query","required":false,"schema":{"type":"boolean","description":"ask the local engines now. Off returns the configuration and the DNS legs only, for a caller that must not spend a round-trip.","default":true,"title":"Probe"},"description":"ask the local engines now. Off returns the configuration and the DNS legs only, for a caller that must not spend a round-trip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warmup/test-health":{"post":{"tags":["warmup"],"summary":"Warmup Test Health","description":"@P120 D-002's ACTION half — *\"Automate TEST HEALTH: one probe fans out to the owned judge set\nand the system auto-receives + distills the verdict\"* — pressed on demand rather than waited for.\n\nTHE CARD ALREADY REPORTS THE LAST VERDICT; THIS RUNS ONE. The two are different objects, which is\nwhy the row stayed open after §25 shipped the card: a founder looking at a three-week-old reading\nhas no way to ask *\"and now?\"* without waiting for the cadence.\n\nIT IS A REAL SEND, from her own mailbox, through the same transport real outreach uses (`run_once`\ninjects the outreach sender — §13's whole finding). So it is guarded three ways, and each guard\nanswers with the reason rather than being silent:\n\n  1. **a receiving-only mailbox is refused** (D-010). The role rule is asked through\n     `receiving_only_addresses`, the same single home the cadence uses;\n  2. **a second probe inside the cooldown is refused**, returning the verdict we already have —\n     a button that sends real mail must be safe to press twice;\n  3. **the wait is bounded** (`wait_seconds`, default 30 s against the ~17 s a probe measures).\n     If the message has not arrived by then the outcome is `not_seen`, which is a FINDING and\n     part of the denominator, not a failure — and the reading is recorded either way.\n\nOutcome vocabulary is C1's, unchanged: `ran` · `not_seen` · `not_ready` · `error`, plus this\naction's own `refused` and `too_recent`. Nothing is collapsed: *\"we could not look\"* must never\nread as *\"it landed nowhere\"*.","operationId":"warmup_test_health_api_v1_warmup_test_health_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"identity","in":"query","required":true,"schema":{"type":"string","description":"The sending mailbox to probe, e.g. outreach@getraisy.net","title":"Identity"},"description":"The sending mailbox to probe, e.g. outreach@getraisy.net"},{"name":"wait_seconds","in":"query","required":false,"schema":{"type":"integer","maximum":120,"minimum":5,"description":"How long to wait for the message to arrive","default":30,"title":"Wait Seconds"},"description":"How long to wait for the message to arrive"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warmup/list-hygiene":{"get":{"summary":"Warmup List Hygiene","description":"@P120 §29ba — WHICH ADDRESSES ARE DUE A RE-VERIFICATION, the reader `reverify_after_days_unused`\nnever had.\n\nThe kernel has declared a 90-day re-verification of unused addresses since D-010, and nothing read\nit (the shipped duration check named the key as read-by-nothing on every run). @P292 D-292-004 ruled\nit **BUILD** rather than delete, because the promise is owed to the person at the other end of an\naddress we have held but not contacted — so this route is the reading half: it answers *which*, and\nthe re-checking itself stays a separate, scoped decision (`services/list_hygiene_service.py`).\n\n⚠️ **ADMIN OR SERVICE, NOT ANY SIGNED-IN USER** — this returns RECIPIENT ADDRESSES, which are other\npeople's personal data, and no product surface needs them. `validate_service_or_user_token` is the\nrouter's other guard; this one route asks the narrower question, for the reason the mailbox list\nlearned the hard way: the guard a route declares must match what it returns.","operationId":"warmup_list_hygiene_api_v1_warmup_list_hygiene_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"the re-verification window in days; omit to read it from the compliance kernel (limits.list_hygiene.reverify_after_days_unused)","title":"Days"},"description":"the re-verification window in days; omit to read it from the compliance kernel (limits.list_hygiene.reverify_after_days_unused)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":500,"title":"Limit"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"narrow to one sending entity; omit for all","title":"Entity Id"},"description":"narrow to one sending entity; omit for all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/whatsapp/status":{"get":{"tags":["whatsapp"],"summary":"Whatsapp Status","description":"Is a WhatsApp linked, to which number, and how exposed is it right now?","operationId":"whatsapp_status_api_v1_integrations_whatsapp_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/whatsapp/qr":{"get":{"tags":["whatsapp"],"summary":"Whatsapp Qr","description":"The current linking code, with its age — because the code ROTATES (D-204-006).","operationId":"whatsapp_qr_api_v1_integrations_whatsapp_qr_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/whatsapp/disconnect":{"post":{"tags":["whatsapp"],"summary":"Whatsapp Disconnect","description":"End the link — at WhatsApp, not merely in our records.\n\nA disconnect that only forgot our copy would leave the phone still linked to a gateway it can no\nlonger reach, which is precisely the \"we ended access\" lie the vault's revocation vocabulary\nexists to prevent. So this asks the GATEWAY to log the session out, and reports what actually\nhappened: `revoked` when the gateway confirms it, `revoke_unreachable` when it did not answer.","operationId":"whatsapp_disconnect_api_v1_integrations_whatsapp_disconnect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/whatsapp/conversations":{"get":{"tags":["whatsapp"],"summary":"Whatsapp Conversations","description":"The conversation list — one row per contact, newest thread first.\n\n`entity_id` is the CHANNEL OWNER (the client whose WhatsApp is linked), not the prospect. The\nprospect is the thread; the client is who may read it. Getting this backwards would let one\nclient read another's conversations, so the permission check is against the owner.","operationId":"whatsapp_conversations_api_v1_integrations_whatsapp_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/whatsapp/conversations/{thread_id}":{"get":{"tags":["whatsapp"],"summary":"Whatsapp Conversation","description":"One thread: the messages in order, each inbound one with the reply prepared for it.","operationId":"whatsapp_conversation_api_v1_integrations_whatsapp_conversations__thread_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/whatsapp/replies/{communication_id}/send":{"post":{"tags":["whatsapp"],"summary":"Whatsapp Send Reply","description":"Accept a prepared reply and send it. The ONE place this channel sends anything.\n\nATOMIC AGAINST A SECOND ACCEPT (P204 C5): the status is re-checked here and a reply that is no\nlonger `pending` is refused with 409. Two admins looking at the same conversation is normal; the\nsecond one must LOSE CLEANLY rather than send the message twice.\n\nF7 — a send that fails is recorded as `failed` with its reason, never dropped. \"The operator\napproved it and nothing happened\" is the one outcome this channel must never produce silently.","operationId":"whatsapp_send_reply_api_v1_integrations_whatsapp_replies__communication_id__send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"communication_id","in":"path","required":true,"schema":{"type":"string","title":"Communication Id"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"default":{},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/whatsapp/replies/{communication_id}/reject":{"post":{"tags":["whatsapp"],"summary":"Whatsapp Reject Reply","description":"Reject a prepared reply. The row is KEPT — `cancelled`, not deleted.\n\nThe rejection is the training signal (P135: the verdict feeds raisy_62 → raisy_73). Deleting the\nrow would destroy the only record of what the model proposed and the human refused, which is the\nmost valuable sentence in the whole loop.","operationId":"whatsapp_reject_reply_api_v1_integrations_whatsapp_replies__communication_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"communication_id","in":"path","required":true,"schema":{"type":"string","title":"Communication Id"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"default":{},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/whatsapp/incoming":{"post":{"tags":["whatsapp"],"summary":"Whatsapp Incoming","description":"Receive one inbound message from the transport, record it, and prepare a draft.\n\nReturns 200 for a message that was RECORDED, which is not the same as a message that was\nanswered. `drafted: false` with a `draft_error` is a normal, honest outcome — the bot may not be\nprovisioned, speech-to-text may be down, the message may be a voice note we could not read. In\nevery one of those cases the operator still sees that somebody wrote, which is the promise this\nroute makes. The only failures that raise are malformed payloads and the database itself.","operationId":"whatsapp_incoming_api_v1_whatsapp_incoming_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/deploy-event":{"post":{"summary":"Deploy Event","description":"P127 T147 — a deploy reports its own START failure, from OUTSIDE the watcher.\n\nWHY HERE, BESIDE /health, AND NOT IN A ROUTER: the whole deploy story is one read, and\n`build_stamp` already owns it — `/health` publishes `deploy` and this writes the one field\nthat cannot come from the environment (the failure the watcher is unable to mention, because\na process that never started cannot log its own absence). Keeping the write beside the read\nmeans a reader has one file to look at, and it avoids mounting a router for one endpoint.\n(`api/routes/admin_manager.py` was the first home chosen and is NOT mounted — the endpoint\nwould have been unreachable dead code, which the 404 in its own test caught.)\n\nService-token gated: the caller is a machine on the box, not a person. A user token would\nmake the deploy's own health writable by any signed-in account.","operationId":"deploy_event_api_v1_deploy_event_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/health":{"get":{"summary":"Health Check","description":"Health check for load balancers / container orchestrators.\n\nVerifies the process AND its critical dependency (PostgreSQL) with a real\nSELECT 1 round-trip on the shared engine. Returns 503 when the DB is\nunreachable so orchestrators mark the container unhealthy instead of\nrouting traffic to a half-alive service (docker-compose healthcheck,\nCloud Run, LB probes all key off this endpoint). Sync def on purpose:\nthe DB round-trip runs in the threadpool, not the event loop.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","description":"API info endpoint","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcquisitionEnqueueRequest":{"properties":{"urls":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Urls","description":"Listing-page URLs (service caps at 20 — capped, not rejected)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source label; defaults to p107_acquisition"}},"type":"object","required":["urls"],"title":"AcquisitionEnqueueRequest","description":"PROJECT-107 / D-004 — enqueue a batch/list of listing URLs onto the scrape queue.\nOversized batches are CAPPED (not rejected) by the service at ACQUISITION_MAX_URLS=20\n(T0206/T0207). max_length here is an abuse guard only, not the business cap."},"AcquisitionWorkerRequest":{"properties":{"steps":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Steps","description":"Worker steps to run (each processes up to `limit` rows of the front batch)","default":1},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Rows per worker step","default":20}},"type":"object","title":"AcquisitionWorkerRequest","description":"PROJECT-107 / D-004 — FIFO batch worker trigger (scheduler/poll calls this)."},"ActivateRequest":{"properties":{"process_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Process Ids","description":"Specific validated processes to activate"}},"type":"object","title":"ActivateRequest"},"AddReferencesToBd0Request":{"properties":{"botId":{"type":"string","title":"Botid","description":"The bot whose BD0 kernel gains the properties."},"names":{"items":{"type":"string"},"type":"array","title":"Names","description":"Reference names to declare, e.g. ['sender']."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Scope for kernel resolution."},"descriptions":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Descriptions","description":"TJ15 — description per name, as the operator approved it. Omit a name to let the server derive one from the bot's own kernels."},"types":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Types","description":"TJ16 — JSON Schema type per name. Omit to derive from the bot's own kernels, falling back to 'string'."}},"type":"object","required":["botId","names"],"title":"AddReferencesToBd0Request","description":"PROJECT-099B TC04 — declare undeclared references on a bot's BD0."},"AddSkillRequest":{"properties":{"slug":{"type":"string","title":"Slug"},"sub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sub"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"background":{"type":"boolean","title":"Background","default":false},"progress_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Progress Entity Id"}},"type":"object","required":["slug"],"title":"AddSkillRequest"},"AdjustProcessRequest":{"properties":{"node_id":{"type":"string","title":"Node Id","description":"Which node to adjust"},"changes":{"additionalProperties":true,"type":"object","title":"Changes","description":"What changed"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why the adjustment","default":""}},"type":"object","required":["node_id","changes"],"title":"AdjustProcessRequest"},"AffiliatesRequest":{"properties":{"related_entity_id":{"type":"string","title":"Related Entity Id","description":"The organisation — find everyone affiliated with it"},"relationship_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Type","description":"Filter by type"}},"type":"object","required":["related_entity_id"],"title":"AffiliatesRequest"},"ApprovalSettingUpdateRequest":{"properties":{"mode":{"type":"string","title":"Mode","description":"MANUAL|SEMI_AUTO|FULL_AUTO|CONFIDENCE_BASED"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"overall|internal|external","default":"overall"},"confidenceThreshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confidencethreshold","description":"0-100, used when mode=CONFIDENCE_BASED","default":90}},"type":"object","required":["mode"],"title":"ApprovalSettingUpdateRequest","description":"Update approval settings for a process"},"ApproveProcessRequest":{"properties":{"approved":{"type":"boolean","title":"Approved","description":"Approve or reject"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Human reviewer notes","default":""}},"type":"object","required":["approved"],"title":"ApproveProcessRequest"},"ApproveSkillRequest":{"properties":{"slug":{"type":"string","title":"Slug"},"sub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sub"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["slug"],"title":"ApproveSkillRequest","description":"T0251 — approve ONE slug with no `dev_request` behind it.\n\n`sub` MUST be the same value that will be passed to `/add`, because it decides the\n`source_node` the approval is scoped to and the gate looks the approval up by that node. The\ntwo are derived by the same function, so passing the same `sub` to both is what makes them\nagree — and passing a different one records an approval that never takes effect."},"ArtefactCheckRequest":{"properties":{"artefact_kind":{"type":"string","title":"Artefact Kind","description":"One of: tagline, pitch_1min, deck, speaker_script"},"artefact_text":{"type":"string","minLength":1,"title":"Artefact Text","description":"The artefact itself. Pasted for short artefacts; the extracted text of an uploaded file for a deck."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The entity the artefact belongs to. Required: the surface is entity-scoped (D-280-016)."},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label","description":"What she calls this artefact, so a later run can be compared to this one."}},"type":"object","required":["artefact_kind","artefact_text"],"title":"ArtefactCheckRequest"},"AssessStageRequest":{"properties":{"owner_entity_id":{"type":"string","title":"Owner Entity Id","description":"Entity running the call (owning side)"},"related_entity_id":{"type":"string","title":"Related Entity Id","description":"Investor/contact entity id"},"relationship_type":{"type":"string","title":"Relationship Type","description":"Relationship edge type (default investor)","default":"investor"},"transcript_window":{"type":"string","title":"Transcript Window","description":"Most recent conversation transcript window"},"auto":{"type":"boolean","title":"Auto","description":"True when fired by the auto smart-trigger","default":false}},"type":"object","required":["owner_entity_id","related_entity_id","transcript_window"],"title":"AssessStageRequest"},"AttachSkillRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"BD155 kernel to attach"},"botDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimensionsub","description":"BD155.<sub> slot being filled. Sent so the BE can refuse a cross-category bind rather than silently re-filing the kernel."},"reclassify":{"type":"boolean","title":"Reclassify","description":"Bind a kernel from a DIFFERENT BD155.<sub> than the slot asked for, re-filing the slot and rewriting the bot's classification to match. Set this only when the caller picked the kernel from the `alternatives` the signature/skill-status response offered — it records the classifier being overruled, so it must never be a default.","default":false}},"type":"object","required":["kernelKey"],"title":"AttachSkillRequest","description":"T0120: bind a finished BD155 skill kernel into a bot's pending skill slot."},"AttributionRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity the call ran for. Omitted = read it off the call/bot."}},"type":"object","title":"AttributionRequest"},"BatchConstructRequest":{"properties":{"deliverable_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Deliverable Ids","description":"If omitted, all approved deliverables"}},"type":"object","title":"BatchConstructRequest"},"BenchmarkRequest":{"properties":{"task_id":{"type":"string","title":"Task Id","description":"Stable identifier for this benchmark task"},"input_prompt":{"type":"string","title":"Input Prompt","description":"Task prompt sent to both systems"},"bot_id":{"type":"string","title":"Bot Id","description":"Raisy botId to invoke"},"rubric":{"items":{"$ref":"#/components/schemas/RubricItem"},"type":"array","title":"Rubric","description":"Judge rubric dimensions","default":[{"id":"follows_rules","description":"Output follows the provided rules/standards","weight":1},{"id":"completeness","description":"Output is complete and actionable","weight":1},{"id":"accuracy","description":"No hallucinated facts, paths, or APIs","weight":1},{"id":"clarity","description":"Output is clear and well structured","weight":1}]},"model":{"type":"string","title":"Model","description":"LLM model pinned for both arms (ceteris paribus)","default":"gemini-3.1-flash-lite"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Optional entity barcode for Raisy bot scoping"},"mode":{"type":"string","title":"Mode","description":"Raisy bot mode preset (fast/medium/quality)","default":"fast"},"optional_args":{"additionalProperties":true,"type":"object","title":"Optional Args","description":"Structured args passed to the Raisy bot (e.g., artifact_type, title, body)"},"baseline_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baseline System Prompt","description":"Custom system prompt for the baseline arm. If omitted, uses the default 1-sentence prompt."}},"type":"object","required":["task_id","input_prompt","bot_id"],"title":"BenchmarkRequest"},"BenchmarkResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"task_id":{"type":"string","title":"Task Id"},"input_prompt":{"type":"string","title":"Input Prompt"},"raisy":{"$ref":"#/components/schemas/VariantResult"},"baseline":{"$ref":"#/components/schemas/VariantResult"},"winner":{"type":"string","title":"Winner"},"quality_delta":{"type":"number","title":"Quality Delta"},"latency_ratio":{"type":"number","title":"Latency Ratio"},"judge_model":{"type":"string","title":"Judge Model"},"rubric":{"items":{"$ref":"#/components/schemas/RubricItem"},"type":"array","title":"Rubric"},"baseline_system_prompt":{"type":"string","title":"Baseline System Prompt"},"run_at":{"type":"string","title":"Run At"}},"type":"object","required":["status","task_id","input_prompt","raisy","baseline","winner","quality_delta","latency_ratio","judge_model","rubric","baseline_system_prompt","run_at"],"title":"BenchmarkResponse"},"BoardSetStageRequest":{"properties":{"owner_entity_id":{"type":"string","title":"Owner Entity Id","description":"Raise company (related side of the stored investor edge)"},"investor_entity_id":{"type":"string","title":"Investor Entity Id","description":"Fund entity (entity_id side of the stored investor edge)"},"stage":{"type":"string","title":"Stage","description":"BD70.x stage to set, e.g. BD70.4"}},"type":"object","required":["owner_entity_id","investor_entity_id","stage"],"title":"BoardSetStageRequest"},"Body_complete_step_api_v1_process_step_complete_post":{"properties":{"final_output":{"additionalProperties":true,"type":"object","title":"Final Output"},"step_results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Step Results"}},"type":"object","title":"Body_complete_step_api_v1_process_step_complete_post"},"Body_ingest_upload_file_api_v1_ingest_upload_file_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"File to ingest (txt, md, json, csv, pdf, docx, a recording: mp3, m4a, wav, ogg, a video file: mp4, mov, webm, or a picture: png, jpg, webp — a picture's words are read by the model, PROJECT-201 capability #7)"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"source_type":{"type":"string","title":"Source Type","default":"markdown"},"auto_approve":{"type":"boolean","title":"Auto Approve","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"scope":{"type":"string","title":"Scope","default":"global"},"model_tier":{"type":"string","title":"Model Tier","default":"fast"},"preview":{"type":"boolean","title":"Preview","default":true}},"type":"object","required":["file"],"title":"Body_ingest_upload_file_api_v1_ingest_upload_file_post"},"Body_post_attachment_api_v1_investor_outreach_attachment_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Pitch deck or one-pager to attach to a send"}},"type":"object","required":["file"],"title":"Body_post_attachment_api_v1_investor_outreach_attachment_post"},"BotApprovalSettingRequest":{"properties":{"mode":{"type":"string","title":"Mode","description":"MANUAL|SEMI_AUTO|FULL_AUTO|CONFIDENCE_BASED"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"overall|internal|external","default":"overall"},"confidenceThreshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confidencethreshold","description":"0-100, used when mode=CONFIDENCE_BASED","default":90}},"type":"object","required":["mode"],"title":"BotApprovalSettingRequest"},"BotContext":{"properties":{"bot_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Name"},"other_kernels":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Other Kernels","description":"Summary of other kernels in the bot assembly [{key, name, tokenCount}]"},"last_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Input","description":"The last user input prompt sent to the bot"},"last_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Output","description":"The last LLM output from the bot run"},"detected_variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Detected Variables","description":"Detected {variable} placeholders across all kernels"},"parameters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"All {input} and [INTERNAL] parameters across bot kernels [{name, type, totalCount, kernels}]"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error","description":"Raw error/schema violation from the last run, verbatim"}},"type":"object","title":"BotContext","description":"Optional context from the AdminBotTestbench so raisy_73 knows what's going on."},"BotCreateRequest":{"properties":{"botName":{"type":"string","title":"Botname","description":"Human-readable name"},"kernel_keys_ref":{"items":{"type":"string"},"type":"array","title":"Kernel Keys Ref","description":"Ordered kernel keys"},"mode":{"type":"string","title":"Mode","description":"fast, medium or quality","default":"quality"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"BD-code classification","default":""},"processDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processdimension","description":"PD (Process Dimension) code number"},"processDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processdimensionsub","description":"Subcategory value within PD, e.g. 1, 2, 3"},"botKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botkey","description":"Optional explicit botKey (admin only). If omitted, auto-generated."},"inputSchema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputschema","description":"BD0 input contract (JSON Schema or variable list)"},"outputSchema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputschema","description":"BD999 output contract (JSON Schema)"},"outputDestination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputdestination","description":"Registered output destination"},"outputDestinationConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputdestinationconfig","description":"Destination-specific routing config"}},"type":"object","required":["botName","kernel_keys_ref"],"title":"BotCreateRequest","description":"T0109: Create bot request. botNumber/botKey/botId all auto-generated by BE."},"BotEditRequest":{"properties":{"botKey":{"type":"string","title":"Botkey","description":"Stable bot key"},"botName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botname","description":"Update bot name"},"kernel_keys_ref":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Kernel Keys Ref","description":"New kernel order"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Update mode"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"Update classification"},"processDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processdimension","description":"Update PD (Process Dimension) code number"},"processDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processdimensionsub","description":"Update PD subcategory value, e.g. 1, 2, 3"},"inputSchema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputschema","description":"Update BD0 input contract"},"outputSchema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputschema","description":"Update BD999 output contract"},"outputDestination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputdestination","description":"Update output destination"},"outputDestinationConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputdestinationconfig","description":"Update destination config"}},"type":"object","required":["botKey"],"title":"BotEditRequest","description":"Edit bot (creates new version)"},"BotInvokeRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot identifier"},"input_prompt":{"type":"string","title":"Input Prompt","description":"Input for bot"},"variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables","description":"Template variables"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model override (leave unset to use `mode`'s preset)"},"thinking_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking Level","description":"Thinking level override (leave unset to use `mode`'s preset)"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"fast, medium or quality","default":"fast"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity barcode the call runs FOR/WITHIN"},"participant_entity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Participant Entity Ids","description":"Other entities whose private kernels are part of the bot assembly. If omitted, the bot's stored participant list is used."},"callId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callid","description":"Re-run the kernels a PAST CALL ran instead of the bot's registered assembly. Required for the kernel/schema minters, which compose their assembly per dimension and so have no fixed kernel_keys_ref. Keys come from the call; versions resolve to current, so patches applied since ARE exercised."}},"type":"object","required":["botId","input_prompt"],"title":"BotInvokeRequest","description":"T0106: Bot invocation request"},"BotInvokeResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"BotInvokeResponse","description":"Bot invocation response"},"BotUpdateKernelsRequest":{"properties":{"botId":{"type":"string","title":"Botid"},"kernel_keys_ref":{"items":{"type":"string"},"type":"array","title":"Kernel Keys Ref","description":"New ordered kernel keys"}},"type":"object","required":["botId","kernel_keys_ref"],"title":"BotUpdateKernelsRequest","description":"T0109: Update bot kernels (A/B test)"},"BuildContext":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"Q1 role"},"goals":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Goals","description":"Q2 goals"},"revenue_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Stage","description":"Q4 revenue stage"},"first_tasks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"First Tasks","description":"Q5 first tasks"},"build_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Scope","description":"Q3 build scope"}},"type":"object","title":"BuildContext"},"BuildDeliverablesRequest":{"properties":{"context":{"anyOf":[{"$ref":"#/components/schemas/BuildContext"},{"type":"null"}],"description":"Wizard answers if not yet persisted"}},"type":"object","title":"BuildDeliverablesRequest"},"BuildStageTrace":{"properties":{"status":{"type":"string","enum":["ok","already_exists","error"],"title":"Status"},"venv_path":{"type":"string","title":"Venv Path"},"python_path":{"type":"string","title":"Python Path"},"duration_ms":{"type":"integer","title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","venv_path","python_path","duration_ms"],"title":"BuildStageTrace"},"BulkConfirmEntityItem":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"entity_name":{"type":"string","title":"Entity Name"},"entity_type":{"type":"string","title":"Entity Type","default":"company"},"entity_type_sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type Sub"},"entity_offering_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Type"},"entity_offering_delivery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Delivery"},"entity_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Description"},"extraction_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Url"},"is_user_confirmed":{"type":"boolean","title":"Is User Confirmed","default":true}},"type":"object","required":["entity_name"],"title":"BulkConfirmEntityItem"},"BulkConfirmRelationshipItem":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"related_entity_id":{"type":"string","title":"Related Entity Id"},"relationship_type":{"type":"string","title":"Relationship Type","default":"parent_child"},"is_bidirectional":{"type":"boolean","title":"Is Bidirectional","default":false}},"type":"object","required":["entity_id","related_entity_id"],"title":"BulkConfirmRelationshipItem"},"BulkConfirmRequest":{"properties":{"entities":{"items":{"$ref":"#/components/schemas/BulkConfirmEntityItem"},"type":"array","title":"Entities"},"relationships":{"items":{"$ref":"#/components/schemas/BulkConfirmRelationshipItem"},"type":"array","title":"Relationships","default":[]}},"type":"object","required":["entities"],"title":"BulkConfirmRequest"},"CalendarEventRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"event":{"additionalProperties":true,"type":"object","title":"Event"},"calendar_id":{"type":"string","title":"Calendar Id","default":"primary"},"send_updates":{"type":"string","title":"Send Updates","default":"none"}},"type":"object","required":["entity_id","event"],"title":"CalendarEventRequest"},"CallEvaluationRequest":{"properties":{"callId":{"type":"string","title":"Callid","description":"Call ID to evaluate"},"verdict":{"type":"string","title":"Verdict","description":"approved | rejected"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"Evaluator notes"}},"type":"object","required":["callId","verdict"],"title":"CallEvaluationRequest","description":"Submit evaluation for a bot call."},"CallHistoryRequest":{"properties":{"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid","description":"Filter by specific bot"},"botKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botkey","description":"Filter by botKey (resolves to latest active botId)"},"relation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation","description":"For a bot filter: 'runs' (this bot's own executions — the default), 'build' (provenance: the minting/naming calls that BUILT this bot, which belong to the minter/namer bots), or 'classify' (the classifier call that produced this bot's signature). 'build' and 'classify' partition the construction chain — a call appears in exactly one."},"verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verdict","description":"Filter by evaluation verdict: approved | rejected | unevaluated"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate","description":"ISO start date (inclusive)"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate","description":"ISO end date (inclusive)"},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entityid","description":"Filter by input.variables.entity_id"},"bd":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bd","description":"Filter by BD classification present in kernel_keys_ref (e.g. 1 for BD1)"},"targetKernelKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetkernelkey","description":"Kernel-activity filter: raisy_73 calls that PATCHED this kernel, raisy_61 calls that NAMED it, and ordinary runs that assembled it."},"patchRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patchrunid","description":"Correlation id from /kernel/strategize or a heal run — returns the 61 and 73 calls belonging to that one diagnose→patch sequence."},"rootsOnly":{"type":"boolean","title":"Rootsonly","description":"Collapse each output-version lineage to its ORIGINAL row and return versionCount on it. Use for a runs list, where a composed v+1 is a version of one run rather than a second run. Leave false wherever individual versions are the subject (diffs, patch runs, audits).","default":false},"includeLineage":{"type":"boolean","title":"Includelineage","description":"Attach each row's output-version lineage (`lineage`: versions[] + selectedCallId) so a version bar renders in the same paint as the text. The versions carry NO `output` — see services/version_lineage.py; the text of a version stays the /call/{callId}/versions read's job.","default":false},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1},"pageSize":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Pagesize","description":"Items per page","default":20},"includeStats":{"type":"boolean","title":"Includestats","description":"Include aggregate statistics","default":true}},"type":"object","title":"CallHistoryRequest","description":"Fetch recent bot call logs. All fields optional — filters combine."},"CancelScheduleRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The schedule's owner; a mismatch is a 404, never a 403"}},"type":"object","required":["entity_id"],"title":"CancelScheduleRequest","description":"project092 T0212 — withdraw a pending schedule. Scoped to its owner's entity.\n\nThe schedule id travels in the PATH, not the body: a QA batch chains a producer's id into a\nconsumer's ENDPOINT (RULES_BE_API_QA's chain mechanism), and an id buried in a body cannot be\nchained — so the path form is what makes this row testable by the batch rather than only by hand."},"CheckoutCreditsRequest":{"properties":{"amount_usd":{"type":"number","title":"Amount Usd"}},"type":"object","required":["amount_usd"],"title":"CheckoutCreditsRequest","description":"The amount the customer chose on the card, in USD.\n\nWHOLE DOLLARS on purpose: at the peg a whole dollar is exactly 1,000 credits, so a fractional\namount buys fractional credits for no gain — and a cents field is somewhere a keying slip can live\nthat a whole-dollar field cannot express. The type is `float` because JSON has one number type; the\nvalue is validated, and the cents are built from the ROUNDED dollars, so 25 and 25.0 behave\nidentically while 25.5 is refused."},"ClaimIdentityRequest":{"properties":{"person_entity_id":{"type":"string","title":"Person Entity Id","description":"The existing person entity this user is claiming as themselves"},"company_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Entity Id","description":"If provided, create a relationship to this company using the given role"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"Role key (founder_ceo | co_founder | employee | investor | advisor | partner | freelancer | other)"},"role_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Title","description":"Custom role title when role is 'other' or a free-form override"}},"type":"object","required":["person_entity_id"],"title":"ClaimIdentityRequest"},"ComparisonCreateRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Whose comparison this is."},"engine_text":{"type":"string","title":"Engine Text","description":"The comparison document's own text — the fenced yaml engine block is parsed from it, never supplied beside it."},"document_ref":{"type":"string","maxLength":1000,"title":"Document Ref","description":"Where the readable form lives (a `.md` in the document surface).","default":""}},"type":"object","required":["entity_id","engine_text"],"title":"ComparisonCreateRequest"},"ComparisonMarkRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"comparison_id":{"type":"string","title":"Comparison Id"},"criterion":{"type":"string","title":"Criterion"},"mark":{"type":"string","title":"Mark","description":"`overruled` · `agreed` · `unclear`."},"reason":{"type":"string","title":"Reason"},"decided_by":{"type":"string","title":"Decided By","default":""}},"type":"object","required":["entity_id","comparison_id","criterion","mark","reason"],"title":"ComparisonMarkRequest"},"ComparisonReadRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"comparison_id":{"type":"string","title":"Comparison Id"}},"type":"object","required":["entity_id","comparison_id"],"title":"ComparisonReadRequest"},"ComparisonScoreRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"comparison_id":{"type":"string","title":"Comparison Id"},"variant":{"type":"string","title":"Variant"},"criterion":{"type":"string","title":"Criterion"},"score":{"type":"number","title":"Score"},"witness":{"type":"string","title":"Witness","description":"The span, the number, or the quoted ABSENCE — §6 rule 1. Refused when empty."},"basis":{"type":"string","title":"Basis","description":"`observed` or `asserted`."},"span":{"type":"string","title":"Span","default":""}},"type":"object","required":["entity_id","comparison_id","variant","criterion","score","witness","basis"],"title":"ComparisonScoreRequest"},"ComplianceCheckRequest":{"properties":{"recipient_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Country","description":"ISO country code"},"has_unsubscribe_link":{"type":"boolean","title":"Has Unsubscribe Link","default":false},"has_sender_identity":{"type":"boolean","title":"Has Sender Identity","default":false},"has_physical_address":{"type":"boolean","title":"Has Physical Address","default":false},"consent_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent Basis"},"legitimate_interest_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legitimate Interest Assessment"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case","description":"BD pipeline code, e.g. BD70.3"},"content_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Class","description":"teaser | offer | marketing | transactional"},"extra_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Fields","description":"Overlay-required fields"},"recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email","description":"Recipient address — supplying it turns on the kernel's role-address rule (info@/abuse@/spam@/postmaster@ are refused). Omitted = the rule cannot run and the verdict says so."},"address_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Address Verified","description":"False blocks the send; None means no verification was available, which is reported as an advisory rather than treated as a pass."}},"type":"object","title":"ComplianceCheckRequest"},"ComposeVersionRequest":{"properties":{"rewriteCallIds":{"items":{"type":"string"},"type":"array","title":"Rewritecallids","description":"Rewrite callIds to apply. Every one must already carry an 'accepted' verdict. May be empty when `fills` or `fieldEdits` is not: a version can be composed from typed values alone."},"fills":{"items":{"$ref":"#/components/schemas/SlotFill"},"type":"array","title":"Fills","description":"T1354 — slots the user filled by hand. Applied in the SAME pass as the accepted rewrites, so a person who marked one span and filled two slots gets one new version, not three."},"fieldEdits":{"items":{"$ref":"#/components/schemas/FieldEdit"},"type":"array","title":"Fieldedits","description":"Whole fields the owner retyped directly. Applied in the SAME pass as rewrites and fills; a fieldEdit REPLACES the whole field text, and an overlap with a span edit or fill on the SAME field is refused."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"patchRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patchrunid","description":"Correlation id tying this version to a background kernel run. Omitted = one is minted when startChain is true."},"startChain":{"type":"boolean","title":"Startchain","description":"T0806 — run the background 62→73 fan-out after composing. It proposes kernel changes and writes nothing (D-017). Set false to produce the new output version and nothing else.","default":true},"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid","description":"Audit tag on the fan-out's calls."}},"type":"object","title":"ComposeVersionRequest"},"ConnectActionRequest":{"properties":{"entity_relationship_id":{"type":"string","title":"Entity Relationship Id"},"action":{"type":"string","title":"Action","description":"accept | decline | withdraw"}},"type":"object","required":["entity_relationship_id","action"],"title":"ConnectActionRequest"},"ConnectRequestBody":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Person A (initiator)"},"related_entity_id":{"type":"string","title":"Related Entity Id","description":"Person B (target)"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["entity_id","related_entity_id"],"title":"ConnectRequestBody"},"ConnectionRequestsListRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The requesting user's person entity"}},"type":"object","required":["entity_id"],"title":"ConnectionRequestsListRequest"},"ConstructBotRequest":{"properties":{"bot_intent":{"type":"string","title":"Bot Intent","description":"What the bot must produce / do."},"skillSelections":{"anyOf":[{"items":{"$ref":"#/components/schemas/SkillSelection"},"type":"array"},{"type":"null"}],"title":"Skillselections","description":"Explicit skill picks for BD155 slots, from the alternatives shown at derive time. A selection whose kernel is filed under a DIFFERENT BD155.<sub> re-files the slot and corrects the built bot's classification to match — recorded, never silent."},"botName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botname","description":"Bot name (defaults to bot_intent)"},"entity_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Context"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity barcode for private kernel resolution / minting"},"participant_entity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Participant Entity Ids","description":"Other entities participating in the conversation (audience). Private kernels for all participants are resolved."},"mode":{"type":"string","title":"Mode","default":"quality"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"Pre-derived classification (from /bot/derive-signature). When set, construct builds from it instead of re-classifying — so what was reviewed is what gets built, with no second classifier call."},"outputDestination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputdestination","description":"PROJECT-072 (G5): registered DB-write destination (see cfg/output_routing_registry.json). Unregistered values are ignored."},"outputDestinationConfig":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputdestinationconfig","description":"Config for the output destination"}},"type":"object","required":["bot_intent"],"title":"ConstructBotRequest","description":"Construct a complete bot from one request — classify → per-coordinate\nresolve-or-mint kernel → assemble bot. The system does it all itself."},"ConstructProcessRequest":{"properties":{"description":{"type":"string","title":"Description","description":"What the user wants (e.g. 'Send an email to an investor')"},"execution_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Mode","description":"MANUAL|SEMI_AUTO|FULL_AUTO — mapped to MR5b autonomy tiers. SEMI_AUTO default: prepare everything, stop at the external-effect gate.","default":"SEMI_AUTO"},"participant_entity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Participant Entity Ids","description":"Entity pointers for N participants (e.g. recipient investor entities). entity_id_participants on the created process."},"recurrence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recurrence","description":"Optional recurrence schedule for the constructed process. Stored in process metadata; actual cron execution is a separate scheduler project."}},"type":"object","required":["description"],"title":"ConstructProcessRequest","description":"T0252 — Focused idea→process: assess gate → 1 deliverable → backward chain → 1 process with N bots."},"CredentialSweepRequest":{"properties":{"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","title":"CredentialSweepRequest","description":"Optional cap, for a first run or an operator spot-check. Absent = every active entry."},"CreditHistoryRequest":{"properties":{"limit":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Limit","description":"How many movements to return (newest first).","default":50},"offset":{"type":"integer","minimum":0.0,"title":"Offset","description":"Movements to skip.","default":0}},"type":"object","title":"CreditHistoryRequest","description":"The signed-in user's own wallet history."},"DecideQueueRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Active entity (never trusted alone — gated to the caller's read set, MR24)"},"window_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Window Days","default":30}},"type":"object","required":["entity_id"],"title":"DecideQueueRequest"},"DeckLinkRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The company that owns the raise"},"uploaded_source_id":{"type":"string","title":"Uploaded Source Id","description":"The file's `id`, returned by POST /investor-outreach/attachment"}},"type":"object","required":["entity_id","uploaded_source_id"],"title":"DeckLinkRequest","description":"@P279 T0200 — bind an ALREADY-uploaded file to a raise as ITS deck."},"DeliverableAsksRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Whose asks to read. Required — a list that names nobody is every entity's list, which is nobody's door."}},"type":"object","required":["entity_id"],"title":"DeliverableAsksRequest"},"DeliverableItem":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"additionalProperties":true,"type":"object","title":"DeliverableItem","description":"One outcome as the buyer's surface reads it.\n\nEvery field is optional because the row is a JSONB blob and a missing key must not\n500 a surface. Extra keys are preserved (`extra = \"allow\"`), so this model TYPES the\npayload without narrowing it — a stricter model would be a rename in disguise."},"DeliverableRequestBody":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity the request is for. Required: a request that names nobody cannot be answered by anybody."},"deliverable":{"type":"integer","title":"Deliverable","description":"The menu row being requested, by its number."},"note":{"type":"string","maxLength":1000,"title":"Note","description":"What the founder wants built — free text, passed through.","default":""}},"type":"object","required":["entity_id","deliverable"],"title":"DeliverableRequestBody"},"DeliverableState":{"type":"string","enum":["nothing_yet","needs_you","accepted","declined","did_not_arrive"],"title":"DeliverableState","description":"The buyer's states, verbatim from `@P288` §13 stage 6 — never invented here."},"DeliverablesData":{"properties":{"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"state":{"$ref":"#/components/schemas/DeliverableState"},"state_label":{"type":"string","title":"State Label"},"deliverables":{"items":{"$ref":"#/components/schemas/DeliverableItem"},"type":"array","title":"Deliverables"}},"additionalProperties":true,"type":"object","required":["state","state_label"],"title":"DeliverablesData"},"DeliverablesEnvelope":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"$ref":"#/components/schemas/DeliverablesData"}},"additionalProperties":true,"type":"object","required":["status","statusCode","message","data"],"title":"DeliverablesEnvelope","description":"The `_ok` envelope, typed. `data` was `Any`, which is why nothing downstream was."},"DeliveryEventRequest":{"properties":{"kind":{"type":"string","title":"Kind","description":"bounce | complaint"},"recipient":{"type":"string","title":"Recipient","description":"The address the mail went to (the failed/angry recipient)"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","description":"Sending identity; resolved from the matched send when omitted"},"hard":{"type":"boolean","title":"Hard","description":"Permanent failure (5.x.x). A soft bounce is recorded, never counted","default":true},"enhanced_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enhanced Code","description":"RFC 3463 enhanced status code, e.g. 550 5.1.1"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO timestamp of the report; defaults to now"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Short human detail (never a full message body)"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id","description":"The report's own Message-ID"},"mailbox_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailbox Uid","description":"InboxKit mailbox uid the report was found in"}},"type":"object","required":["kind","recipient"],"title":"DeliveryEventRequest","description":"One bounce or one complaint, for a caller that already knows the fact.\n\nThe pipe's own read of the sender mailbox is `POST /email/delivery-scan`; this is the\npush side of the same fact, for a provider webhook or an operator acting on a report a\nhuman read. Both write through the SAME service, so the ledger has one shape."},"DeliveryScanRequest":{"properties":{"mailbox_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailbox Uid","description":"InboxKit mailbox uid to read"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","description":"Sending address; resolved to a mailbox uid when given"},"since_days":{"type":"integer","title":"Since Days","description":"How far back to look (wider than the counting window)","default":45},"limit":{"type":"integer","title":"Limit","description":"How many recent messages to examine","default":200},"dry_run":{"type":"boolean","title":"Dry Run","description":"Classify and report without recording anything","default":false}},"type":"object","title":"DeliveryScanRequest","description":"One read of a sending mailbox for delivery reports (the D-044 armed state)."},"DeriveSignatureRequest":{"properties":{"bot_intent":{"type":"string","title":"Bot Intent","description":"What this bot must produce (deliverable / outcome name)."},"bd999_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Bd999 Schema","description":"Output schema, if known"},"entity_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Context","description":"{industry, locale, organization_type, objective}"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity barcode to check for private kernels"},"probe_remote_skills":{"type":"boolean","title":"Probe Remote Skills","description":"Search the remote ClawHub registry when a needed skill is not in raisy, so the preview can say 'openclaw has it' vs 'must be built'. Read-only (search, never install) but shells out to npx — set False for a local-only, faster preview.","default":true}},"type":"object","required":["bot_intent"],"title":"DeriveSignatureRequest","description":"Derive a bot's signature (which BD coordinates it needs) from a request.\n\nThe system decides the BD slots itself — nothing is hardcoded by the caller.\nPer MR4d/MR4h: signature is derived backward from the target output (BD999)."},"DismissDuplicateFlagRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"}},"type":"object","required":["entity_id"],"title":"DismissDuplicateFlagRequest"},"DismissReferenceRequest":{"properties":{"botKey":{"type":"string","title":"Botkey","description":"Bot LINEAGE the verdict applies to (never botId)."},"kernelKey":{"type":"string","title":"Kernelkey","description":"Kernel LINEAGE the token lives in."},"name":{"type":"string","title":"Name","description":"The reference token, e.g. 'delta_ops'."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why it is not an input."},"undo":{"type":"boolean","title":"Undo","description":"Remove the dismissal instead of recording it.","default":false}},"type":"object","required":["botKey","kernelKey","name"],"title":"DismissReferenceRequest","description":"PROJECT-099B TC06 — record that a reference is not an input."},"DomainAvailabilityRequest":{"properties":{"domain_name":{"type":"string","title":"Domain Name","description":"Full domain to check, e.g. getraisy.com"}},"type":"object","required":["domain_name"],"title":"DomainAvailabilityRequest"},"DomainCatalogRequest":{"properties":{"domain_catalog_tlds":{"items":{"type":"string"},"type":"array","title":"Domain Catalog Tlds","description":"Optional TLD subset to return (e.g. ['com','co','io']). Empty = full catalog. FE ranking happens client-side; this only trims the payload."}},"type":"object","title":"DomainCatalogRequest"},"DomainPricingRequest":{"properties":{"domain_name":{"type":"string","title":"Domain Name","description":"Full domain to fetch pricing for, e.g. getraisy.com"}},"type":"object","required":["domain_name"],"title":"DomainPricingRequest"},"DomainPurchaseRequest":{"properties":{"domain_name":{"type":"string","title":"Domain Name"},"domain_dry_run":{"type":"boolean","title":"Domain Dry Run","description":"True = native Porkbun dry-run preview (validates availability/cost/funds, NO charge). False = real registration (external effect).","default":true},"domain_confirm":{"type":"boolean","title":"Domain Confirm","description":"Required True to execute a real (or sandbox) registration — external effect, MR0/MR0a gate. Protects against accidental charges.","default":false}},"type":"object","required":["domain_name"],"title":"DomainPurchaseRequest"},"DomainSituation":{"properties":{"domain":{"type":"string","title":"Domain"},"registered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Registered","description":"True/False/None — None means the zone could not be read"},"nameservers":{"items":{"type":"string"},"type":"array","title":"Nameservers"},"zone_holder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Holder","description":"cloudflare | other | None — decides how the domain is connected"},"registrar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar","description":"Who holds the registration, when RDAP named one"},"has_website":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Website"},"website_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website At"},"has_mail":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Mail"},"mx_hosts":{"items":{"type":"string"},"type":"array","title":"Mx Hosts"},"mail_authentication":{"$ref":"#/components/schemas/MailAuthentication"},"signals":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Signals"},"read_at":{"type":"string","title":"Read At","description":"When this was read — the wizard shows the age rather than implying it is live"}},"type":"object","required":["domain","registered","nameservers","zone_holder","registrar","has_website","website_at","has_mail","mx_hosts","mail_authentication","signals","read_at"],"title":"DomainSituation","description":"WHAT THIS DOMAIN IS — facts only, no score, no advice (P134 T1352, D-134-028)."},"DomainSituationEnvelope":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"$ref":"#/components/schemas/DomainSituation"}},"type":"object","required":["status","statusCode","message","data"],"title":"DomainSituationEnvelope","description":"The Raisy envelope (AGENTS.md): {status, statusCode, message, data}."},"DomainSuggestRequest":{"properties":{"entity_name":{"type":"string","title":"Entity Name","description":"Entity/brand name being raised FOR (e.g. the company 'Acme'), not the human user."},"entity_description":{"type":"string","title":"Entity Description","description":"One-line entity context (may be empty).","default":""},"geo":{"type":"string","title":"Geo","description":"ENTITY geography — ISO2 (e.g. 'HK') or country name of the company being raised for, NOT the human user's.","default":""},"founder_name":{"type":"string","title":"Founder Name","description":"Founder/human name for the local-part (mailbox identity). Optional — local-part asked SEPARATELY after domain choice.","default":""},"current_domain":{"type":"string","title":"Current Domain","description":"Domain the entity already owns (context; may be empty).","default":""},"preset":{"type":"string","title":"Preset","description":"TLD ranking preset: cheap (default, renewal cost) | reliable | geo.","default":"cheap"},"dry_run":{"type":"boolean","title":"Dry Run","description":"True = assemble the candidate shortlist + show the request WITHOUT an LLM call (schema/UX preview). False = invoke the suggestion bot.","default":false}},"type":"object","required":["entity_name"],"title":"DomainSuggestRequest"},"DraftViewRequest":{"properties":{"callId":{"type":"string","title":"Callid","description":"Call ID of the draft that was opened"}},"type":"object","required":["callId"],"title":"DraftViewRequest","description":"Record that the reader OPENED this prepared draft (P144 D-144-019)."},"EmailSendRequest":{"properties":{"to_email":{"type":"string","title":"To Email","description":"Recipient email address"},"to_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Name","description":"Recipient display name"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","description":"Sender address; defaults to platform shared pool"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To","description":"Reply-To address"},"subject":{"type":"string","title":"Subject","description":"Email subject line"},"body_text":{"type":"string","title":"Body Text","description":"Plain-text body"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html","description":"Optional HTML body"},"entity_id":{"type":"string","title":"Entity Id","description":"External entity this email is sent to"},"owner_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Entity Id","description":"Entity owning the campaign"},"relationship_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Id","description":"Optional entity_relationships UUID"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id","description":"Internal campaign identifier"},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Name","description":"Human campaign name"},"process_call_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Call Log Id","description":"UUID of originating process call log"},"recipient_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Country","description":"ISO country code of recipient (US, EU, GB, CA, ...)"},"unsubscribe_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unsubscribe Link","description":"Unsubscribe URL"},"physical_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical Address","description":"Sender physical postal address (CAN-SPAM)"},"consent_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent Basis","description":"Recorded consent/implied-consent basis for CASL/opt-in regimes"},"legitimate_interest_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legitimate Interest Assessment","description":"Documented LIA for GDPR sends"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case","description":"BD pipeline code selecting the compliance overlay, e.g. BD70.3 investor first touch"},"content_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Class","description":"teaser | offer | marketing | transactional"},"extra_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Fields","description":"Overlay-required fields, e.g. fpo_exemption, securities_exemption"},"extra_headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Headers","description":"Additional Listmonk headers"},"test_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Kind","description":"If set, this is a TEST send (P080 D-102): {test:true, kind:<test_kind>} is merged into extra_fields so tests are never counted as reachouts."}},"type":"object","required":["to_email","subject","body_text","entity_id"],"title":"EmailSendRequest"},"EntityApprovalModeRequest":{"properties":{"mode":{"type":"string","title":"Mode","description":"MANUAL|SEMI_AUTO|FULL_AUTO|CONFIDENCE_BASED"}},"type":"object","required":["mode"],"title":"EntityApprovalModeRequest"},"EntityAttentionRequest":{"properties":{"signals":{"items":{"type":"string"},"type":"array","title":"Signals","description":"Which signals may reach the person: process_gate | hermes_wake | preparation. An empty list is a valid answer — it means nothing interrupts him."}},"type":"object","required":["signals"],"title":"EntityAttentionRequest"},"EntityAutoTagRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Entity ID to auto-tag"}},"type":"object","required":["entity_id"],"title":"EntityAutoTagRequest","description":"Auto-tag request for a single entity."},"EntityBatchEmbedRequest":{"properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App"}},"type":"object","title":"EntityBatchEmbedRequest","description":"Batch embed request for all unembedded entities."},"EntityConstructRequest":{"properties":{"entity_intent":{"type":"string","title":"Entity Intent","description":"Entity description / mission"},"entitykey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitykey","description":"Existing entity key to update"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Existing entity ID to update"},"entity_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Context","description":"Additional context"},"mode":{"type":"string","title":"Mode","description":"fast, medium or quality","default":"quality"}},"type":"object","required":["entity_intent"],"title":"EntityConstructRequest","description":"Construct / classify an entity from a description."},"EntityCreateRequest":{"properties":{"entity_name":{"type":"string","title":"Entity Name"},"entity_type":{"type":"string","title":"Entity Type","default":"company"},"entity_type_sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type Sub"},"entity_offering_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Type"},"entity_offering_delivery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Delivery"},"entity_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Description"},"entity_status":{"type":"string","title":"Entity Status","default":"active"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility","default":"public"},"parent_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Entity Id"},"entity_links":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Links"},"person_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Person Role"},"entity_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Location"},"affiliation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliation"},"entityDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimension","description":"ED (Entity Dimension) number"},"entityDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimensionsub","description":"Subcategory value within ED, e.g. 1, 2, 3"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"ED-code taxonomy string (e.g. ED-L0-0.2_10.1_20.1_30.45_90.2)"},"app":{"type":"string","title":"App","default":"raisy"},"force_create":{"type":"boolean","title":"Force Create","default":false}},"type":"object","required":["entity_name"],"title":"EntityCreateRequest"},"EntityDeleteRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"cascade":{"type":"boolean","title":"Cascade","default":false}},"type":"object","required":["entity_id"],"title":"EntityDeleteRequest"},"EntityDeriveSignatureRequest":{"properties":{"entity_intent":{"type":"string","title":"Entity Intent","description":"Entity description / mission"},"entity_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Context","description":"Additional context"}},"type":"object","required":["entity_intent"],"title":"EntityDeriveSignatureRequest","description":"Derive an ED signature from an entity description."},"EntityExactMatchRequest":{"properties":{"entityDimension":{"type":"integer","title":"Entitydimension","description":"ED number, e.g. 10"},"entityDimensionSub":{"type":"integer","title":"Entitydimensionsub","description":"ED subcategory, e.g. 1"}},"type":"object","required":["entityDimension","entityDimensionSub"],"title":"EntityExactMatchRequest","description":"Exact-match request for entities by ED + EDsub."},"EntityFacetRequest":{"properties":{"ownership":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ownership","description":"Viewer-relative scope: [\"own\"], [\"external\"], or both. Omit for everything the viewer may read."},"companies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Companies","description":"Scope to these OWNED companies' counterparties, by the entitykey of the edge's owning side (D-012). Omit for all of them. Keys outside the viewer's own set are ignored, not trusted."},"filters":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Filters","description":"Selected facet values {field: [value, ...]} — AND across fields, OR within a field."},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search","description":"Free text over name, description, headline and industry."},"fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fields","description":"Which facets to return; omit for all."},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Rows returned — it never bounds what the facets count.","default":200}},"type":"object","title":"EntityFacetRequest","description":"Body for the faceted entity slice — see services/entity_facet_service.py."},"EntityGetByKeyRequest":{"properties":{"entitykey":{"type":"string","title":"Entitykey"}},"type":"object","required":["entitykey"],"title":"EntityGetByKeyRequest"},"EntityGetRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"}},"type":"object","required":["entity_id"],"title":"EntityGetRequest"},"EntityHierarchyRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"}},"type":"object","required":["entity_id"],"title":"EntityHierarchyRequest"},"EntityIdRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"}},"type":"object","required":["entity_id"],"title":"EntityIdRequest","description":"Every route here is addressed by the entity that owns the vault entry."},"EntityMatchRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"top_n":{"type":"integer","title":"Top N","default":5},"threshold":{"type":"number","title":"Threshold","default":0.8},"app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App"}},"type":"object","required":["name"],"title":"EntityMatchRequest"},"EntitySearchClarification":{"properties":{"question":{"type":"string","title":"Question"},"answer":{"type":"string","title":"Answer"}},"type":"object","required":["question","answer"],"title":"EntitySearchClarification"},"EntitySearchRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Partial name match (case-insensitive)"},"affiliation_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliation Entity Id","description":"Filter to entities affiliated with this org"},"relationship_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Type","description":"Narrow affiliation to a specific type"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type","description":"company | product | service | platform"},"app":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App"}},"type":"object","title":"EntitySearchRequest"},"EntitySearchResolveRequest":{"properties":{"description":{"type":"string","title":"Description"},"entity_type_hint":{"type":"string","title":"Entity Type Hint","default":"company"},"clarifications":{"items":{"$ref":"#/components/schemas/EntitySearchClarification"},"type":"array","title":"Clarifications","default":[]}},"type":"object","required":["description"],"title":"EntitySearchResolveRequest"},"EntityUpdateRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_type_sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type Sub"},"entity_offering_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Type"},"entity_offering_delivery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Delivery"},"entity_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Description"},"entity_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Status"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"target_market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Market"},"brand_tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Tone"},"detected_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language"},"target_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Customer"},"problem_solved":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Problem Solved"},"extraction_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Url"},"parent_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Entity Id"},"pricing_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pricing Info"},"build_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Scope"},"entity_links":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Links"},"entity_postal_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Postal Address"},"entityDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimension","description":"ED (Entity Dimension) number"},"entityDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimensionsub","description":"Subcategory value within ED, e.g. 1, 2, 3"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"ED-code taxonomy string (e.g. ED-L0-0.2_10.1_20.1_30.45_90.2)"},"selected_use_cases":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Use Cases"},"revenue_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revenue Stage"},"first_tasks":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"First Tasks"},"first_task_other":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Task Other"},"selected_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Role"},"raising_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raising Stage"},"raising_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raising Amount"},"check_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Size"},"booking_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Link"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"target_geography":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Geography"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"declared_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Declared At"}},"type":"object","required":["entity_id"],"title":"EntityUpdateRequest"},"ExtractionConfirmCandidate":{"properties":{"entity_name":{"type":"string","title":"Entity Name"},"entity_type":{"type":"string","title":"Entity Type","default":"company"},"entity_type_sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type Sub"},"entity_type_sub_roles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Type Sub Roles"},"entity_offering_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Type"},"entity_offering_delivery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Offering Delivery"},"entity_links":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Links"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"relationship_type":{"type":"string","title":"Relationship Type","default":"parent_child"},"role_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Title"},"is_part_of_parent":{"type":"boolean","title":"Is Part Of Parent","default":true}},"type":"object","required":["entity_name"],"title":"ExtractionConfirmCandidate"},"ExtractionConfirmRequest":{"properties":{"candidates":{"items":{"$ref":"#/components/schemas/ExtractionConfirmCandidate"},"type":"array","title":"Candidates","default":[]}},"type":"object","title":"ExtractionConfirmRequest"},"FacetedSearchRequest":{"properties":{"geography":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Geography","description":"Country or city, e.g. 'Vietnam' or 'Istanbul'"},"investor_type":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Investor Type","description":"e.g. angel, vc, seed fund, growth"},"sector":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Sector","description":"Sector focus, e.g. fintech, edtech"},"stage":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Stage","description":"Stage focus, e.g. seed, Series A"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Audit identity; falls back to the token uid"}},"type":"object","title":"FacetedSearchRequest","description":"PROJECT-107 / D-004 — instant structured search (facet bar). DB-only, NO LLM."},"FaultClassifyRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot whose run failed"},"message":{"type":"string","title":"Message","description":"The failure message, verbatim"},"statusCode":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statuscode","description":"Status code the run returned"},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Partial output, if any was produced"},"userInput":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userinput","description":"The input that produced the failure"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope"},"useLlmTriage":{"type":"boolean","title":"Usellmtriage","description":"Consult raisy_96 on the ambiguous branch. False = deterministic only, no cost.","default":true}},"type":"object","required":["botId","message"],"title":"FaultClassifyRequest","description":"T0200/T0221/T0402/T0408: classify a failed bot run before anyone diagnoses it.\n\nThe heal loops pass every failure through `gate_runner_failure`, but the AdminBotTestbench's\n\"Diagnose This Error\" button called raisy_61 directly on WHATEVER the error was — so the\nmanual path could still hand a Python traceback to a component whose output contract can\nonly name a kernel. That is the IN-02 headline defect, surviving in the one path a human\ndrives. This endpoint gives the FE the same verdict the loops already act on."},"FeedbackSectionsResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"FeedbackSectionsResponse"},"FeedbackSubmitRequest":{"properties":{"emotion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Emotion","description":"-1 negative · 0 neutral · +1 positive. Omit BOTH this and `rating` for a bare comment."},"rating":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Rating","description":"The visitor's 1–10 number."},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"},"section":{"type":"string","title":"Section","description":"Which part of the page — one of `/feedback/sections`."},"page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Url","description":"Where it was sent from."},"posthog_distinct_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posthog Distinct Id"}},"type":"object","required":["section"],"title":"FeedbackSubmitRequest","description":"What the popup sends. Every field is optional except the one fact that must exist.\n\n⚠️ `emotion` and `rating` are the visitor's OWN two answers and are validated TOGETHER below —\nthe type cannot express \"both or neither\", so the rule is enforced in the handler and mirrored\nby the table's own CHECK. `ge`/`le` carry the range so an out-of-range number is refused by\nFastAPI with a 422 that names the field, before any handler code runs."},"FieldEdit":{"properties":{"field":{"type":"string","minLength":1,"title":"Field","description":"The output field to replace."},"text":{"type":"string","minLength":1,"title":"Text","description":"The verbatim text the owner typed — it becomes the whole field."}},"type":"object","required":["field","text"],"title":"FieldEdit","description":"A whole field the owner retyped — direct editing, not a complaint.\n\nSame precedent as the fill (T1354 / D-135-018): the text is a fact or choice the\nuser holds, so it arrives verbatim rather than pointing at a rewrite row, and it\nwrites the draft only — never the memory machinery, which is fed exclusively by\nthe accept/reject feedback leg (D-019). A fieldEdit REPLACES the whole field\ntext; it overlaps with a span edit or fill on the same field, and that overlap\nis refused rather than decided by order."},"FindReferenceUsagesRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot whose assembly is searched."},"name":{"type":"string","title":"Name","description":"Parameter name, with or without brackets."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for version resolution."}},"type":"object","required":["botId","name"],"title":"FindReferenceUsagesRequest","description":"PROJECT-099B TJ14 — where is this parameter used?"},"FollowRequest":{"properties":{"follower_entity_id":{"type":"string","title":"Follower Entity Id"},"followed_entity_id":{"type":"string","title":"Followed Entity Id"}},"type":"object","required":["follower_entity_id","followed_entity_id"],"title":"FollowRequest"},"FunnelEnrichRequest":{"properties":{"owner_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Entity Id","description":"Optional: legacy relationship-aware mode"},"investor_entity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Investor Entity Ids","description":"Explicit IDs to enrich"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Max entities to enrich"}},"type":"object","title":"FunnelEnrichRequest"},"FunnelIngestRequest":{"properties":{"csv_path":{"type":"string","title":"Csv Path","description":"Absolute path to the investor CSV on the backend"},"owner_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Entity Id","description":"Optional: legacy relationship-aware mode"},"source":{"type":"string","title":"Source","description":"Source label","default":"imergea_atlas"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Only ingest first N rows"},"batch_size":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Batch Size","description":"Commit batch size","default":100}},"type":"object","required":["csv_path"],"title":"FunnelIngestRequest"},"FunnelRankRequest":{"properties":{"raising_stage":{"type":"string","title":"Raising Stage","description":"e.g. seed, Series A"},"sector":{"type":"string","title":"Sector","description":"e.g. SaaS, fintech"},"target_geography":{"type":"string","title":"Target Geography","description":"e.g. Europe, US"},"raising_amount":{"type":"string","title":"Raising Amount","description":"e.g. $500k, $2M"},"owner_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Entity Id","description":"Optional: legacy relationship-aware mode"},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","description":"Max candidates to return","default":50}},"type":"object","required":["raising_stage","sector","target_geography","raising_amount"],"title":"FunnelRankRequest"},"FunnelRunRequest":{"properties":{"csv_path":{"type":"string","title":"Csv Path","description":"Absolute path to the investor CSV"},"raising_stage":{"type":"string","title":"Raising Stage","description":"e.g. seed, Series A"},"sector":{"type":"string","title":"Sector","description":"e.g. SaaS, fintech"},"target_geography":{"type":"string","title":"Target Geography","description":"e.g. Europe, US"},"raising_amount":{"type":"string","title":"Raising Amount","description":"e.g. $500k, $2M"},"owner_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Entity Id","description":"Optional: legacy relationship-aware mode"},"ingest_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ingest Limit","description":"Max CSV rows to ingest"},"rank_limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Rank Limit","default":50},"enrich_limit":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Enrich Limit","default":10},"inputPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputprompt","description":"Optional JSON string containing the run parameters; parsed when provided so n8n can forward the raw process prompt."}},"type":"object","required":["csv_path","raising_stage","sector","target_geography","raising_amount"],"title":"FunnelRunRequest"},"GEPABatchEvalRequest":{"properties":{"variant_kernel_keys":{"items":{"type":"string"},"type":"array","title":"Variant Kernel Keys","description":"Kernel variants to test"},"test_cases":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Test Cases","description":"[{input, expected_output, tags}]"},"model":{"type":"string","title":"Model","default":"gemini-3.1-pro"}},"type":"object","required":["variant_kernel_keys","test_cases"],"title":"GEPABatchEvalRequest"},"GEPAEvolveRequest":{"properties":{"kernel_key":{"type":"string","title":"Kernel Key","description":"Kernel to evolve"},"eval_source":{"type":"string","title":"Eval Source","description":"synthetic | session | mixed | golden","default":"mixed"},"population_size":{"type":"integer","maximum":10.0,"minimum":2.0,"title":"Population Size","default":5},"max_iterations":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Max Iterations","default":3},"target_score":{"type":"integer","maximum":100.0,"minimum":50.0,"title":"Target Score","default":85},"model":{"type":"string","title":"Model","default":"gemini-3.1-pro"}},"type":"object","required":["kernel_key"],"title":"GEPAEvolveRequest"},"GEPATestSuiteRequest":{"properties":{"kernel_key":{"type":"string","title":"Kernel Key","description":"Kernel this test suite belongs to"},"test_cases":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Test Cases","description":"[{input, expected_output, tags}]"},"source":{"type":"string","title":"Source","description":"golden | synthetic | auto","default":"golden"}},"type":"object","required":["kernel_key","test_cases"],"title":"GEPATestSuiteRequest"},"GILLAssessRequest":{"properties":{"bot_id":{"type":"string","title":"Bot Id","description":"Bot to assess"},"test_input":{"type":"string","title":"Test Input","description":"Input to test with"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"assessment_depth":{"type":"string","title":"Assessment Depth","description":"quick | standard | deep","default":"standard"},"focus_areas":{"type":"string","title":"Focus Areas","default":"all"},"gill_target_score":{"type":"integer","title":"Gill Target Score","default":85},"model":{"type":"string","title":"Model","default":"gemini-3.1-pro"}},"type":"object","required":["bot_id","test_input"],"title":"GILLAssessRequest"},"GILLFixRequest":{"properties":{"bot_id":{"type":"string","title":"Bot Id","description":"Bot to fix"},"test_input":{"type":"string","title":"Test Input","description":"Input context"},"previous_assessment":{"type":"string","title":"Previous Assessment","description":"Previous G997 assessment JSON"},"previous_score":{"type":"string","title":"Previous Score","description":"Previous score","default":""},"kernel_key":{"type":"string","title":"Kernel Key","description":"Kernel to apply fix to"},"model":{"type":"string","title":"Model","default":"gemini-3.1-pro"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for kernel resolution"}},"type":"object","required":["bot_id","test_input","previous_assessment","kernel_key"],"title":"GILLFixRequest"},"GILLRunRequest":{"properties":{"bot_id":{"type":"string","title":"Bot Id","description":"Bot to run GILL on"},"test_input":{"type":"string","title":"Test Input","description":"Input to test the bot with"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope"},"gill_mode":{"type":"string","title":"Gill Mode","description":"full | assess | fix","default":"full"},"max_iterations":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Max Iterations","default":3},"gill_target_score":{"type":"integer","maximum":100.0,"minimum":50.0,"title":"Gill Target Score","default":85},"assessor_rotation_mode":{"type":"string","title":"Assessor Rotation Mode","description":"first | all | N","default":"first"},"model":{"type":"string","title":"Model","default":"gemini-3.1-pro"},"thinking_level":{"type":"string","title":"Thinking Level","default":"HIGH"}},"type":"object","required":["bot_id","test_input"],"title":"GILLRunRequest"},"GenerateSPRequest":{"properties":{"adjective":{"type":"string","title":"Adjective","description":"Adjective for SP generation: 'tiny', 'extensive', 'professional'"},"task_x":{"type":"string","title":"Task X","description":"The full task prompt X"},"model":{"type":"string","title":"Model","description":"Model for SP generation","default":"gemini-3.1-flash-lite"}},"type":"object","required":["adjective","task_x"],"title":"GenerateSPRequest"},"GenerateSPResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"system_prompt":{"type":"string","title":"System Prompt"},"adjective":{"type":"string","title":"Adjective"},"model":{"type":"string","title":"Model"}},"type":"object","required":["status","system_prompt","adjective","model"],"title":"GenerateSPResponse"},"GoogleConnectRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"capability":{"type":"string","title":"Capability","default":"mail"}},"type":"object","required":["entity_id"],"title":"GoogleConnectRequest","description":"A connect names the CAPABILITY it is connecting (`mail` | `calendar`), because Google is\ntwo labelled cards on one credential (D-133-016). Defaults to `mail` so an older FE build\nkeeps working."},"GuestTasteClaimRequest":{"properties":{"claim_token":{"type":"string","title":"Claim Token"},"preferred_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Entity Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"}},"type":"object","required":["claim_token"],"title":"GuestTasteClaimRequest","description":"T1025 — what a signed-in visitor brings back from the doorway.\n\n`claim_token` is the secret the doorway gave HIM, not a job id: the journey table's\nstate 9 is explicit that possessing an identifier the engine handed out must not be\nwhat proves ownership of a run (D-021-D).\n`entity_id` is optional because a brand-new account has no company yet: absent, the\nclaim creates one from the scan (through the same path the wizard uses)."},"GuestTasteRequest":{"properties":{"url":{"type":"string","title":"Url"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"geography":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geography"}},"type":"object","required":["url"],"title":"GuestTasteRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HarnessCommandRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Active entity (never trusted alone — MR24-gated server-side)"},"kind":{"type":"string","pattern":"^(command|ask)$","title":"Kind","description":"command (do) | ask (question)","default":"command"},"command":{"type":"string","maxLength":2000,"minLength":1,"title":"Command","description":"The operator directive / ask, one line"},"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id","description":"Optional registered bot to execute the directive. Omit for a free-form intent (lands honest waiting_on_you — see module policy)."}},"type":"object","required":["entity_id","command"],"title":"HarnessCommandRequest"},"HarnessJobsRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Active entity (never trusted alone — MR24-gated server-side)"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":20}},"type":"object","required":["entity_id"],"title":"HarnessJobsRequest"},"HermesAttributionCreditRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"kpi_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kpi Key"},"limit":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Limit","default":200}},"type":"object","required":["entity_id"],"title":"HermesAttributionCreditRequest"},"HermesAttributionVerifyRequest":{"properties":{"ledger_id":{"type":"string","minLength":1,"title":"Ledger Id"},"status":{"type":"string","title":"Status","description":"verified | rejected"},"approved_by":{"type":"string","title":"Approved By","default":"system"},"bot_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Call Id","description":"Required to attach a verified window_candidate credit to its producing call."}},"type":"object","required":["ledger_id","status"],"title":"HermesAttributionVerifyRequest"},"HermesDistillRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","default":200}},"type":"object","required":["entity_id"],"title":"HermesDistillRequest"},"HermesMastRequest":{"properties":{"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id","description":"Score one bot."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Score all of an entity's bots (its own + shared)."},"window_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Window Days","default":90},"delta_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Delta Days","default":30}},"type":"object","title":"HermesMastRequest"},"HermesOpsKpiRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Scope to one entity (its bots + shared bots)."},"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id","description":"Scope autonomy/learning to a single bot."},"window_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Window Days","default":30}},"type":"object","title":"HermesOpsKpiRequest"},"HermesRecallRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","default":50},"summary":{"type":"boolean","title":"Summary","description":"Condensed view: one line per subject plus the kernel's own distilled summary. Same facts, fewer lines — for a history that would blow the injection budget if sent whole (P135 D-135-033).","default":false}},"type":"object","required":["entity_id"],"title":"HermesRecallRequest"},"HermesRoomDigestRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id","description":"Entity whose room to read (user must be owner/editor/viewer; service bypasses)."},"window_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Window Days","default":30}},"type":"object","required":["entity_id"],"title":"HermesRoomDigestRequest","description":"D-045: founder read-surface digest for ONE entity the caller can read."},"HermesSessionUpsertRequest":{"properties":{"hermes_session_id":{"type":"string","minLength":1,"title":"Hermes Session Id","description":"Minted by Hermes SQLite; mirrored verbatim."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"touch_only":{"type":"boolean","title":"Touch Only","default":false}},"type":"object","required":["hermes_session_id"],"title":"HermesSessionUpsertRequest"},"HermesTurnPersistRequest":{"properties":{"hermes_session_id":{"type":"string","minLength":1,"title":"Hermes Session Id"},"role":{"type":"string","title":"Role","description":"user | assistant | tool | system"},"content":{"type":"string","minLength":1,"title":"Content"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"agent_decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Decision"},"tool_calls":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Calls"},"input_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Hash"},"output_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Hash"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"},"memory_receipt":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Memory Receipt","description":"D-101: the receipt of the memory read that preceded this turn (tokens, lines, dropped_for_budget, rotated_out, contradictions). Omit when the read produced nothing or was not recorded — never invent one."},"bot_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Call Id","description":"bot_call_logs.callid of the audited call that produced this turn (T106). Omit it when the turn's call left no audit row — a turn with no call to name is honest, an invented one is not."}},"type":"object","required":["hermes_session_id","role","content"],"title":"HermesTurnPersistRequest"},"HermesWakeCheckRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"cadence_hours":{"type":"number","maximum":720.0,"minimum":1.0,"title":"Cadence Hours","default":24.0},"threshold_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Threshold Pct","default":10.0},"since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since","description":"ISO override for the last-wake cursor (test)."}},"type":"object","required":["entity_id"],"title":"HermesWakeCheckRequest"},"HermesWakeRunRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"cadence_hours":{"type":"number","maximum":720.0,"minimum":1.0,"title":"Cadence Hours","default":24.0},"threshold_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Threshold Pct","default":10.0},"force":{"type":"boolean","title":"Force","description":"Wake even if no trigger is due.","default":false}},"type":"object","required":["entity_id"],"title":"HermesWakeRunRequest"},"InboxKitCloudflareConnectRequest":{"properties":{"entity_id":{"type":"string","maxLength":255,"minLength":1,"title":"Entity Id","description":"The workspace this domain is connected for"},"domain_name":{"type":"string","title":"Domain Name","description":"The domain the user already owns, e.g. acme-corp.com"},"auth_type":{"type":"string","title":"Auth Type","description":"api_token | global_api_key","default":"api_token"},"api_token":{"type":"string","maxLength":500,"title":"Api Token","description":"Cloudflare API token (Zone:Read + DNS:Edit). Required for auth_type=api_token.","default":""},"email":{"type":"string","maxLength":255,"title":"Email","description":"Cloudflare account email. Required for auth_type=global_api_key.","default":""},"global_api_key":{"type":"string","maxLength":500,"title":"Global Api Key","description":"Cloudflare Global API Key. Required for auth_type=global_api_key.","default":""},"label":{"type":"string","maxLength":100,"title":"Label","description":"Optional human-readable label for the credentials","default":""},"validate_dns":{"type":"boolean","title":"Validate Dns","description":"Check the zone's existing mail records before connecting; a clash is refused with the records to remove.","default":true},"domain_confirm":{"type":"boolean","title":"Domain Confirm","description":"Required True — connecting a domain is an EXTERNAL EFFECT (MR0/MR0a). Reversible via disconnect.","default":false}},"type":"object","required":["entity_id","domain_name"],"title":"InboxKitCloudflareConnectRequest","description":"Connect a domain the user already owns, keeping its zone at Cloudflare (P134 T1351 / D-134-027).\n\nThe token is the USER's own, scoped Zone:Read + DNS:Edit, so nothing else on his domain moves."},"InboxKitDomainConnectRequest":{"properties":{"domain_name":{"type":"string","title":"Domain Name","description":"Full domain to connect, e.g. getraisy.com"},"domain_confirm":{"type":"boolean","title":"Domain Confirm","description":"Required True to create the InboxKit/Cloudflare nameserver record (external API write).","default":false}},"type":"object","required":["domain_name"],"title":"InboxKitDomainConnectRequest"},"InboxKitDomainForwardingRequest":{"properties":{"domain_uid":{"type":"string","title":"Domain Uid","description":"InboxKit domain uid from connect/domain list"},"forwarding_url":{"type":"string","title":"Forwarding Url","description":"Target URL (empty string removes forwarding). Preserves e.g. getraisy.com -> raisy.team.","default":""}},"type":"object","required":["domain_uid"],"title":"InboxKitDomainForwardingRequest"},"InboxKitDomainNameserversRequest":{"properties":{"domain_name":{"type":"string","title":"Domain Name","description":"Porkbun domain whose nameservers to set, e.g. getraisy.com"},"nameservers":{"items":{"type":"string"},"type":"array","title":"Nameservers","description":"Nameservers returned by connect, e.g. ['casey.ns.cloudflare.com','eve.ns.cloudflare.com']"},"domain_confirm":{"type":"boolean","title":"Domain Confirm","description":"Required True — moving DNS authority at Porkbun is an EXTERNAL EFFECT (MR0/MR0a). Reversible.","default":false}},"type":"object","required":["domain_name","nameservers"],"title":"InboxKitDomainNameserversRequest"},"InboxKitMailboxBuyRequest":{"properties":{"domain_name":{"type":"string","title":"Domain Name","description":"Connected domain, e.g. getraisy.com"},"username":{"type":"string","title":"Username","description":"Local part of the email address (before @), e.g. david"},"first_name":{"type":"string","title":"First Name","description":"Display first name"},"last_name":{"type":"string","title":"Last Name","description":"Display last name","default":""},"platform":{"type":"string","title":"Platform","description":"GOOGLE | MICROSOFT (<=5/domain) | AZURE (<=100/domain, per-client tenant isolation, wallet-billed)","default":"GOOGLE"},"use_wallet_balance":{"type":"boolean","title":"Use Wallet Balance","description":"True = pay from wallet credit; False = subscription mailbox slots","default":true},"mailbox_confirm":{"type":"boolean","title":"Mailbox Confirm","description":"Required True — purchasing a mailbox is an EXTERNAL EFFECT + funds spend (MR0/MR0a).","default":false}},"type":"object","required":["domain_name","username","first_name"],"title":"InboxKitMailboxBuyRequest"},"InboxKitMailboxStatusRequest":{"properties":{"uids":{"items":{"type":"string"},"type":"array","title":"Uids","description":"Mailbox uids to check (provisioning status poll)"}},"type":"object","required":["uids"],"title":"InboxKitMailboxStatusRequest"},"InboxKitNameserverRecoveryRequest":{"properties":{"domain_name":{"type":"string","title":"Domain Name","description":"The domain whose delegation lapsed, e.g. acme-corp.com"},"domain_confirm":{"type":"boolean","title":"Domain Confirm","description":"Required True — regenerating creates NEW Cloudflare zones and returns a fresh nameserver pair (external effect, MR0/MR0a). The domain returns to not_connected.","default":false}},"type":"object","required":["domain_name"],"title":"InboxKitNameserverRecoveryRequest"},"IndexesResponse":{"properties":{"status":{"type":"boolean","title":"Status","default":true},"status_code":{"type":"integer","title":"Status Code","default":200},"message":{"type":"string","title":"Message","default":"Indexes loaded"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","title":"IndexesResponse"},"IngestCoverage":{"properties":{"connections_after":{"type":"integer","title":"Connections After"}},"type":"object","required":["connections_after"],"title":"IngestCoverage","description":"How many live `connect` edges the owner holds AFTER this import.\n\nThe number exists because an EMPTY network makes the bridge search answer `not_found` for a\nSTRUCTURAL reason, so a 0 warm-path rate over no connections is uninformative — never a pass."},"IngestEmployers":{"properties":{"linked":{"type":"integer","title":"Linked"},"already_linked":{"type":"integer","title":"Already Linked"},"unknown_in_your_graph":{"type":"integer","title":"Unknown In Your Graph"}},"type":"object","required":["linked","already_linked","unknown_in_your_graph"],"title":"IngestEmployers","description":"What happened to the EMPLOYER each imported contact names (`D-064-014`). A `connect` edge alone\nputs a person in the network and reaches no firm, so the employer derived from his file is the\nsecond edge that lets a bridge lead anywhere — and an employer this graph does not know is\nREPORTED (`unknown_in_your_graph`) rather than minted.\n\n⚠️ NOT THE BRIDGE SEARCH'S COVERAGE. This counts OUTCOMES of an import; `NetworkCoverage` counts\nhow much of the network a SEARCH read. Two shapes, two questions."},"IngestFromSourceRequest":{"properties":{"source_text":{"type":"string","title":"Source Text","description":"Raw markdown/text source to ingest"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name","description":"Human-readable source name"},"source_type":{"type":"string","title":"Source Type","description":"Source type (markdown, text)","default":"markdown"},"auto_approve":{"type":"boolean","title":"Auto Approve","description":"Skip pending_review and activate immediately","default":false},"model_tier":{"type":"string","title":"Model Tier","description":"Model tier: fast, medium, or quality","default":"fast"},"preview":{"type":"boolean","title":"Preview","description":"Show the chain structure and mint nothing until it is approved (T0265 / @R01 §02). False is the pre-preview behaviour: plan and mint in one go.","default":true}},"type":"object","required":["source_text"],"title":"IngestFromSourceRequest"},"IngestLinkRequest":{"properties":{"link":{"type":"string","title":"Link","description":"A link the user is holding (a LinkedIn post today)"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name","description":"Human-readable source name"},"auto_approve":{"type":"boolean","title":"Auto Approve","description":"Skip pending_review and activate immediately","default":false},"model_tier":{"type":"string","title":"Model Tier","description":"Model tier: fast, medium, or quality","default":"fast"},"scope":{"type":"string","title":"Scope","description":"global or private","default":"global"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity for private scope"},"preview":{"type":"boolean","title":"Preview","description":"Show the chain structure and mint nothing until it is approved (T0265 / @R01 §02). False is the pre-preview behaviour: plan and mint in one go.","default":true}},"type":"object","required":["link"],"title":"IngestLinkRequest"},"IntroRequestBot":{"properties":{"botId":{"type":"string","title":"Botid"},"botName":{"type":"string","title":"Botname"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["botId","botName","version"],"title":"IntroRequestBot","description":"The `(bot, version)` lineage of the draft (`MR31`) — the run that produced this text."},"IntroRequestDraftRequest":{"properties":{"owner_entity_id":{"type":"string","title":"Owner Entity Id"},"target_entity_id":{"type":"string","title":"Target Entity Id"},"bridge_entity_id":{"type":"string","title":"Bridge Entity Id"},"sender":{"anyOf":[{"$ref":"#/components/schemas/SenderWording"},{"type":"null"}]}},"type":"object","required":["owner_entity_id","target_entity_id","bridge_entity_id"],"title":"IntroRequestDraftRequest","description":"The client names the BRIDGE and nothing else about the path — see the route docstring for why."},"IntroRequestDraftResult":{"properties":{"state":{"anyOf":[{"type":"string","enum":["found","not_found","could_not_check","drafted"]},{"type":"null"}],"title":"State"},"drafted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Drafted"},"paths":{"anyOf":[{"items":{"$ref":"#/components/schemas/WarmIntroPath"},"type":"array"},{"type":"null"}],"title":"Paths"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"network_coverage":{"anyOf":[{"$ref":"#/components/schemas/NetworkCoverage"},{"type":"null"}]},"target":{"anyOf":[{"$ref":"#/components/schemas/WarmIntroTarget"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"disclosure_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure Line"},"prepared_item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prepared Item Id"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"},"bot":{"anyOf":[{"$ref":"#/components/schemas/IntroRequestBot"},{"type":"null"}]},"via":{"anyOf":[{"type":"string","enum":["knows_target","colleague_at_firm","connects_to_firm"]},{"type":"null"}],"title":"Via"},"predicate_class":{"anyOf":[{"type":"string","enum":["private","structural"]},{"type":"null"}],"title":"Predicate Class"}},"type":"object","title":"IntroRequestDraftResult","description":"The draft reply. TWO SHAPES under one route, and the SUCCESS one has `state` **without** `paths`.\n\n⚠️ WHY THIS DOES NOT INHERIT `WarmIntroResult`, WHICH IT LOOKS LIKE IT SHOULD. The refusal is\n`{**result, \"drafted\": False}` where `result` IS the engine's answer — so it carries `state`,\n`paths`, and optionally `reason`/`network_coverage`/`target`. The SUCCESS is\n`{**draft, state, drafted, via, predicate_class}` and carries **no `paths` at all**. Inheriting\nwould make `paths` required and turn every successful draft into a `ResponseValidationError`;\nmaking `paths` optional on `WarmIntroResult` would instead WEAKEN the bridges contract, which\nasserts it is required because all six of that engine's return sites supply it (`L55` fact 4).\n\nSo every field is declared and none is required, published with `exclude_unset` so each shape\nkeeps exactly the keys it emits. The nested pieces are REUSED (`WarmIntroPath`, `NetworkCoverage`,\n`WarmIntroTarget`) rather than restated — one declaration per fact.\n\nMEASURED, NOT INFERRED: the success keys were read off the live DEV response\n(`probe_intro_request_draft`, 2026-10-10) —\n`state · drafted · subject · body · disclosure_line · prepared_item_id · call_id · bot · via ·\npredicate_class` — because a `response_model` silently DELETES a key it does not declare, so the\ndeclared set must come from the wire and not from the route's source."},"InvestorEnrichEnqueueRequest":{"properties":{"entity_ids":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Entity Ids","description":"Investor entity barcodes (person or firm) to run through the enrich_investor farm (D-088)"},"source":{"type":"string","title":"Source","description":"Source label stamped on the batch","default":"investor_enrich"}},"type":"object","required":["entity_ids"],"title":"InvestorEnrichEnqueueRequest"},"InvestorEnrichStatusRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Investor entity barcode whose latest enrich-job state to read"}},"type":"object","required":["entity_id"],"title":"InvestorEnrichStatusRequest"},"InvestorEnrichWorkerRequest":{"properties":{"steps":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Steps","description":"Worker FIFO steps to run","default":1},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Jobs to process per step","default":10}},"type":"object","title":"InvestorEnrichWorkerRequest"},"InvestorExclusionImportRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The owner whose list this is"},"csv":{"type":"string","title":"Csv","description":"The file's text. Headers must include an 'email' column."},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","description":"NEEDED for an address nobody here knows: an exclusion for an unknown address can only bind to ONE sending identity, and without one it would block nothing."}},"type":"object","required":["entity_id","csv"],"title":"InvestorExclusionImportRequest","description":"project092 T0215 — a SUPPRESSION list: who to never contact again."},"InvestorFindAddRequest":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Investor/fund website URL to scrape and add"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Fund name to look up (DB then Hunter Discover) when no URL is given"},"source":{"type":"string","title":"Source","description":"Source label stamped on the entity","default":"user_scrape"},"raising_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raising Entity Id","description":"Raising entity barcode — links the investor via an active `investor` relationship edge (D-082)"}},"type":"object","title":"InvestorFindAddRequest"},"InvestorImportRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The owner the imported investors belong to"},"csv":{"type":"string","title":"Csv","description":"The file's text. Headers must include an 'email' column."}},"type":"object","required":["entity_id","csv"],"title":"InvestorImportRequest","description":"project092 T0215 — a CONTACT list to import."},"InvestorInReach":{"properties":{"investor_entity_id":{"type":"string","title":"Investor Entity Id"},"firm_entity_ids":{"items":{"type":"string"},"type":"array","title":"Firm Entity Ids","default":[]},"bridge_entity_ids":{"items":{"type":"string"},"type":"array","title":"Bridge Entity Ids","default":[]},"investor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investor Name"},"firm_names":{"items":{"type":"string"},"type":"array","title":"Firm Names","default":[]},"bridge_names":{"items":{"type":"string"},"type":"array","title":"Bridge Names","default":[]}},"type":"object","required":["investor_entity_id"],"title":"InvestorInReach","description":"One fund the founder's OWN network can already reach (`investors_in_network`, 2026-10-12).\n\n`bridge_entity_ids` is what makes this actionable rather than a list: at FIRST level it is EMPTY,\nbecause the fund IS a connection and there is nobody to ask — the founder writes to him directly\n(the same fact `find_bridges` reports as `already_connected`). At SECOND level it names the\nconnection(s) whose firm the fund sits at, which is the person the founder asks."},"InvestorLlmEnrichFieldsRequest":{"properties":{"investor_entity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Investor Entity Ids","description":"Explicit investor entity IDs to enrich (default: investors with missing fields)"},"limit":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Limit","description":"Max investors to enrich per call (cost cap)","default":5},"force":{"type":"boolean","title":"Force","description":"Re-run even when all fields are present","default":false}},"type":"object","title":"InvestorLlmEnrichFieldsRequest"},"InvestorNotesRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The owner — whose words these are"},"investor_entity_id":{"type":"string","title":"Investor Entity Id","description":"The investor the note is about"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes","description":"Omit to LEAVE THE NOTE ALONE; send \"\" to CLEAR it. The distinction is the reason this is optional: saving tags must not wipe the note."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Omit to leave the tags alone; send [] to clear them."}},"type":"object","required":["entity_id","investor_entity_id"],"title":"InvestorNotesRequest","description":"project092 T0206 — her private note and tags about one investor she added by hand."},"InvestorOutreachPrepareSenderRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Raising entity barcode to draft copy for (D-086)"},"raising_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raising Stage","description":"Declared round label, e.g. Pre-seed"},"raising_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raising Amount","description":"Declared amount, e.g. $1.0M"},"check_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Size","description":"Declared check size"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector","description":"Declared sector focus"},"target_geography":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Geography","description":"Declared target geography"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Tier preset; defaults to medium","default":"medium"}},"type":"object","required":["entity_id"],"title":"InvestorOutreachPrepareSenderRequest"},"InvestorOutreachSendRequest":{"properties":{"owner_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Entity Id","description":"Entity running the campaign. Optional in global mode when investor_entity_ids selects the investors directly."},"sender":{"$ref":"#/components/schemas/SenderInfo"},"investor_entity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Investor Entity Ids","description":"Optional explicit list of investor entity IDs to email"},"template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Key","description":"BD196 template kernel key to use","default":"raisy_BD196_00001"},"attachment_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Attachment Ids","description":"project092 T0211 — ids from POST /investor-outreach/attachment, carried with every recipient's copy. Owner-only: another user's id is refused."},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id","description":"Internal campaign id","default":"project080_v1"},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Name","description":"Human campaign name","default":"Investor Outreach v1"},"test_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Kind","description":"Mark this batch a TEST (P080 D-099/D-100/D-102). A marked test may only reach a designated test address or the requesting owner — the send gate refuses a third party — so a QA/E2E run can no longer reach a real investor. Tests must target `david@csdemmer.de` or `davidgdemmer@gmail.com` (the compliance registry's `test_recipients`)."},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Max investors to email (default 5)","default":5},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","description":"Assemble emails but do not send or write to communications","default":false},"bcc_self":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bcc Self","description":"project092 T0207 — send the founder a copy of every email actually sent, so she has her own record. The copy is not a reachout: no credit, no ledger row.","default":false},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case","description":"BD pipeline code selecting the compliance overlay. BD70.3 = investor first touch (teaser); BD70 = offer stage (stricter).","default":"BD70.3"},"personalize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Personalize","description":"D-086 slice 2 (O-A): when true, draft each recipient email per-investor with the registered Email Writer bot (reviewed sender wording + investor BD90 facts); deterministic template-fill is the fallback on any writer failure.","default":false},"drafts_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drafts Entity Id","description":"The entity whose DRAFTS this assemble produces — the raising company. It scopes the LOGGED writer calls only (never their kernel assembly), so each per-investor draft lands in that workspace's prepared queue (/email -> Drafts) instead of being an unscoped row any caller can read. Deliberately NOT `owner_entity_id`, which switches the send into legacy relationship mode."}},"type":"object","required":["sender"],"title":"InvestorOutreachSendRequest"},"InvestorPersonAddRequest":{"properties":{"entity_name":{"type":"string","maxLength":255,"minLength":1,"title":"Entity Name","description":"Person investor's name (MR1 — a person is an Entity)"},"affiliation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliation","description":"Firm/org they belong to (linked as employee relationship when we hold that firm)"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"Role at the firm (e.g. Venture Capitalist, Partner)"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website","description":"Canonical profile/website URL if any"},"raising_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raising Entity Id","description":"Raising entity barcode — links the person via an active `investor` relationship edge (D-082)"}},"type":"object","required":["entity_name"],"title":"InvestorPersonAddRequest"},"InvestorPersonEmailRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Person investor entity barcode to find a corporate email for"},"firm_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firm Entity Id","description":"Firm entity to search (defaults to the person's active employee relationship, D-083)"}},"type":"object","required":["entity_id"],"title":"InvestorPersonEmailRequest"},"InvestorResolveRequest":{"properties":{"query":{"type":"string","maxLength":200,"minLength":1,"title":"Query","description":"Fund name, person name, or website URL to resolve"},"limit":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Limit","description":"Max candidate investors to return","default":6}},"type":"object","required":["query"],"title":"InvestorResolveRequest"},"InvestorsInReachResult":{"properties":{"state":{"type":"string","title":"State"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"first_level":{"items":{"$ref":"#/components/schemas/InvestorInReach"},"type":"array","title":"First Level","default":[]},"second_level":{"items":{"$ref":"#/components/schemas/InvestorInReach"},"type":"array","title":"Second Level","default":[]},"network_coverage":{"anyOf":[{"$ref":"#/components/schemas/NetworkCoverage"},{"type":"null"}]}},"type":"object","required":["state"],"title":"InvestorsInReachResult","description":"THE INVERSE OF THE BRIDGE SEARCH, and the difference is which side the founder starts from.\n\n`GET /connections/bridges` is TARGET-driven: give it one investor and it finds who reaches him.\nThis is NETWORK-driven: it asks what the founder's network already reaches, so he can see the\nopportunities he did not know to search for. Both are honest about the same three states.\n\n`reason` distinguishes the two `not_found`s that must never be conflated: `empty_network` (nothing\nhas been read yet — a zero here is UNINFORMATIVE) and `no_investor_in_reach` (the search RAN over a\nreal network and found no fund — an informative answer). It is ABSENT on a `found`, and the route\npublishes with `response_model_exclude_unset=True` so absent stays absent rather than becoming null."},"KernelApplyPatchRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"Kernel to create new version for"},"patchedContent":{"type":"string","title":"Patchedcontent","description":"The sp_new_content from patch preview"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description for the new version"},"patchRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patchrunid","description":"T0224 correlation id — stamped into the version description so the resulting kernel version can be traced back to the 61/73 calls that produced it"},"allowSharedEdit":{"type":"boolean","title":"Allowsharededit","description":"Confirm you intend to change every bot that shares this kernel","default":false}},"type":"object","required":["kernelKey","patchedContent"],"title":"KernelApplyPatchRequest","description":"Apply a patch by saving patched content as a new kernel version."},"KernelAutoCreateRequest":{"properties":{"content":{"type":"string","title":"Content","description":"Kernel content (text/JSON/markdown)"},"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension","description":"Pin the BD anchor; if omitted, derived from content"},"botDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimensionsub","description":"Pin the BDsub (optional)"},"kernelName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelname","description":"Override name; else derived from content"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Override description; else derived from content"},"kernelFormat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelformat","description":"Override format; else detected (json/markdown/text)"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Override tags; else derived. KD secondary codes are always merged in."},"inputVariables":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Inputvariables","description":"Override input variables; else auto-extracted from content"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity barcode owner (None = global)"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"global | private","default":"global"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Classifier/metadata model","default":"gpt-4o-mini"}},"type":"object","required":["content"],"title":"KernelAutoCreateRequest","description":"Automatic one-shot kernel creation: paste content → the system derives the full\nsignature (BD anchor + KD refinement) + metadata, then saves the kernel. The kernel\nanalogue of POST /bot/create_intent_2_bot_auto. Optional overrides let the caller pin any field."},"KernelAutoTagRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"Kernel key to auto-tag"}},"type":"object","required":["kernelKey"],"title":"KernelAutoTagRequest","description":"Auto-tag request for a single kernel."},"KernelBatchEmbedRequest":{"properties":{"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension","description":"Restrict to a specific BD (None = all)"}},"type":"object","title":"KernelBatchEmbedRequest","description":"Batch embed request for all unembedded kernels."},"KernelDeriveSignatureRequest":{"properties":{"content":{"type":"string","title":"Content","description":"Kernel content to classify"},"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension","description":"BD anchor; if omitted, inferred from kernelKey"},"botDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimensionsub","description":"BDsub value (optional)"},"kernelKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelkey","description":"Existing kernel key — used to resolve botDimension if not given"},"kernelName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelname","description":"Optional name, improves classification"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description, improves classification"},"includeMetadata":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Includemetadata","description":"Also derive Details (name, description, tags, format) from content","default":false}},"type":"object","required":["content"],"title":"KernelDeriveSignatureRequest","description":"Automatic flow: derive a kernel's KD classification from its content."},"KernelGetRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"Kernel identifier"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"Specific version (default: latest)"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity barcode for scoped resolution"}},"type":"object","required":["kernelKey"],"title":"KernelGetRequest","description":"T0108: Get kernel request"},"KernelInvokeRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"Kernel identifier"},"input_prompt":{"type":"string","title":"Input Prompt","description":"User input/prompt"},"variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables","description":"Template variables"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model override (required if `mode` is not set)"},"thinking_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking Level","description":"Thinking level override (leave unset to use `mode`'s preset)"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"fast, medium or quality (required if `model` is not set)"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for kernel resolution"}},"type":"object","required":["kernelKey","input_prompt"],"title":"KernelInvokeRequest","description":"Invoke a single kernel directly (for testing)."},"KernelLookupRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Whose record to look in — never trusted alone (MR24)"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question","description":"What was asked, in the person's words. Used to DERIVE the signature when coordinates are not given — the PO's own method, 2026-09-21."},"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension","description":"BD anchor, when the caller knows it"},"botDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimensionsub","description":"BDsub"},"kernelDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kerneldimension","description":"KD — the specific slot"},"limit":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Limit","description":"PAGE SIZE, not the number that exists. The response carries `total` and `truncated`; a truncated answer must be reported as a page, never as the whole record.","default":3}},"type":"object","required":["entity_id"],"title":"KernelLookupRequest","description":"A question, or explicit coordinates — how a room asks the company's own record."},"KernelMatchRequest":{"properties":{"botDimension":{"type":"integer","title":"Botdimension","description":"BD number, e.g. 155"},"botDimensionSub":{"type":"integer","title":"Botdimensionsub","description":"BD subcategory, e.g. 1=Browser Automation"},"kernelDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kerneldimension","description":"Primary KD value (KD.10), e.g. 1. If provided, tries BD+BDsub+KD first, then falls back to BD+BDsub only."}},"type":"object","required":["botDimension","botDimensionSub"],"title":"KernelMatchRequest","description":"Exact-match request for kernels by BD + BDsub + optional KD."},"KernelMemoryPromoteRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"The kernel whose global rule is being improved."},"entity_id":{"type":"string","title":"Entity Id","description":"The entity whose PRIVATE version holds the correction. The caller must be an owner/editor ON THIS entity — that is the whole of `D-017-003`."},"memoryLine":{"type":"string","title":"Memoryline","description":"The ONE line being promoted. It must already be on that entity's private version: promotion moves a correction the entity recorded, it does not invent one, and it moves only the named line — never the private row."}},"type":"object","required":["kernelKey","entity_id","memoryLine"],"title":"KernelMemoryPromoteRequest","description":"Publish ONE named line from an entity's private correction into the global rule."},"KernelMemoryRevertPromotionRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"The kernel the promotion wrote to."},"promotionId":{"type":"string","title":"Promotionid","description":"The id named on the promoted line and in the receipt."}},"type":"object","required":["kernelKey","promotionId"],"title":"KernelMemoryRevertPromotionRequest","description":"Undo one promotion — as a FORWARD version, because `D-017-003` decided nothing deletes."},"KernelPatchRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"Kernel to patch"},"instructions":{"type":"string","title":"Instructions","description":"Editing instructions (e.g. 'Add zero-state handling')"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model for raisy_73","default":"gemini-3.1-pro"},"thinking_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking Level","description":"Thinking level","default":"HIGH"},"bot_context":{"anyOf":[{"$ref":"#/components/schemas/BotContext"},{"type":"null"}],"description":"Context from AdminBotTestbench (other kernels, last I/O)"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for kernel resolution"},"patchRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patchrunid","description":"Correlation id from /kernel/strategize"},"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid","description":"Bot this patch is being made for (audit only)"}},"type":"object","required":["kernelKey","instructions"],"title":"KernelPatchRequest","description":"Generate delta patch preview for a kernel using raisy_73."},"KernelRevertLearningRequest":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"The kernel the learning was written to."},"patchRunId":{"type":"string","title":"Patchrunid","description":"The patch run that wrote it. One run, one kernel, one revert — the same pair `revert_applied_patch` matches on."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},"type":"object","required":["kernelKey","patchRunId"],"title":"KernelRevertLearningRequest","description":"Undo one auto-learned write (P135 T2 — the destination for the note's Reject).\n\n⚠️ DEPRECATED 2026-10-08 (P135 T1374) — see the route below. Kept only because the route\nthat takes it is kept."},"KernelReviewRequest":{"properties":{"verdict":{"type":"string","title":"Verdict","description":"approved | rejected"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"Reviewer notes / why"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version","description":"Version to review; defaults to latest active"}},"type":"object","required":["verdict"],"title":"KernelReviewRequest","description":"Lightweight kernel review verdict for a kernel version (accept / reject)."},"KernelSaveRequest":{"properties":{"kernelKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelkey","description":"Existing kernel key (for new version)"},"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension","description":"BD (Bot Dimension) number, e.g. 10, 999. Required for a new kernel; pass with an existing kernelKey to reclassify a new version (note: the kernelKey itself keeps its original BD in its name)."},"botDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimensionsub","description":"Subcategory value within BD, e.g. 1, 2, 3. With an existing kernelKey, overrides the subcategory for the new version."},"kernelDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kerneldimension","description":"Primary KD value (KD.10) per kernel_index_dimensions.json, e.g. 1=web_search"},"kernelDimensionAnswers":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Kerneldimensionanswers","description":"Manual KD classification: map of KD code → chosen value within this kernel's BD slot, e.g. {\"10\": 1, \"20\": 2, \"50\": 1} for a BD155 skill. Validated against kernel_index_dimensions; the primary (.10) value populates kernelDimension, secondary codes are stored in tags, and the full signature in classification. Use GET /kernel/kd-schema?botDimension=… to fetch the question set."},"content":{"type":"string","title":"Content","description":"Kernel content (text/JSON/markdown)"},"kernelName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelname","description":"Human-readable name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What this kernel does"},"kernelFormat":{"type":"string","title":"Kernelformat","description":"text, json, or markdown","default":"text"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Categorization tags"},"inputVariables":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Inputvariables","description":"Input variable schemas. Regular kernels: [{name, type, required, description}] — describes {placeholder} vars that kernel_loader.py string-replaces at runtime. BD155 skill kernels: same schema — describes JSON fields scripts/main.py parses from sys.argv[1]. Extra skill-only fields: secret (bool, renders as password in FE), default (any, pre-fills the form field). Supported types: string, integer, float, boolean, text."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity barcode owner (None = global)"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"global | private","default":"global"},"basedOnVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Basedonversion","description":"OPTIMISTIC CONCURRENCY (T0287.15): the version this content was edited FROM. When it is provided and `kernelKey` names an existing kernel, the save is REFUSED with 409 if that kernel has moved on — instead of silently minting a version that buries another hand's work. Omit it and the behaviour is exactly as before (an unconditional new version), so no existing caller is affected."}},"type":"object","required":["content"],"title":"KernelSaveRequest","description":"T0108: Save/version kernel request.\n\nTwo modes:\n1. New kernel: pass `botDimension` + `content`. BE auto-assigns kernelNumber + kernelKey.\n2. New version: pass `kernelKey` + `content`. BE auto-increments versionNumber.\n\nAt least one of `botDimension` or `kernelKey` must be provided."},"KernelSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language query (e.g. 'web search skill')"},"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension","description":"Restrict search to a specific BD (e.g. 155 for skills)"},"top_n":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top N","description":"Max results to return","default":5},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Threshold","description":"Minimum similarity score","default":0.75},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"P017 Track F: which entity's PRIVATE kernels may be returned, alongside the global corpus. Omit for the global corpus only — BEFORE this field existed the search was unscoped over the shared `kernels` table and could return ANOTHER entity's private kernel, ranked by similarity."}},"type":"object","required":["query"],"title":"KernelSearchRequest","description":"Semantic search request for kernels."},"KernelStatusRequest":{"properties":{"kernelId":{"type":"string","title":"Kernelid","description":"Kernel barcode"},"status":{"type":"string","title":"Status","description":"draft, pending_review, approved, rejected, deprecated"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"Review feedback"}},"type":"object","required":["kernelId","status"],"title":"KernelStatusRequest","description":"T0108: Update kernel status (governance)"},"KernelStrategizeRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot whose full kernel assembly should be diagnosed"},"callId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callid","description":"Diagnose the kernels THIS call actually ran, instead of the bot's registered assembly. Required to diagnose a caller whose assembly is built per-call (the kernel/schema minters, classifier, namer and other direct callers) — their `bots` row is a placeholder with no kernel_keys_ref."},"instructions":{"type":"string","title":"Instructions","description":"Freeform user imperative describing the problem (e.g. 'the tone is too casual')"},"last_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Input","description":"The last user input prompt sent to the bot"},"last_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Output","description":"The last LLM output from the bot run"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model for raisy_61","default":"gemini-3.1-pro"},"thinking_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking Level","description":"Thinking level","default":"HIGH"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for kernel resolution"}},"type":"object","required":["botId","instructions"],"title":"KernelStrategizeRequest","description":"Bot-level diagnosis request for raisy_61 (SP Refactoring Strategist, PROJECT074)."},"KpiEvaluateRequest":{"properties":{"entitykey":{"type":"string","title":"Entitykey","description":"Timeless entity lookup key (entities.entitykey)"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Exact entity version (entities.entity_id) — auto-resolved from entitykey if omitted"},"process_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Id","description":"Exact process version (processes.processid)"},"kpi_key":{"type":"string","title":"Kpi Key","description":"KPI identifier"},"kernel_id":{"type":"string","title":"Kernel Id","description":"UUID of D80_KPI formula kernel"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Execution run ID for execution_output source"},"manual_inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Manual Inputs","description":"Override inputs for manual_entry source"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel","description":"MR29 class — EMAIL · MESSENGER · SOCIAL · CALENDAR · VOICE"}},"type":"object","required":["entitykey","kpi_key","kernel_id"],"title":"KpiEvaluateRequest"},"KpiHealthReportRequest":{"properties":{"entitykey":{"type":"string","title":"Entitykey","description":"Timeless entity lookup key (entities.entitykey)"},"stale_after_hours":{"type":"integer","minimum":1.0,"title":"Stale After Hours","description":"Caller-stated staleness window in hours: a measure whose newest live row is older than this reads stale. Default 24.","default":24}},"type":"object","required":["entitykey"],"title":"KpiHealthReportRequest"},"LinkedInBlogPublishRequest":{"properties":{"slug":{"type":"string","title":"Slug","description":"Blog slug (blogPosts.tsx source of truth)"},"commentary":{"type":"string","title":"Commentary","description":"Post copy (auto-draft from bot is T0105; FE passes copy for now)"},"approval_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Mode"}},"type":"object","required":["slug","commentary"],"title":"LinkedInBlogPublishRequest"},"LinkedInConnectRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"target":{"type":"string","title":"Target","description":"'member' (default) or 'organization' — the scope selector, whose scope map is shared with the adapter (TARGET_SCOPES)","default":"member"}},"type":"object","required":["entity_id"],"title":"LinkedInConnectRequest"},"LinkedInEntityIdRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"}},"type":"object","required":["entity_id"],"title":"LinkedInEntityIdRequest","description":"Every credential route here is addressed by the entity that owns the vault entry.\n(Was `LinkedInDisconnectRequest`; renamed when `/verify_credential` reused it — a name that\nsaid \"disconnect\" on a verification route would be a lying name, `RULES_NAMING` §3.)"},"LinkedInPublishRequest":{"properties":{"author_entity_id":{"type":"string","title":"Author Entity Id","description":"Entity whose LinkedIn account to use"},"author_kind":{"type":"string","title":"Author Kind","description":"'member' or 'organization'","default":"member"},"post_type":{"type":"string","title":"Post Type","description":"'text' or 'article'","default":"text"},"commentary":{"type":"string","title":"Commentary","description":"Post text above the card / update body"},"article_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Source","description":"Article URL (article posts only)"},"article_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Title","description":"Article card title (article posts only)"},"article_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Description","description":"Article card description"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url","description":"Optional thumbnail image URL"},"visibility":{"type":"string","title":"Visibility","description":"'PUBLIC' or 'CONNECTIONS'","default":"PUBLIC"},"approval_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Mode","description":"MANUAL|SEMI_AUTO|FULL_AUTO; defaults to resolver/system (gated)"}},"type":"object","required":["author_entity_id","commentary"],"title":"LinkedInPublishRequest"},"ListKernelsRequest":{"properties":{"summary":{"type":"boolean","title":"Summary","default":true},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1},"pageSize":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Pagesize","default":20},"sortBy":{"type":"string","title":"Sortby","default":"kernelNumber"},"sortOrder":{"type":"string","title":"Sortorder","default":"asc"},"search":{"type":"string","title":"Search","default":""},"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension"},"botDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimensionsub"},"kernelFormat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelformat"},"entitledOnly":{"type":"boolean","title":"Entitledonly","default":false},"asRegularUser":{"type":"boolean","title":"Asregularuser","default":false},"facets":{"type":"boolean","title":"Facets","default":false},"status":{"type":"string","title":"Status","default":"active"},"source":{"type":"string","title":"Source","default":""}},"type":"object","title":"ListKernelsRequest"},"MailActionRequest":{"properties":{"mailbox_uid":{"type":"string","title":"Mailbox Uid"},"action":{"type":"string","title":"Action"}},"type":"object","required":["mailbox_uid","action"],"title":"MailActionRequest","description":"The action row's contract — the four verbs the surface's buttons already send.\n\n`mailbox_uid` travels in the BODY rather than as a query parameter because the route is a POST\nand the engine already sends the pair together (`mailApi.threadAction`); the uid is resolved and\nauthorised server-side either way, so its placement carries no authority."},"MailAuthentication":{"properties":{"spf":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spf","description":"True/False/None — None means DNS did not answer"},"dkim_configured":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dkim Configured","description":"True/False/None — None means not read"},"dkim_selector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dkim Selector","description":"The selector that was found, when one was"},"dmarc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dmarc","description":"The DMARC policy (none/quarantine/reject), when published"}},"type":"object","required":["spf","dkim_configured","dkim_selector","dmarc"],"title":"MailAuthentication","description":"The three records that decide whether mail from this domain is trusted.\n\nEVERY FIELD IS REQUIRED, for the same reason the parent model's are: the service always returns\nall four keys, and a default would publish them as optional — which made the generated TS type\nread `spf?: boolean | null` and forced the FE to defend against `undefined` on a field that is\nalways present. The VALUE may be None (a DNS silence is not an absence); the FIELD may not be\nabsent."},"MailDelegationRequest":{"properties":{"mailbox_uid":{"type":"string","maxLength":255,"minLength":1,"title":"Mailbox Uid"},"mode":{"type":"string","title":"Mode","description":"One of MANUAL · SEMI_AUTO · CONFIDENCE_BASED · FULL_AUTO"},"confidence_threshold":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence Threshold","description":"Only read by CONFIDENCE_BASED: the line the machine's own confidence must clear"}},"type":"object","required":["mailbox_uid","mode"],"title":"MailDelegationRequest","description":"Choosing how much of the review the machine may take (P133 T1343)."},"MailDraftRequest":{"properties":{"mailbox_uid":{"type":"string","title":"Mailbox Uid"},"folder":{"type":"string","title":"Folder","default":"inbox"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender"}},"type":"object","required":["mailbox_uid"],"title":"MailDraftRequest","description":"What the one-click draft sends: the mailbox and the thread, and nothing else.\n\nNO FORM, and that is `R-P2.24`'s own word (*\"a control on the message row (one action, no form)\"*). A\nrequest model with fields for the subject, the tone or the recipient would be the form this control\nexists to avoid — the thread already carries all of it and the voice comes from the profile."},"MailItemEditRequest":{"properties":{"body":{"type":"string","title":"Body"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"}},"type":"object","required":["body"],"title":"MailItemEditRequest","description":"What the owner sends when he changes a draft's words (P138 `R-P2.7` / `T1380`).\n\n`body` REQUIRED, `subject` optional, and that asymmetry is deliberate: an edit that changes nothing is\nnot an edit, and the common correction is the body. A caller wanting to change only the subject sends\nthe body it already holds, which is what a surface rendering the item does anyway — and the alternative\n(`Optional` both, with a `nothing changed` refusal) buys nothing a surface cannot express."},"MailSendRequest":{"properties":{"mailbox_uid":{"type":"string","title":"Mailbox Uid"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"to":{"items":{"type":"string"},"type":"array","title":"To","default":[]},"cc":{"items":{"type":"string"},"type":"array","title":"Cc","default":[]},"bcc":{"items":{"type":"string"},"type":"array","title":"Bcc","default":[]},"subject":{"type":"string","title":"Subject","default":""},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"}},"type":"object","required":["mailbox_uid"],"title":"MailSendRequest","description":"The composer's contract for `POST /api/v1/mail/send` — replies and new messages alike."},"MailSendWindowRequest":{"properties":{"mailbox_uid":{"type":"string","title":"Mailbox Uid"},"content_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Class"}},"type":"object","required":["mailbox_uid"],"title":"MailSendWindowRequest","description":"What the surface asks before it says when a send will go out (P133 T1323).\n\n`content_class` is optional ON PURPOSE: a surface that does not know the class must not get a\ndifferent answer than the send path, which passes what the item carries."},"MailTriageRequest":{"properties":{"mailbox_uid":{"type":"string","title":"Mailbox Uid"},"folder":{"type":"string","title":"Folder","default":"inbox"},"limit":{"type":"integer","title":"Limit","default":5}},"type":"object","required":["mailbox_uid"],"title":"MailTriageRequest","description":"What the surface sends to have mail judged — the machine's half of D-145-001.\n\n`limit` is the caller's own bound on model calls and the route clamps it: one request must not\nbecome a mailbox-wide spend, and an unbounded pass would time out holding no record of the work."},"MailVerdictRequest":{"properties":{"mailbox_uid":{"type":"string","title":"Mailbox Uid"},"focus":{"type":"string","title":"Focus"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["mailbox_uid","focus"],"title":"MailVerdictRequest","description":"The correction's contract — the pair the read already names, and the bucket chosen.\n\n`reason` is optional and, when sent, is stored as the verdict's own \"why\": the surface's\n*Move to Focused* control sends only `focus`, and inventing a reason on its behalf would put\nwords in the person's mouth in the one record the learning loop reads."},"MailboxOwnerRequest":{"properties":{"entity_id":{"type":"string","maxLength":255,"minLength":1,"title":"Entity Id","description":"The workspace that will hold this mailbox"},"owned":{"type":"boolean","title":"Owned","description":"false releases the claim; the mailbox is shared again","default":true}},"type":"object","required":["entity_id"],"title":"MailboxOwnerRequest","description":"Who a mailbox belongs to (D-134-009 / D-134-010)."},"MeetingBookedRequest":{"properties":{"send_communication_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send Communication Id","description":"The outreach send this meeting came from. Omit to resolve it from the investor instead (entity_id + investor_entity_id are then required)."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"The company that sent the outreach"},"investor_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investor Entity Id","description":"The investor being met"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO timestamp of the booking"},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence","description":"What proves it — e.g. the calendar event id, so the receipt is auditable"}},"type":"object","title":"MeetingBookedRequest","description":"project092 T0221 — the receipt the booking surface writes when a meeting is created."},"MemoryConsolidateRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"}},"type":"object","required":["entity_id"],"title":"MemoryConsolidateRequest","description":"The cadence: reconcile facts, record contradictions, retire the unreachable."},"MemoryExposuresRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"facts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Facts","description":"[{kernel_key, kernel_version, fact_index}] or [{id}] per line shown."}},"type":"object","required":["entity_id"],"title":"MemoryExposuresRequest","description":"What the shell ACTUALLY injected after budgeting — not what it recalled."},"MemoryFeedbackRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"helpful":{"type":"boolean","title":"Helpful","description":"True = accurate, False = wrong or out of date."},"fact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Id","description":"memory_fact_state.id, when the caller has it."},"match_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Match Text","description":"A distinctive phrase of the remembered line — what a person can point at, since the injected block carries words and not ids. More than one match is refused (422) rather than guessed."},"kernel_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernel Key","description":"Otherwise name the fact by kernel_key."},"fact_index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Fact Index"},"by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"By","description":"Who made the call (user id) — a rating that cannot name its author is unattributable."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["entity_id","helpful"],"title":"MemoryFeedbackRequest","description":"A person's verdict on one remembered line (holographic's `fact_feedback`)."},"MergeApplyRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"resolutions":{"additionalProperties":{"type":"string"},"type":"object","title":"Resolutions"},"custom_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Values","description":"Field values for resolutions marked 'custom'"},"candidate_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Source","description":"Echoes MergePreviewRequest.candidate_source — logged with the decision (T0116)"},"merged_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merged Entity Id","description":"The losing entity's id — present only for a real duplicate-entity merge, not a field-only refresh"}},"type":"object","required":["entity_id","resolutions"],"title":"MergeApplyRequest"},"MergePreviewRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"candidate_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Candidate Data"},"candidate_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Candidate Source","description":"Where candidate_data came from, e.g. 'search_resolver' — logged with the eventual merge decision"}},"type":"object","required":["entity_id"],"title":"MergePreviewRequest"},"MergeSuggestRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"conflicts":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Conflicts"}},"type":"object","required":["entity_id","conflicts"],"title":"MergeSuggestRequest"},"MintKernelRequest":{"properties":{"botDimension":{"type":"integer","title":"Botdimension","description":"BD dimension number, e.g. 10, 120, 999"},"botDimensionSub":{"type":"integer","title":"Botdimensionsub","description":"BDsub value within the dimension, e.g. 13"},"minting_context":{"type":"string","title":"Minting Context","description":"Context for the minter: bot intent, entity context, sister schemas, etc."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope (None = global)"},"mode":{"type":"string","title":"Mode","description":"Minting tier — a MODE_PRESETS key (fast, medium or quality). Decides the model, thinking level and temperature of the authoring call.","default":"medium"},"construct_bot_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Construct Bot Key","description":"Correlation tag: the botKey being constructed. Stamped into the call log so this minting call is queryable as a 'related' call for that bot."},"per_bot":{"type":"boolean","title":"Per Bot","description":"Author a PER-BOT instance tailored to `minting_context`, derived from the base raisy_BD{dim}_{sub} template. Reuses an existing instance when it matches the intent (semantic) or is byte-identical (hash); otherwise mints a new instance under an auto-assigned key. When False, keeps the legacy shared category kernel keyed raisy_BD{dim}_{sub}.","default":false},"minting_kernel_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Minting Kernel Key","description":"Optional BD-specific minting kernel key (e.g. raisy_BD900_00155). When provided it overrides the generic R999 method. When omitted the engine tries to resolve raisy_BD900_{bd} and falls back to R999."}},"type":"object","required":["botDimension","botDimensionSub","minting_context"],"title":"MintKernelRequest","description":"Mint ONE kernel v1 for a specific (BD, BDsub) coordinate.\n\nMethodology (kernel concatenation): the BD-specific minting kernel\n(`raisy_BD900_{bd}`) or the generic R999 creator method ('HOW to author a\nkernel') is concatenated with the BD descriptor ('WHAT this BD is about') +\nthe minting context, then invoked to author the kernel for this exact\ncoordinate. The result is saved and its key returned."},"MostRelevantRequest":{"properties":{"candidateKernelKeys":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Candidatekernelkeys","description":"Candidates to choose between. Marked case: the field's candidate set. Unmarked case: the whole BOT_signature (D-005)."},"userFeedback":{"type":"string","minLength":1,"title":"Userfeedback"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"exchangeId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchangeid","description":"Correlation tag for the audit row."},"botId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botid","description":"Bot the feedback was about; audit tag only."}},"type":"object","required":["candidateKernelKeys","userFeedback"],"title":"MostRelevantRequest"},"NetworkCoverage":{"properties":{"connections_ingested":{"type":"integer","title":"Connections Ingested"},"connections_askable":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connections Askable"}},"type":"object","required":["connections_ingested"],"title":"NetworkCoverage","description":"How much of the founder's OWN network the search actually read.\n\n⚠️ THIS IS NOT DECORATION. An EMPTY network makes the bridge search answer `not_found` for a\nSTRUCTURAL reason, so a 0 warm-path rate over no connections is uninformative — never a pass\n(`T1001`).\n\n⚠️ `connections_askable` IS OPTIONAL, AND THAT IS MEASURED, NOT TIDY. Two of the engine's\nbranches answer before it has a candidate set to count — `empty_network` (no network at all) and\n`already_connected` (he holds the target already) — and both publish coverage as\n`{\"connections_ingested\": N}` **alone**. Declaring the key required turns those two ordinary\nstates into a `ResponseValidationError` and a **500 on a live route**, which is what the FE's own\n`connections_askable?: number` had already recorded. `exclude_unset` then omits the key on\nexactly those two branches and keeps it on the other four, so the wire shape is unchanged."},"NetworkIngestRequest":{"properties":{"owner_entity_id":{"type":"string","title":"Owner Entity Id"},"payload":{"type":"string","title":"Payload"},"source":{"type":"string","title":"Source","default":"csv"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["owner_entity_id","payload"],"title":"NetworkIngestRequest"},"NetworkIngestResult":{"properties":{"state":{"anyOf":[{"type":"string","enum":["accepted","dry_run"]},{"type":"null"}],"title":"State"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"messages_read":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Messages Read"},"authored_threads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Authored Threads"},"correspondents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Correspondents"},"imported":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Imported"},"skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skipped"},"rejected":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rejected"},"refusals":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Refusals"},"rows_parsed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Parsed"},"rows_with_an_employer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows With An Employer"},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created"},"skipped_duplicate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skipped Duplicate"},"rejected_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rejected Rows"},"employers":{"anyOf":[{"$ref":"#/components/schemas/IngestEmployers"},{"type":"null"}]},"coverage":{"anyOf":[{"$ref":"#/components/schemas/IngestCoverage"},{"type":"null"}]},"unknown_employers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Unknown Employers"}},"type":"object","title":"NetworkIngestResult","description":"The ingest reply. TWO SOURCES (`csv`, `mail_derived`) and a DIFFERENT SHAPE per source and branch.\n\n⚠️ EVERY FIELD IS OPTIONAL, AND THAT IS THE MEASUREMENT RATHER THAN A CONVENIENCE. The route and\nits service answer with **seven** shapes and **no key appears in all seven**:\n\n  `mail_derived` refusals (three of them) — `messages_read · correspondents · imported ·\n    refusals · reason`, and **no `state`**\n  `mail_derived` dry run — `… · state: \"dry_run\"`, and **no `authored_threads`**\n  `mail_derived` real import — `authored_threads · skipped · rejected · refusals · coverage`,\n    and **no `state`**\n  `csv` dry run — `state · rows_parsed · rows_with_an_employer · created · skipped`, and\n    **no `messages_read`**\n  `csv` accepted — `state · created · skipped_duplicate · rejected_rows · employers ·\n    coverage · refusals · unknown_employers`\n\nRequiring ANY of these would turn the branches that omit it into a `ResponseValidationError` on a\nlive route — which is exactly how the sibling bridges contract shipped a 500 (`L55` fact 4). The\nkeys are therefore declared, not required, and the route publishes with\n**`response_model_exclude_unset=True`** so each branch keeps publishing exactly the keys it emits\ntoday. `exclude_none` would be wrong in the other direction: it would turn the branches' ABSENT\nkeys into published nulls.\n\n`refusals` is typed as a list of FREE dicts on purpose — those entries are the importer's own\nrows, and a model would silently drop the keys it did not declare.\n\n⚠️ WHY ALL-OPTIONAL IS HONEST HERE AND NOT LAZY. A discriminated union needs a key present in\nevery branch to discriminate on, and the `mail_derived` shapes have none: adding one would be a\nwire change to answers that are already correct, on a premise nothing has measured. This instead\npublishes the contract the FE already codes against (`NetworkIngestResult` in\n`useWarmIntroPaths.ts`), which is what lets that hand-written copy be generated and deleted."},"NlSearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query","description":"Free-text investor request, e.g. 'angels in Vietnam'"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Audit identity; falls back to the token uid"}},"type":"object","required":["query"],"title":"NlSearchRequest","description":"PROJECT-107 / T0208 — free-text investor query."},"PacingReadRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Active entity (never trusted alone — MR24-gated)"}},"type":"object","required":["entity_id"],"title":"PacingReadRequest"},"PacingUpdateRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Active entity (never trusted alone — MR24-gated)"},"preset":{"anyOf":[{"type":"string","pattern":"^(steady|active|close)$"},{"type":"null"}],"title":"Preset","description":"Run-safe preset → wake cadence hours"},"wake_cadence_hours":{"anyOf":[{"type":"integer","maximum":168.0,"minimum":1.0},{"type":"null"}],"title":"Wake Cadence Hours","description":"Explicit wake cadence in hours (overrides preset) — 1..168"}},"type":"object","required":["entity_id"],"title":"PacingUpdateRequest"},"ParticipantIn":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Human-readable participant name (Party B / N for group calls)"},"entity_type":{"type":"string","title":"Entity Type","description":"Entity type: person | company | organisation","default":"person"},"entitykey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitykey","description":"Existing entitykey to resolve instead of create"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Existing entity_id barcode to resolve instead of create"}},"type":"object","required":["name"],"title":"ParticipantIn"},"PatchRunListRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Restrict to runs on this entity. Omitted = every run the caller may see. Access is checked against this value, so it is not a hint."},"limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Limit","default":50},"days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Days","description":"How far back to look. Bounded deliberately: an unbounded scan over bot_call_logs is the kind of query that is fine on a dev box and not on a real one.","default":30}},"type":"object","title":"PatchRunListRequest","description":"T0844 — the review queue's INBOX. Filters only; nothing here selects a run."},"PatchRunProposalsRequest":{"properties":{"patchRunId":{"type":"string","minLength":1,"title":"Patchrunid","description":"The run id returned by /compose-version."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity to resolve each target kernel against. Determines WHICH version a proposal is diffed against, so a wrong value produces a misleading diff rather than an error — send the same one the run used."},"limit":{"type":"integer","maximum":2000.0,"minimum":1.0,"title":"Limit","description":"How many recent call rows to scan for this run's tag. `input` is jsonb; the match happens in Python only on the pre-migration-123 path.","default":500}},"type":"object","required":["patchRunId"],"title":"PatchRunProposalsRequest","description":"T0807 — read back one background run."},"PermissionGrantRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Entity to grant access on"},"user_id":{"type":"string","title":"User Id","description":"Firebase UID of the user to grant permission to"},"permission_type":{"type":"string","title":"Permission Type","description":"owner | editor | viewer"}},"type":"object","required":["entity_id","user_id","permission_type"],"title":"PermissionGrantRequest"},"PermissionRevokeRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Entity to revoke access on"},"user_id":{"type":"string","title":"User Id","description":"Firebase UID of the user to revoke"}},"type":"object","required":["entity_id","user_id"],"title":"PermissionRevokeRequest"},"PitchDecisionRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity the item belongs to."},"item_id":{"type":"string","title":"Item Id","description":"The prepared item to decide on."},"decision":{"type":"string","title":"Decision","description":"`approve` or `reject` — the two moves the transition table allows from an awaiting state. A view is NOT a decision and is not accepted here."}},"type":"object","required":["entity_id","item_id","decision"],"title":"PitchDecisionRequest"},"PitchQueueRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity whose artefacts are being reviewed."}},"type":"object","required":["entity_id"],"title":"PitchQueueRequest"},"PortfolioRequest":{"properties":{"entity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Ids","description":"Only for service callers; user callers are owner-scoped"},"max_entities":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Max Entities","default":25}},"type":"object","title":"PortfolioRequest","description":"Entity set for a SERVICE caller (no owner). User callers are scoped to their own\naccessible entities (MR24) and may omit this — the server resolves the set, never\na client-trusted id list for user callers."},"PreSendCheckRequest":{"properties":{"sender":{"$ref":"#/components/schemas/SenderInfo"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case","description":"BD pipeline code selecting the compliance overlay.","default":"BD70.3"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"The assembled subject line, when known."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"The assembled message body, when known."}},"type":"object","required":["sender"],"title":"PreSendCheckRequest","description":"project092 T0214 — the pre-flight check's inputs: the same sender wording the send uses."},"PreparationGatesRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity preparation would run for. The gates are per-entity: G1 is the entity itself and G2 is what has been READ of it."}},"type":"object","required":["entity_id"],"title":"PreparationGatesRequest"},"PreparedItemsRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"mailbox_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailbox Uid"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","title":"PreparedItemsRequest","description":"The Drafts folder's own read (P133 T1302/T1340).\n\n`entity_id` is the workspace whose items are listed — the folder is entity-scoped like every other\nworkspace surface. `kind` narrows to ONE kind of prepared thing (the raise journey's board shows\nits own writer's drafts rather than the whole workspace's), and `limit` bounds the page."},"ProcessBulkArchiveRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Entity whose processes should be archived"}},"type":"object","required":["entity_id"],"title":"ProcessBulkArchiveRequest","description":"Bulk archive every non-archived process under an entity."},"ProcessConstructRequest":{"properties":{"process_intent":{"type":"string","title":"Process Intent","description":"What this process must produce / do"},"process_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Name","description":"Process name (defaults to process_intent)"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity ID scoping this process (barcode)"},"entitykey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitykey","description":"Entity key scoping this process (canonical timeless reference). Resolved to the latest entity_id."},"entity_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Context","description":"Entity scoping context"},"mode":{"type":"string","title":"Mode","description":"fast, medium or quality","default":"quality"},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProcessStep"},"type":"array"},{"type":"null"}],"title":"Steps","description":"Optional predefined steps"}},"type":"object","required":["process_intent"],"title":"ProcessConstructRequest","description":"Construct a process from a description."},"ProcessCreateRequest":{"properties":{"processName":{"type":"string","title":"Processname","description":"Human-readable process name"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity ID scoping this process (company, product, service, or platform)"},"steps":{"items":{"$ref":"#/components/schemas/ProcessStep"},"type":"array","title":"Steps","description":"Ordered list of steps"},"inputType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputtype","description":"Input type","default":"text"},"outputType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputtype","description":"Output type","default":"json"},"inputDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputdescription","description":"Input documentation"},"outputDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputdescription","description":"Output documentation"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"P-code classification"},"entityDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimension","description":"ED (Entity Dimension) number — which entity type this process serves"},"entityDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimensionsub","description":"Subcategory value within ED, e.g. 1, 2, 3"},"approvalMode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approvalmode","description":"MANUAL|SEMI_AUTO|FULL_AUTO|CONFIDENCE_BASED","default":"SEMI_AUTO"}},"type":"object","required":["processName","steps"],"title":"ProcessCreateRequest","description":"T0201: Create process request"},"ProcessDeriveSignatureRequest":{"properties":{"process_intent":{"type":"string","title":"Process Intent","description":"What this process must produce / do"},"entity_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Context","description":"Entity scoping context"}},"type":"object","required":["process_intent"],"title":"ProcessDeriveSignatureRequest","description":"Derive a PD signature from a process description."},"ProcessExecuteRequest":{"properties":{"inputPrompt":{"type":"string","title":"Inputprompt","description":"Input data for process"},"triggeredBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggeredby","description":"api|cron|webhook","default":"api"}},"type":"object","required":["inputPrompt"],"title":"ProcessExecuteRequest","description":"T0202: Execute process request"},"ProcessListResponse":{"properties":{"processes":{"items":{"$ref":"#/components/schemas/ProcessResponse"},"type":"array","title":"Processes"},"total":{"type":"integer","title":"Total"},"status":{"type":"boolean","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["processes","total","status","message"],"title":"ProcessListResponse","description":"List processes response"},"ProcessPerformanceBlock":{"properties":{"totalRuns":{"type":"integer","title":"Totalruns","default":0},"successfulRuns":{"type":"integer","title":"Successfulruns","default":0},"approvals":{"type":"integer","title":"Approvals","default":0},"rejections":{"type":"integer","title":"Rejections","default":0},"pendingReviews":{"type":"integer","title":"Pendingreviews","default":0},"confidenceScore":{"type":"number","title":"Confidencescore","default":0.0},"approvalRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approvalrate"},"avgLatencyMs":{"type":"number","title":"Avglatencyms","default":0.0}},"type":"object","title":"ProcessPerformanceBlock","description":"Inline performance metrics joined from process_performance"},"ProcessResponse":{"properties":{"processId":{"type":"string","title":"Processid"},"processKey":{"type":"string","title":"Processkey"},"processNumber":{"type":"integer","title":"Processnumber"},"versionNumber":{"type":"integer","title":"Versionnumber"},"processName":{"type":"string","title":"Processname"},"status":{"type":"string","title":"Status"},"approvalMode":{"type":"string","title":"Approvalmode"},"approvalThreshold":{"type":"integer","title":"Approvalthreshold","default":90},"performance":{"$ref":"#/components/schemas/ProcessPerformanceBlock"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification"},"entityDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimension","description":"ED (Entity Dimension) number"},"entityDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Entitydimensionsub","description":"Subcategory value within ED, e.g. 1, 2, 3"},"botKeys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Botkeys","description":"PROJECT-053: assembled bot keys for this process"},"inputDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputdescription"},"outputDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputdescription"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["processId","processKey","processNumber","versionNumber","processName","status","approvalMode","performance","createdAt","updatedAt"],"title":"ProcessResponse","description":"Standard process response"},"ProcessReviewDecideRequest":{"properties":{"verdict":{"type":"string","title":"Verdict","description":"One of the four stored outcomes: 'approved' · 'edited' · 'rejected' · 'pending'. T0192 opened the fourth door — the schema always promised `edited` and the interface offered two of them, so an owner who changed a prepared item could not say so."},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"Manager feedback/notes"}},"type":"object","required":["verdict"],"title":"ProcessReviewDecideRequest","description":"T0204: Decide on pending review"},"ProcessReviewSendPlanRequest":{"properties":{"send_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send At","description":"ISO 8601 timestamp for when the approved item should go out, or null to clear the plan. A past moment is refused: the engine rejects a stale one-shot at create time, so accepting one here would leave you believing a send was planned."}},"type":"object","title":"ProcessReviewSendPlanRequest","description":"T0202 — the owner's plan for WHEN an approved item goes out.\n\n`send_at` is an ISO 8601 timestamp, or `null` to CLEAR the plan (which returns the item to\n*goes out when approved* — the default, and not a refusal). A moment in the past is refused\nloudly, mirroring the engine's own create-time rule for a one-shot."},"ProcessStep":{"properties":{"stepOrder":{"type":"integer","title":"Steporder","description":"Step sequence (1, 2, 3, ...)"},"type":{"type":"string","title":"Type","description":"'bot' or 'sub_process'"},"botKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Botkey","description":"For type='bot'"},"subProcessKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subprocesskey","description":"For type='sub_process'"},"scope":{"type":"string","title":"Scope","description":"'internal' or 'external'"},"label":{"type":"string","title":"Label","description":"Human-readable step name"},"inputKey":{"type":"string","title":"Inputkey","description":"Input field key"},"outputKey":{"type":"string","title":"Outputkey","description":"Output field key"}},"type":"object","required":["stepOrder","type","scope","label","inputKey","outputKey"],"title":"ProcessStep","description":"Single process step definition"},"ProcessUpdateRequest":{"properties":{"processName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processname","description":"New name"},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProcessStep"},"type":"array"},{"type":"null"}],"title":"Steps","description":"Updated steps"},"approvalMode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approvalmode","description":"Updated approval mode: MANUAL|SEMI_AUTO|FULL_AUTO|CONFIDENCE_BASED"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"Updated classification"}},"type":"object","title":"ProcessUpdateRequest","description":"T0201: Update process request"},"ProposalVerdictRequest":{"properties":{"patchCallId":{"type":"string","minLength":1,"title":"Patchcallid","description":"callId of the raisy_73 call that IS the proposal (from /proposals)."},"verdict":{"type":"string","title":"Verdict","description":"'approved' or 'rejected'."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Optional one line. Most useful on a rejection — it is the only place the WHY survives, and 73 can otherwise re-propose the same edit."},"patchRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patchrunid"},"kernelKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelkey"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},"type":"object","required":["patchCallId","verdict"],"title":"ProposalVerdictRequest","description":"T0842 — a human's decision about ONE `73` proposal."},"PublicReviewRequest":{"properties":{"token":{"type":"string","title":"Token","description":"The share link's token, exactly as it was issued."}},"type":"object","required":["token"],"title":"PublicReviewRequest"},"RecipientAddRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id","description":"the OWING entity (the board's owner)"},"recipient_entity_id":{"type":"string","minLength":1,"title":"Recipient Entity Id","description":"the investor/recipient"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"added_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added By","description":"who put the row on the board — the caller's uid is used when omitted"}},"type":"object","required":["entity_id","recipient_entity_id"],"title":"RecipientAddRequest"},"RecipientMarkRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"recipient_entity_id":{"type":"string","minLength":1,"title":"Recipient Entity Id"},"status":{"type":"string","title":"Status","description":"drafted | sent — a state we can prove"}},"type":"object","required":["entity_id","recipient_entity_id","status"],"title":"RecipientMarkRequest"},"RecipientStatusRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"status":{"type":"string","title":"Status","description":"selected | drafted | sent — a state we can prove"}},"type":"object","required":["entity_id","status"],"title":"RecipientStatusRequest"},"RecipientToggleRequest":{"properties":{"entity_id":{"type":"string","minLength":1,"title":"Entity Id"},"recipient_entity_id":{"type":"string","minLength":1,"title":"Recipient Entity Id"},"on":{"type":"boolean","title":"On","description":"true = on the board, false = take the pending row off"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"added_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added By"}},"type":"object","required":["entity_id","recipient_entity_id","on"],"title":"RecipientToggleRequest"},"RecurringTaskDeclareRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"declared_name":{"type":"string","title":"Declared Name","description":"The work, in the owner's own words."},"declaration_source":{"type":"string","title":"Declaration Source","description":"Who declares it — a pillar (P1_integration…P4_contract) or an angle."},"trigger_kind":{"type":"string","title":"Trigger Kind","description":"staleness | event | kpi_deviation (MR4b)."},"cadence_hours":{"type":"integer","title":"Cadence Hours","description":"How often, 1–168 hours — the harness pacing range."},"process_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Key","description":"The process it recurs; omitted = declared but not instantiated yet."},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"fundraising · sales · procurement · …"},"objective_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective Key","description":"The objective it serves (BD21)."},"record_kernel_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Kernel Key","description":"T0190 — the knowledge record (a kernelKey) this task exists to keep fresh. Optional: without it the task runs on its own clock alone (the second clock is paid for only where it is declared)."},"record_window_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Record Window Hours","description":"How long that record may go unrefreshed before the task is due (0 < hours <= 8760). Both fields are required together — a window with no record means nothing."},"trigger_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Config","description":"The condition's own parameters."},"decided_by":{"type":"string","title":"Decided By","description":"owner | owner_accepted_proposal — never a bare default (MASTER §2.23).","default":"owner"}},"type":"object","required":["entity_id","declared_name","declaration_source","trigger_kind","cadence_hours"],"title":"RecurringTaskDeclareRequest","description":"project146 T0206 — the birth of a declaration: the owner authors a piece of recurring work,\nor accepts a proposal from the Chief of Staff.\n\n`process_key` is optional on purpose — *every pillar declares, every entity instantiates* — so\nwork the company has committed to but not yet built can be declared honestly instead of being\nhidden until it is ready (`MR4b`: `trigger_kind` is a CONDITION, never a date)."},"RecurringTaskUpdateRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity that owns the row (MR24)."},"row_id":{"type":"string","title":"Row Id","description":"The process_schedule row id."},"cadence_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cadence Hours","description":"How often it runs, in hours — the same 1–168 range as the harness pacing."},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Switch the whole row on or off without deleting the declaration."}},"type":"object","required":["entity_id","row_id"],"title":"RecurringTaskUpdateRequest","description":"project146 T0208 — the owner's edit of ONE declared recurring task.\n\nBoth editable fields are optional so that a change must be explicit: sending neither is a\n`no_change` refusal, not a write. The service records WHO decided it (`MASTER` §2.23)."},"RecurringTaskUpkeepRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"cadence_hours":{"type":"integer","title":"Cadence Hours","description":"1–168 hours. 168 is the widest the store allows and an angle examines the whole company; a monthly upkeep rhythm is NOT expressible today (recorded constraint).","default":168},"sector_angles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sector Angles","description":"The owner's own angles — a clinic's `clinical`, a factory's `safety`. Declared the same way as the base eight and equal in the register, because the set is open by design: a ninth angle is a proposal, not a rebuild."}},"type":"object","required":["entity_id"],"title":"RecurringTaskUpkeepRequest","description":"project146 T0210 — declare the register's OWN upkeep: the eight angle checks and the row\nthat re-tests the angle set (`@P157` `D-157-005`/`D-157-007`; `D-157-006` defines\n*self-sustaining* as exactly this)."},"ReferenceVariableRef":{"properties":{"kernelKey":{"type":"string","title":"Kernelkey","description":"Kernel LINEAGE the token lives in."},"name":{"type":"string","title":"Name","description":"The reference token."}},"type":"object","required":["kernelKey","name"],"title":"ReferenceVariableRef"},"RegisterReferenceVariablesRequest":{"properties":{"botKey":{"type":"string","title":"Botkey","description":"Bot LINEAGE (never botId)."},"references":{"items":{"$ref":"#/components/schemas/ReferenceVariableRef"},"type":"array","title":"References","description":"Every (kernelKey, name) the bot references but BD0 does not declare."}},"type":"object","required":["botKey","references"],"title":"RegisterReferenceVariablesRequest","description":"PROJECT-099B TJ13 — bulk-register a bot's reference variables."},"RelationshipAddRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity that holds the role (e.g. Simon)"},"related_entity_id":{"type":"string","title":"Related Entity Id","description":"The organisation it relates TO (e.g. Playano)"},"relationship_type":{"type":"string","title":"Relationship Type","description":"governance_role | ownership | supplier | client | partner | parent_child | employee"},"role_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Title","description":"e.g. CMO, Board Member, Investor"},"role_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Key","description":"Wizard role key (e.g. founder_ceo, employee_sales) → stored as relationship classification"},"ownership_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ownership Pct","description":"0–100, for ownership type only"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_bidirectional":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Bidirectional","description":"True = mutual (auto-set for partner); False = one-directional"},"entity_relationship_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Relationship Description","description":"Per-relationship context, e.g. extraction evidence"},"app":{"type":"string","title":"App","default":"raisy"}},"type":"object","required":["entity_id","related_entity_id","relationship_type"],"title":"RelationshipAddRequest"},"RelationshipListRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"List all relationships where this entity is the subject"},"relationship_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Type","description":"Filter by type"},"include_hierarchy":{"type":"boolean","title":"Include Hierarchy","description":"Include parent_child hierarchy relationships","default":false}},"type":"object","required":["entity_id"],"title":"RelationshipListRequest"},"RelationshipRemoveRequest":{"properties":{"entity_relationship_id":{"type":"string","title":"Entity Relationship Id"}},"type":"object","required":["entity_relationship_id"],"title":"RelationshipRemoveRequest"},"RelationshipUpdateRequest":{"properties":{"entity_relationship_id":{"type":"string","title":"Entity Relationship Id"},"relationship_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Type","description":"governance_role | employee | ownership | partner | …"},"role_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Title","description":"e.g. CMO, Board Member, Investor"},"ownership_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ownership Pct"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"entity_relationship_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Relationship Description","description":"Per-relationship context visible in node popup"}},"type":"object","required":["entity_relationship_id"],"title":"RelationshipUpdateRequest"},"RemoveReferencesFromBd0Request":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot whose BD0 kernel is edited."},"names":{"items":{"type":"string"},"type":"array","title":"Names","description":"Property names to remove."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for version resolution."}},"type":"object","required":["botId","names"],"title":"RemoveReferencesFromBd0Request","description":"PROJECT-099B TJ02 — the undo for \"add to BD0\"."},"RenamePropertyRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot whose BD0 kernel is edited."},"oldName":{"type":"string","title":"Oldname","description":"Current property name."},"newName":{"type":"string","title":"Newname","description":"New name; normalised to UPPER_SNAKE (IN-B12)."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for version resolution."},"rewriteKernels":{"type":"boolean","title":"Rewritekernels","description":"TJ14 — also rewrite [OLD] to [NEW] in every kernel that uses it. Opt-in: each rewritten kernel mints a new version.","default":false}},"type":"object","required":["botId","oldName","newName"],"title":"RenamePropertyRequest","description":"PROJECT-099B TJ09 — rename a BD0 property."},"ResolveDevRequestRequest":{"properties":{"status":{"type":"string","title":"Status"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"},"approved_slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Approved Slugs"}},"type":"object","required":["status"],"title":"ResolveDevRequestRequest"},"ResolveParticipantRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Human-readable participant name"},"entity_type":{"type":"string","title":"Entity Type","description":"Entity type: person | company | organisation","default":"person"},"entitykey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitykey","description":"Existing entitykey to resolve"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Existing entity_id barcode to resolve"}},"type":"object","required":["name"],"title":"ResolveParticipantRequest"},"RevertPatchRequest":{"properties":{"kernelKey":{"type":"string","minLength":1,"title":"Kernelkey","description":"Kernel auto-learn changed."},"patchRunId":{"type":"string","minLength":1,"title":"Patchrunid","description":"Run whose auto-applied version should be undone. The version carries this id as a `[run=...]` stamp, which is how it is found."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for kernel resolution."}},"type":"object","required":["kernelKey","patchRunId"],"title":"RevertPatchRequest","description":"D-029 — undo what auto-learn wrote for one run, on one kernel."},"ReviewBotRequest":{"properties":{"action":{"type":"string","title":"Action","description":"approve | edit | reject"},"edited":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Edited","description":"{botName, kernel_keys_ref} when action=edit"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"User feedback / reason"}},"type":"object","required":["action"],"title":"ReviewBotRequest"},"ReviewDeliverableRequest":{"properties":{"action":{"type":"string","title":"Action","description":"approve | edit | reject"},"edited":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Edited","description":"{name, description} when action=edit"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"User feedback / reason"}},"type":"object","required":["action"],"title":"ReviewDeliverableRequest"},"ReviewLinkListRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"Whose links to read."}},"type":"object","required":["entity_id"],"title":"ReviewLinkListRequest"},"ReviewLinkRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity the artefact belongs to."},"item_id":{"type":"string","title":"Item Id","description":"The ONE artefact this link opens — a prepared item id, never the entity."}},"type":"object","required":["entity_id","item_id"],"title":"ReviewLinkRequest"},"ReviewLinkRevokeRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The entity the link belongs to."},"link_id":{"type":"string","title":"Link Id","description":"The link to close."}},"type":"object","required":["entity_id","link_id"],"title":"ReviewLinkRevokeRequest"},"ReviewProcessRequest":{"properties":{"action":{"type":"string","title":"Action","description":"approve | edit | reject"},"edited":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Edited","description":"{processName, steps} when action=edit"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"User feedback / reason"}},"type":"object","required":["action"],"title":"ReviewProcessRequest"},"RevokeApprovalRequest":{"properties":{"slug":{"type":"string","title":"Slug"},"source_node":{"type":"string","title":"Source Node"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["slug","source_node"],"title":"RevokeApprovalRequest"},"RoomListRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The company whose rooms to list."}},"type":"object","required":["entity_id"],"title":"RoomListRequest"},"RoomOpenRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Optional. Resolved against the caller's own access by the shell; never trusted."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"room_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room Id","description":"The room to open, by its own id (P136 D-136-043). PREFERRED: a room is a record now, so the caller names which room instead of describing it. `title` stays supported for back-compat and is resolved to a room server-side."}},"type":"object","title":"RoomOpenRequest","description":"Body of POST /room/open. Everything is optional — the one thing a room\ncannot be opened without is the caller's credential, and that arrives in the\nAuthorization header, never here."},"RoomStateRequest":{"properties":{"state":{"type":"string","title":"State","description":"One of: active | waiting | blocked"}},"type":"object","required":["state"],"title":"RoomStateRequest"},"RubricItem":{"properties":{"id":{"type":"string","title":"Id","description":"Rubric dimension ID"},"description":{"type":"string","title":"Description","description":"What the judge should look for"},"weight":{"type":"integer","minimum":1.0,"title":"Weight","description":"Weight for aggregate score","default":1}},"type":"object","required":["id","description"],"title":"RubricItem"},"RunStageTrace":{"properties":{"status":{"type":"string","enum":["ok","error"],"title":"Status"},"script_path":{"type":"string","title":"Script Path"},"input_raw":{"type":"string","title":"Input Raw"},"input_parsed":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Parsed"},"output_raw":{"type":"string","title":"Output Raw"},"output_parsed":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Parsed"},"duration_ms":{"type":"integer","title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","script_path","input_raw","output_raw","duration_ms"],"title":"RunStageTrace"},"SaveConversationRequest":{"properties":{"owner_entitykey":{"type":"string","title":"Owner Entitykey","description":"entitykey of the entity running the call (Party A)"},"participants":{"items":{"$ref":"#/components/schemas/ParticipantIn"},"type":"array","minItems":1,"title":"Participants","description":"Party B (+N for group calls)"},"turns":{"items":{"$ref":"#/components/schemas/TurnIn"},"type":"array","title":"Turns","description":"Transcript turns"},"relationship_type":{"type":"string","title":"Relationship Type","description":"Edge type owner → participant","default":"client"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta","description":"Call metadata: medium, caller_mode, language, bot_key, timestamps"}},"type":"object","required":["owner_entitykey","participants"],"title":"SaveConversationRequest"},"SaveTemplateRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The company that will own the template"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"What the founder calls it"},"subject":{"type":"string","title":"Subject","description":"The subject line"},"body":{"type":"string","title":"Body","description":"The body, using [placeholder] tokens"}},"type":"object","required":["entity_id","name","subject","body"],"title":"SaveTemplateRequest","description":"project092 T0204 — save a founder's own email wording as a reusable template."},"ScheduleSendRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The raising entity this schedule belongs to"},"send_at_local":{"type":"string","title":"Send At Local","description":"The wall clock she typed, no offset — e.g. \"2026-11-03T09:00:00\". A naive local time is the point: an offset would silently overrule the zone she named."},"send_at_zone":{"type":"string","title":"Send At Zone","description":"IANA zone she meant it in — e.g. Europe/Berlin"},"browser_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Zone","description":"The VIEWER's own zone, so the screen can show it beside the others. Never assumed server-side: the browser is the only thing that knows it."},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"},"investor_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investor Entity Id"},"recipient_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Country","description":"Used only to ESTIMATE the recipient's clock, and the layer says so."},"recipient_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Zone","description":"A recipient zone we actually hold. Outranks the country estimate."},"draft_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Call Id","description":"The drafting call this body came from, so the source view stays reachable."}},"type":"object","required":["entity_id","send_at_local","send_at_zone"],"title":"ScheduleSendRequest","description":"project092 T0212 — a FUTURE MOMENT on an outreach send, and the clock it was meant in.\n\nThree things travel together and none is derivable from the others: WHEN she meant\n(`send_at_local`, the wall clock she typed), IN WHICH ZONE she meant it (`send_at_zone`, an IANA\nname), and the clocks the screen should draw beside hers (`browser_zone` — hers; the entity and\nrecipient layers are resolved server-side and never trusted from the client)."},"SearchBotsRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query","description":"Search text matched across name, key, and classification"},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1},"pageSize":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Pagesize","default":20},"sortBy":{"type":"string","title":"Sortby","default":"botNumber"},"sortOrder":{"type":"string","title":"Sortorder","default":"asc"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Filter by mode: fast or quality"}},"type":"object","required":["query"],"title":"SearchBotsRequest"},"SearchKernelsRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query","description":"Search text matched across name, key, description, and tags"},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1},"pageSize":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Pagesize","default":20},"sortBy":{"type":"string","title":"Sortby","default":"kernelNumber"},"sortOrder":{"type":"string","title":"Sortorder","default":"asc"},"botDimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimension"},"botDimensionSub":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Botdimensionsub"},"kernelFormat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kernelformat"},"entitledOnly":{"type":"boolean","title":"Entitledonly","default":false},"asRegularUser":{"type":"boolean","title":"Asregularuser","default":false},"status":{"type":"string","title":"Status","default":"active"},"source":{"type":"string","title":"Source","default":""}},"type":"object","required":["query"],"title":"SearchKernelsRequest"},"SelectProposalsRequest":{"properties":{"deliverable_ids":{"items":{"type":"string"},"type":"array","title":"Deliverable Ids","description":"Which proposed deliverables to build"}},"type":"object","required":["deliverable_ids"],"title":"SelectProposalsRequest"},"SelfHealRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot to run and, if it fails, self-heal"},"user_input":{"type":"string","title":"User Input","description":"Input prompt for the bot"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for kernel resolution"},"optional_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Optional Args","description":"Template variables to inject"},"max_iterations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Iterations","description":"Caller-requested cap (clamped to SELF_HEAL_HARD_CAP_ITERATIONS)"},"auto_apply":{"type":"boolean","title":"Auto Apply","description":"If false, stop at the first proposed patch for manual review","default":false},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"LLM model for raisy_61/raisy_73","default":"gemini-3.1-pro"},"thinking_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking Level","description":"Thinking level","default":"HIGH"}},"type":"object","required":["botId","user_input"],"title":"SelfHealRequest","description":"Automate diagnose -> patch -> apply -> re-run until the bot succeeds or a cap is hit."},"SenderInfo":{"properties":{"company":{"type":"string","title":"Company","description":"Sender company name"},"pitch":{"type":"string","title":"Pitch","description":"One-line pitch"},"raising":{"type":"string","title":"Raising","description":"Round and amount"},"name":{"type":"string","title":"Name","description":"Sender full name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Sender title"},"email":{"type":"string","title":"Email","description":"Sender email address"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address","description":"From address; defaults to platform shared pool"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To","description":"Reply-To address; defaults to platform shared pool"},"unsubscribe_link":{"type":"string","title":"Unsubscribe Link","description":"Working unsubscribe URL"},"physical_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical Address","description":"Sender physical postal address. Optional — when omitted, the entity's stored address is used (P093 D-081: the entity is the sender)."},"recipient_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Country","description":"Default recipient jurisdiction, e.g. US, GB, EU"},"consent_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent Basis","description":"Recorded consent/implied-consent basis (CASL) if any"},"legitimate_interest_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legitimate Interest Assessment","description":"Brief documented fit justification (GDPR LIA)"},"content_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Class","description":"teaser | offer | marketing | transactional (default: teaser)"},"extra_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Fields","description":"Overlay-required fields, e.g. fpo_exemption, securities_exemption"}},"type":"object","required":["company","pitch","raising","name","email","unsubscribe_link"],"title":"SenderInfo"},"SenderWording":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"pitch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pitch"},"raising":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raising"}},"type":"object","title":"SenderWording","description":"The founder's OWN reviewed wording (`D-064-020`). Every field optional.\n\n⚠️ WHY THIS IS NOT A HOLE IN THE \"IDS ONLY\" RULE. That rule exists so a caller cannot assert a\n**path** fact: `via` and `predicate_class` are re-derived from the engine on every call, because a\ncaller claiming `structural` for a private path would make the draft NAME A FIRM as a public fact\nabout two real people (`D-064-007`). This model carries **no path fact at all** — only what the\nfounder says about himself, which he is the authority on. The engine's answer still decides the\npath, and the disclosure sentence is still built here."},"SessionOpenRequest":{"properties":{"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Requested entity. For user callers it must be one they can access; omit it and the server picks the caller's own entity."}},"type":"object","title":"SessionOpenRequest","description":"D-052 — the entity a chat session drives is resolved from the CALLER's token.\n\nA user caller may name an entity, but only one it can READ; the server is the\nauthority (MR24). Service callers (internal, like the shell on its own behalf) name\nit directly and bypass the gate."},"SetAdminRequest":{"properties":{"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"admin":{"type":"boolean","title":"Admin","default":true}},"type":"object","title":"SetAdminRequest","description":"Target one user by uid or email. `admin=False` revokes instead of grants."},"SetPropertyMetaRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot whose BD0 kernel is edited."},"name":{"type":"string","title":"Name","description":"Property to edit."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"New description; omit to leave unchanged, '' to clear."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"New JSON Schema type; omit to leave unchanged."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for version resolution."}},"type":"object","required":["botId","name"],"title":"SetPropertyMetaRequest","description":"PROJECT-099B TJ16 — edit an existing BD0 property's description and/or type."},"SetRequiredRequest":{"properties":{"botId":{"type":"string","title":"Botid","description":"Bot whose BD0 kernel is edited."},"name":{"type":"string","title":"Name","description":"The BD0 property name."},"required":{"type":"boolean","title":"Required","description":"True to require it, False to make it optional."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Entity scope for version resolution."}},"type":"object","required":["botId","name","required"],"title":"SetRequiredRequest","description":"PROJECT-099B TJ03 — mark a BD0 property required, or optional."},"SetStageRequest":{"properties":{"owner_entity_id":{"type":"string","title":"Owner Entity Id","description":"Entity running the call (owning side)"},"related_entity_id":{"type":"string","title":"Related Entity Id","description":"Investor/contact entity id"},"relationship_type":{"type":"string","title":"Relationship Type","description":"Relationship edge type (default investor)","default":"investor"},"stage":{"type":"string","title":"Stage","description":"BD70.x stage to set, e.g. BD70.4"}},"type":"object","required":["owner_entity_id","related_entity_id","stage"],"title":"SetStageRequest"},"SetupRunBenchmarkRequest":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"The setup run's run_id (P160) to write as benchmark records"},"write":{"type":"boolean","title":"Write","description":"Append the records to the harness's log; false = return them only","default":true}},"type":"object","required":["run_id"],"title":"SetupRunBenchmarkRequest"},"SetupRunBenchmarkResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"run_id":{"type":"string","title":"Run Id"},"entitykey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitykey"},"rung_count":{"type":"integer","title":"Rung Count"},"written":{"type":"boolean","title":"Written"},"log_path":{"type":"string","title":"Log Path"},"records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Records"}},"type":"object","required":["status","run_id","rung_count","written","log_path","records"],"title":"SetupRunBenchmarkResponse"},"SetupStageTrace":{"properties":{"status":{"type":"string","enum":["skipped","restored","generated","error"],"title":"Status"},"entrypoint_path":{"type":"string","title":"Entrypoint Path"},"entry_code":{"type":"string","title":"Entry Code"},"dependencies":{"items":{"type":"string"},"type":"array","title":"Dependencies"},"env_vars":{"items":{"type":"string"},"type":"array","title":"Env Vars"},"llm_called":{"type":"boolean","title":"Llm Called"},"duration_ms":{"type":"integer","title":"Duration Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","entrypoint_path","entry_code","dependencies","env_vars","llm_called","duration_ms"],"title":"SetupStageTrace"},"SkillCallbackPayload":{"properties":{"event":{"type":"string","title":"Event"},"provider_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Job Id"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"percent_complete":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percent Complete"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"actual_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Credits"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Retryable"}},"type":"object","required":["event"],"title":"SkillCallbackPayload"},"SkillRunHistoryRequest":{"properties":{"skill_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Key"},"skill_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Id"},"page":{"type":"integer","title":"Page","default":1},"pageSize":{"type":"integer","title":"Pagesize","default":20}},"type":"object","title":"SkillRunHistoryRequest","description":"Filters for the run-history read. Both are optional and answer different questions."},"SkillRunRequest":{"properties":{"skill_name":{"type":"string","title":"Skill Name"},"query":{"type":"string","title":"Query"},"force_setup":{"type":"boolean","title":"Force Setup","default":false},"script_name":{"type":"string","title":"Script Name","default":"main.py"},"timeout":{"type":"integer","title":"Timeout","default":30},"env":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Env"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},"type":"object","required":["skill_name","query"],"title":"SkillRunRequest"},"SkillRunTrace":{"properties":{"skill_name":{"type":"string","title":"Skill Name"},"setup":{"$ref":"#/components/schemas/SetupStageTrace"},"build":{"$ref":"#/components/schemas/BuildStageTrace"},"run":{"$ref":"#/components/schemas/RunStageTrace"},"overall_status":{"type":"string","enum":["ok","error"],"title":"Overall Status"},"total_duration_ms":{"type":"integer","title":"Total Duration Ms"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["skill_name","setup","build","run","overall_status","total_duration_ms","timestamp"],"title":"SkillRunTrace"},"SkillSelection":{"properties":{"botDimensionSub":{"type":"integer","title":"Botdimensionsub","description":"The BD155.<sub> slot this selection fills — the sub the classifier assigned, not necessarily the chosen kernel's own."},"kernelKey":{"type":"string","title":"Kernelkey","description":"Exact BD155 kernel to bind into that slot."}},"type":"object","required":["botDimensionSub","kernelKey"],"title":"SkillSelection","description":"One BD155 slot whose skill the CALLER chose, overriding acquisition's own search.\n\nSent when the user picked from the `alternatives` that /bot/derive-signature offered.\nAcquisition scores skills against the intent, which is a guess; a click is not. The\nchosen kernel is bound verbatim and the search for that slot is skipped entirely."},"SlotFill":{"properties":{"value":{"type":"string","minLength":1,"title":"Value","description":"The text to put in the slot — the words a reader will see."},"spanStart":{"type":"integer","minimum":0.0,"title":"Spanstart","description":"Offset of the `[` inside the field."},"spanEnd":{"type":"integer","minimum":1.0,"title":"Spanend","description":"Offset just past the `]`."},"slot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slot","description":"The placeholder as it was rendered, e.g. '[START_DATE]'. When given it is VERIFIED against the artifact, not trusted: if the draft has changed underneath, the fill is refused rather than landed in the wrong slot."},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"Output field the slot sits in. Omitted = located from the offsets."}},"type":"object","required":["value","spanStart","spanEnd"],"title":"SlotFill","description":"T1354 — one unfilled `[SLOT]` a person typed a value into.\n\nNot a mark and not a complaint: the value is a fact the user holds, so it arrives as\nTEXT rather than pointing at a rewrite row. The model is not asked, because it cannot\nknow the answer — which is how `[START_DATE]` reached a delivered email in the first\nplace."},"SpanRewriteRequest":{"properties":{"priorTurns":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Priorturns","description":"T1368 / IN-08 - the conversation BEFORE this draft, oldest first, each turn {direction, sender, date, text}. The CALLER supplies it because it already holds the thread, so this path gains no query. Turns declaring another entity are dropped by the formatter, counted, not silently kept."},"spanText":{"type":"string","minLength":1,"title":"Spantext","description":"Exact text the user marked."},"userFeedback":{"type":"string","minLength":1,"title":"Userfeedback","description":"What is wrong with it."},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"Output field the span sits in. Omitted = located automatically; required when the same text appears in more than one field."},"spanStart":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Spanstart","description":"Caller's own offset for the span inside the field. When given it is VERIFIED, not searched for — which is the only way to mark the second of two identical sentences correctly."},"dimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dimension","description":"T0803 — the BD tier of the matter at fault, e.g. 120 for Tone. Narrows the candidate set recorded on the exchange to the kernels defining that matter, BD0 and BD10 included. Omitted = every content kernel in the assembly stays a candidate."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},"type":"object","required":["spanText","userFeedback"],"title":"SpanRewriteRequest"},"SubmitIdeaRequest":{"properties":{"description":{"type":"string","title":"Description","description":"Idea description"},"seed_artifact":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Seed Artifact","description":"Optional asset seed"},"mode_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode Hint","description":"deliverable | asset | ambiguous"}},"type":"object","required":["description"],"title":"SubmitIdeaRequest"},"SubmitIdeaResponse":{"properties":{"process_id":{"type":"string","title":"Process Id"},"idea_type":{"type":"string","title":"Idea Type"},"confidence":{"type":"number","title":"Confidence"},"status":{"type":"string","title":"Status"}},"type":"object","required":["process_id","idea_type","confidence","status"],"title":"SubmitIdeaResponse"},"TemplateSelectionRequest":{"properties":{"entity_id":{"type":"string","title":"Entity Id","description":"The company whose selection this is"},"selected":{"items":{"type":"string"},"type":"array","title":"Selected","description":"The BD196 kernel keys this company may send with. An empty list is a real answer (the company offers none); omit the call instead to leave the default in place."}},"type":"object","required":["entity_id","selected"],"title":"TemplateSelectionRequest","description":"P135 T1434 / IN-28 — the company's choice of which of its templates to offer."},"TestSendRequest":{"properties":{"sender":{"$ref":"#/components/schemas/SenderInfo"},"subject":{"type":"string","title":"Subject","description":"The assembled subject she is looking at"},"body":{"type":"string","title":"Body","description":"The assembled body she is looking at"},"attachment_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Attachment Ids","description":"Optional: the same files, so the test matches the real send"}},"type":"object","required":["sender","subject","body"],"title":"TestSendRequest","description":"project092 T0213 — send the founder her own email before the real batch."},"TonePresetSaveRequest":{"properties":{"entity_id":{"type":"string","maxLength":255,"minLength":1,"title":"Entity Id"},"slugs":{"items":{"type":"string"},"type":"array","title":"Slugs","description":"The ticked preset SLUGS (not keys): a slug names the tone, while a key also names who owns a copy, and the client has no business knowing that."}},"type":"object","required":["entity_id"],"title":"TonePresetSaveRequest","description":"`@P291 T1421` — the ticked tones for one workspace."},"TurnIn":{"properties":{"speaker":{"type":"string","title":"Speaker","description":"Participant key, e.g. 'A' | 'B' | 'bot'"},"text":{"type":"string","title":"Text","description":"Turn text"},"ts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ts","description":"Epoch ms timestamp"},"turn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn","description":"Turn sequence number"}},"type":"object","required":["speaker","text"],"title":"TurnIn"},"UpdateUserCreditsRequest":{"properties":{"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid","description":"Firebase UID of the user to credit/debit."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Canonical person Entity id to credit/debit."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"The email the account signed up with — resolved to the account."},"amount":{"type":"number","title":"Amount","description":"Credits to ADD. A NEGATIVE amount is a manual debit. Never 0 (nothing moved)."},"reason":{"type":"string","title":"Reason","description":"Audit reason for the adjustment.","default":"admin_adjustment"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Optional job/session id for ledger correlation."},"credit_used_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Used For","description":"Optional module/job label."}},"type":"object","required":["amount"],"title":"UpdateUserCreditsRequest","description":"Admin credit adjustment. Provide exactly one target: uid (Firebase) or entity_id."},"UserCreditsReadRequest":{"properties":{"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid","description":"Firebase UID of the user whose wallet to read."},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id","description":"Canonical person Entity id to read."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"The email the account signed up with — resolved to the account."},"limit":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Limit","description":"How many movements to return (newest first).","default":50},"offset":{"type":"integer","minimum":0.0,"title":"Offset","description":"Movements to skip — PAGE SIZE, not a total.","default":0}},"type":"object","title":"UserCreditsReadRequest","description":"ADMIN read of any wallet (D-103 T0111). One target — uid or entity_id — plus paging."},"ValidateSessionRequest":{"properties":{"hermes_session_id":{"type":"string","title":"Hermes Session Id","description":"The room's Hermes shell session id."},"token":{"type":"string","title":"Token","description":"The caller's OWN credential (the one that opened the session, D-052)."}},"type":"object","required":["hermes_session_id","token"],"title":"ValidateSessionRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantResult":{"properties":{"variant":{"type":"string","title":"Variant"},"output":{"type":"string","title":"Output"},"quality_score":{"type":"number","title":"Quality Score"},"max_quality_score":{"type":"number","title":"Max Quality Score"},"dimension_scores":{"additionalProperties":{"type":"integer"},"type":"object","title":"Dimension Scores"},"latency_ms":{"type":"integer","title":"Latency Ms"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd"},"model":{"type":"string","title":"Model"},"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id"}},"type":"object","required":["variant","output","quality_score","max_quality_score","dimension_scores","latency_ms","input_tokens","output_tokens","estimated_cost_usd","model"],"title":"VariantResult"},"VerdictRequest":{"properties":{"rewriteCallId":{"type":"string","title":"Rewritecallid","description":"callId returned by /span-rewrite."},"verdict":{"type":"string","title":"Verdict","description":"'accepted' or 'declined'."}},"type":"object","required":["rewriteCallId","verdict"],"title":"VerdictRequest"},"WaitlistJoinRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code","default":""},"tab":{"type":"string","title":"Tab","default":"Waitlist"}},"type":"object","required":["name","email"],"title":"WaitlistJoinRequest"},"WarmIntroPath":{"properties":{"bridge_entity_id":{"type":"string","title":"Bridge Entity Id"},"bridge_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bridge Name"},"via":{"type":"string","enum":["knows_target","colleague_at_firm","connects_to_firm"],"title":"Via"},"predicate_class":{"type":"string","enum":["private","structural"],"title":"Predicate Class"},"firm_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firm Entity Id"},"hops":{"type":"integer","title":"Hops"},"disclosure_line":{"type":"string","title":"Disclosure Line"}},"type":"object","required":["bridge_entity_id","via","predicate_class","hops","disclosure_line"],"title":"WarmIntroPath","description":"One route from the founder to the investor: founder → bridge → target.\n\n`via` and `predicate_class` are the engine's own answer, re-derived on every call, never\naccepted from the caller (`D-064-007`): a caller able to assert `structural` for a private path\nwould publish a firm as a fact about two real people who have not been asked.\n\n⚠️ `disclosure_line` is REQUIRED, and that is the point. It is attached by `_attach_disclosure`\nbelow, and the panel renders THIS sentence rather than composing its own — two implementations\nof one sentence drift, and once they drift the founder reads wording the bot was never told to\nsay. Declaring it required means a path that lost its sentence fails validation LOUDLY instead\nof being published without one. `bridge_name` and `firm_entity_id` are nullable BY DESIGN and\nare always PRESENT as keys when null — see `WarmIntroResult` for why that distinction is load\nbearing."},"WarmIntroResult":{"properties":{"state":{"type":"string","enum":["found","not_found","could_not_check"],"title":"State"},"paths":{"items":{"$ref":"#/components/schemas/WarmIntroPath"},"type":"array","title":"Paths"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"network_coverage":{"anyOf":[{"$ref":"#/components/schemas/NetworkCoverage"},{"type":"null"}]},"target":{"anyOf":[{"$ref":"#/components/schemas/WarmIntroTarget"},{"type":"null"}]}},"type":"object","required":["state","paths"],"title":"WarmIntroResult","description":"The bridge search's published answer — the three states, plus the reasons that are NOT states.\n\n⚠️ THE ROUTE PUBLISHES THIS WITH `response_model_exclude_unset=True`, NEVER `exclude_none`, and\nthe difference is a behavioural fact, not a style choice:\n\n  `reason` and `network_coverage` are ABSENT — not null — in the states that do not use them.\n  The ABSENCE of a reason is the only shape under which the panel's sentence \"nobody you know\n  reaches this investor\" is true; a null reason would render the same sentence for a search\n  that was never actually run.\n\n  `bridge_name` and `firm_entity_id` are PRESENT and null on a private path. `exclude_none`\n  would DELETE them and change the wire shape the FE reads.\n\n`exclude_unset` preserves both: a key the route did not supply stays absent, and a key supplied\nas `None` is published as `null`. This model exists because `RULES_FE_QA` § THE GENERATED API\nCLIENT requires the FE's shapes to come from the BE's own `/openapi.json`, which FastAPI writes\nfrom `response_model` — and this route published `{}`.\n\n`state` and `paths` are required: every one of the engine's six return sites supplies both."},"WarmIntroTarget":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"}},"type":"object","required":["entity_id"],"title":"WarmIntroTarget","description":"Who the founder is being introduced to, so the panel needs no second request to name him."},"WebhookRegistrationRequest":{"properties":{"url":{"type":"string","title":"Url","description":"Callback URL"},"events":{"items":{"type":"string"},"type":"array","title":"Events","description":"Which events to notify"}},"type":"object","required":["url"],"title":"WebhookRegistrationRequest"},"api__routes__dev_requests_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse","description":"Generic API response (same shape used across the other route files)."},"api__routes__feedback_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse","description":"Same envelope every other route file in this estate uses."},"api__routes__kernel_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse","description":"Generic API response"},"api__routes__kpi_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse","description":"Generic API response"},"api__routes__process_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse","description":"Standard API response"},"api__routes__skill_approvals_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse","description":"Generic API response (same shape used across the other route files)."},"api__routes__skill_import_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse","description":"Generic API response (same shape used across the other route files)."},"api__routes__source_ingest_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse"},"api__routes__span_feedback_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse"},"api__routes__waitlist_manager__ApiResponse":{"properties":{"status":{"type":"boolean","title":"Status"},"statusCode":{"type":"integer","title":"Statuscode"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","statusCode","message"],"title":"ApiResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}