{"openapi":"3.0.3","info":{"title":"SentientUI API","description":"Public management and ingest API for SentientUI — adaptive UI personalization platform. Deprecation policy: deprecated operations are marked `deprecated: true` in this spec and return `Deprecation` and `Sunset` (RFC 8594) response headers for at least 90 days before removal.","version":"1.0.0","contact":{"email":"support@sentient-ui.com"}},"components":{"securitySchemes":{"publicKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Public SDK key (pk_…) for ingest/assign endpoints"},"secretKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Secret key (sk_…) for management endpoints"}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Stable machine-readable error code (snake_case)"},"message":{"type":"string","description":"Human-readable explanation"},"requestId":{"type":"string","description":"Correlates with server logs"},"retryAfter":{"type":"integer","description":"Seconds to wait before retrying (rate limits)"},"issues":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Per-field validation problems, when applicable"}},"additionalProperties":true}}},"paths":{"/openapi.json":{"get":{"operationId":"getOpenapiJson","responses":{"200":{"description":"Default Response"}}}},"/v1/health":{"get":{"operationId":"getHealth","responses":{"200":{"description":"Default Response"}}}},"/healthz":{"get":{"operationId":"getHealthz","responses":{"200":{"description":"Default Response"}}}},"/v1/events":{"post":{"operationId":"postEvents","summary":"Ingest an event batch","tags":["ingest"],"description":"Post a batch of SDK events (1–200). Events are deduplicated by `id`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","required":["id","sessionId","projectId","componentId","eventType","timestamp","timeInSession"],"properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Client-generated unique event ID (UUID recommended)"},"sessionId":{"type":"string","minLength":1,"maxLength":128},"projectId":{"type":"string","description":"Your public API key — server overwrites with the authenticated project ID"},"componentId":{"type":"string","minLength":1,"maxLength":256},"variantId":{"type":"string","maxLength":128},"eventType":{"type":"string","enum":["variant_assigned","goal_achieved","scroll_depth","dwell","cursor_signal","component_visible","component_exited","micro_signal"]},"goalType":{"type":"string","maxLength":64},"payload":{"type":"object","additionalProperties":true},"timestamp":{"type":"integer","minimum":0,"description":"Unix timestamp in milliseconds"},"timeInSession":{"type":"integer","minimum":0,"description":"Milliseconds since session start"}}}}}}},"security":[{"publicKey":[]}],"responses":{"202":{"description":"Batch accepted","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"integer","description":"Number of events stored"},"rejected":{"type":"integer","description":"Events skipped because the sessionId belongs to a different project"}},"description":"Batch accepted"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}},"description":"Validation error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"description":"Missing or invalid API key"}}}},"402":{"description":"Monthly session limit reached for this plan","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"plan":{"type":"string"},"limit":{"type":"integer"}},"description":"Monthly session limit reached for this plan"}}}}}}},"/v1/sessions":{"post":{"operationId":"postSessions","summary":"Upsert a visitor session","tags":["ingest"],"description":"Create or update a session. Call once per page load before sending events. Returns 204 on success.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sessionId"],"properties":{"sessionId":{"type":"string","minLength":1,"maxLength":128,"description":"Stable UUID for this browser session"},"deviceClass":{"type":"string","maxLength":32,"nullable":true,"description":"mobile | tablet | desktop"},"trafficSource":{"type":"string","maxLength":64,"nullable":true,"description":"organic | paid | direct | referral | email | social"},"country":{"type":"string","minLength":2,"maxLength":2,"nullable":true,"description":"ISO 3166-1 alpha-2 country code"},"referrerDomain":{"type":"string","maxLength":256,"nullable":true},"utmParams":{"type":"object","additionalProperties":{"type":"string"},"description":"UTM parameters from the URL"},"timeOfDay":{"type":"string","maxLength":16,"nullable":true,"description":"morning | afternoon | evening | night"},"dayOfWeek":{"type":"string","maxLength":16,"nullable":true,"description":"monday … sunday"},"ephemeral":{"type":"boolean","default":false,"description":"If true, session and its data are purged after 24 h"},"userId":{"type":"string","minLength":1,"maxLength":256,"nullable":true,"description":"Your application user ID — links sessions across devices"},"automation":{"type":"boolean","default":false,"description":"Likely-automation hint (navigator.webdriver or agent UA). Excluded from bandit reward and shown separately in the dashboard."}}}}}},"security":[{"publicKey":[]}],"responses":{"204":{"description":"Session upserted"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}},"description":"Validation error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"description":"Missing or invalid API key"}}}},"402":{"description":"Monthly session limit reached for this plan","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"plan":{"type":"string"},"limit":{"type":"integer"}},"description":"Monthly session limit reached for this plan"}}}},"409":{"description":"Session ID already owned by a different project","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"description":"Session ID already owned by a different project"}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/assign":{"post":{"operationId":"postAssign","summary":"Assign a variant to a session","tags":["ingest"],"description":"Returns the winning variant for a component based on the visitor's segment and bandit weights. Optionally stores agent-readable data alongside the assignment.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sessionId","componentId"],"properties":{"sessionId":{"type":"string","minLength":1,"maxLength":128},"componentId":{"type":"string","minLength":1,"maxLength":256},"variantIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"maxItems":20,"description":"Candidate variant IDs. Omit to use all configured variants."},"agentData":{"description":"Arbitrary data stored against the assigned variant and surfaced to AI agents"},"agentDataByVariant":{"type":"object","additionalProperties":true,"description":"Per-variant agent data — only the assigned variant's entry is stored"}}}}}},"security":[{"publicKey":[]}],"responses":{"200":{"description":"Variant assigned","content":{"application/json":{"schema":{"type":"object","required":["variantId","assignmentTtlMs"],"properties":{"variantId":{"type":"string","description":"The assigned variant ID"},"assignmentTtlMs":{"type":"integer","description":"How long the client should cache this assignment (ms)"},"source":{"type":"string","enum":["promoted"],"description":"Present when a winning variant was declared"},"content":{"description":"Managed content for this variant, if configured"},"holdout":{"type":"boolean","description":"Present (true) when the session is in the control group and received the declared baseline"}},"description":"Variant assigned"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/winner":{"get":{"operationId":"getWinner","summary":"Get the winning variant for a component","tags":["ingest"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/weights":{"get":{"operationId":"getWeights","summary":"Get aggregated variant weights per component","tags":["ingest"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"components":{"type":"array","items":{"type":"object","properties":{"componentId":{"type":"string"},"updatedAt":{"type":"number"},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"pulls":{"type":"number"},"avgReward":{"type":"number","nullable":true}},"additionalProperties":true}}},"additionalProperties":true}}},"additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/agent/layout":{"get":{"operationId":"getAgentLayout","summary":"Get personalized layout for a visitor","tags":["agent"],"description":"Returns the winning variant for every active component, resolved to the visitor's persona. Call from your backend or AI agent using an `sk_` key. Each call is logged as an agent event.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"query","name":"visitor_id","required":false,"description":"Session UUID from the visitor's browser cookie"},{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"user_id","required":false,"description":"Your application user ID — used when visitor_id is unavailable"}],"security":[{"secretKey":[]}],"responses":{"200":{"description":"Layout resolved","content":{"application/json":{"schema":{"type":"object","required":["persona","confidence","blocks"],"properties":{"persona":{"type":"string","nullable":true,"description":"Visitor's cluster label, or null for anonymous visitors"},"confidence":{"type":"number","nullable":true,"description":"Portrait reliability score (0–1) when a persona is resolved, null otherwise — same metric as POST /v1/decide"},"blocks":{"type":"array","items":{"type":"object","required":["block","variant"],"properties":{"block":{"type":"string","description":"Component ID"},"variant":{"type":"string","description":"Winning variant ID"},"content":{"description":"Agent-readable data attached to this variant, if any"}}}}},"description":"Layout resolved"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"issues":{"type":"array","items":{"type":"object"}}},"description":"Validation error"}}}},"401":{"description":"Missing or invalid sk_ key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"description":"Missing or invalid sk_ key"}}}}}}},"/v1/crawler-events":{"post":{"operationId":"postCrawlerEvents","summary":"Log an AI crawler / agent HTTP read","tags":["ingest"],"description":"Record a UA-matched crawler or agent request against your site. Called server-side by the SDK's sentientAgentMiddleware and createAgentFeed route — the only way to observe passive crawlers, which run no JavaScript. Feeds the dashboard \"% agentic visits\" figure. Never counted in impressions or CVR.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","minLength":1,"maxLength":2048,"description":"Request path that was read"},"botName":{"type":"string","maxLength":128,"nullable":true,"description":"Matched agent token (e.g. GPTBot)"},"userAgent":{"type":"string","maxLength":1024,"nullable":true},"source":{"type":"string","enum":["middleware","feed"],"default":"middleware"}}}}}},"security":[{"publicKey":[]}],"responses":{"204":{"description":"Logged"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mcp/demo":{"post":{"operationId":"postMcpDemo","summary":"Provision an anonymous MCP demo token","tags":["ingest"],"responses":{"200":{"description":"Demo token provisioned","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Anonymous demo bearer token (demo_ prefix)"},"projectId":{"type":"string","description":"UUID of the provisioned demo project"},"callsRemaining":{"type":"integer","description":"MCP calls left on this demo token"}},"additionalProperties":true,"description":"Demo token provisioned"}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"getWellKnownOauthProtectedResource","responses":{"200":{"description":"Default Response"}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"getWellKnownOauthProtectedResourceMcp","responses":{"200":{"description":"Default Response"}}}},"/.well-known/oauth-authorization-server":{"get":{"operationId":"getWellKnownOauthAuthorizationServer","responses":{"200":{"description":"Default Response"}}}},"/mcp":{"post":{"operationId":"postMcp","responses":{"200":{"description":"Default Response"}}},"get":{"operationId":"getMcp","responses":{"200":{"description":"Default Response"}}},"delete":{"operationId":"deleteMcp","responses":{"200":{"description":"Default Response"}}}},"/v1/graph/sync":{"post":{"operationId":"postGraphSync","summary":"Sync the component graph for a page","tags":["ingest"],"responses":{"204":{"description":"Graph synced"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/visitor":{"delete":{"operationId":"deleteVisitor","summary":"Erase all data for a visitor (GDPR right-to-erasure)","tags":["ingest"],"responses":{"204":{"description":"Visitor data erased"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/decide":{"post":{"operationId":"postDecide","summary":"Decide layout order, variant assignments, and slot arms for a session","tags":["ingest"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"layoutOrder":{"type":"array","items":{"type":"string"}},"assignments":{"type":"object","additionalProperties":true},"persona":{"type":"string"},"confidence":{"type":"number"},"holdout":{"type":"boolean"},"slots":{"type":"object","additionalProperties":true},"slotConfig":{"type":"object","additionalProperties":true},"goals":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/editor/verify":{"get":{"operationId":"getEditorVerify","summary":"Verify an editor token","tags":["mgmt"],"responses":{"200":{"description":"Token is valid; projectId it grants draft access to","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"projectId":{"type":"string"}},"additionalProperties":true,"description":"Token is valid; projectId it grants draft access to"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/editor/slots":{"get":{"operationId":"getEditorSlots","summary":"List draft/published slot definitions","tags":["mgmt"],"responses":{"200":{"description":"Slot definitions for the token project","content":{"application/json":{"schema":{"type":"object","properties":{"slots":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true,"description":"Slot definitions for the token project"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/editor/targets":{"get":{"operationId":"getEditorTargets","summary":"List audit-detected targets","tags":["mgmt"],"responses":{"200":{"description":"Detected elements for overlay pre-highlighting","content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true,"description":"Detected elements for overlay pre-highlighting"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/editor/slots/{slotId}":{"post":{"operationId":"postEditorSlotsBySlotId","summary":"Upsert a draft slot","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"slotId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/editor/goals/{goalId}":{"post":{"operationId":"postEditorGoalsByGoalId","summary":"Upsert a draft goal","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Draft goal written","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"string"}},"additionalProperties":true,"description":"Draft goal written"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/locator-miss":{"post":{"operationId":"postLocatorMiss","summary":"Report unresolved snippet slot locators","tags":["ingest"],"responses":{"204":{"description":"Miss reports recorded"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/section-map":{"post":{"operationId":"postSectionMap","summary":"Register no-code section semantic types","tags":["ingest"],"responses":{"204":{"description":"Section mappings upserted"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/explain":{"post":{"operationId":"postExplain","summary":"Simulate a decision for a persona without recording events","tags":["ingest"],"responses":{"200":{"description":"Simulated decision for the requested persona (read-only, event-free)","content":{"application/json":{"schema":{"type":"object","properties":{"layoutOrder":{"type":"array","items":{"type":"string"}},"assignments":{"type":"object","additionalProperties":true},"persona":{"type":"string"},"reasons":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string"},"reason":{"type":"string"},"source":{"type":"string"}},"additionalProperties":true}},"personaAttributes":{"type":"object","additionalProperties":true},"slots":{"type":"object","additionalProperties":true}},"additionalProperties":true,"description":"Simulated decision for the requested persona (read-only, event-free)"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/layout-stats":{"get":{"operationId":"getLayoutStats","summary":"Per-persona learned layout performance","tags":["ingest"],"responses":{"200":{"description":"Learned layout weights per persona","content":{"application/json":{"schema":{"type":"object","properties":{"layouts":{"type":"array","items":{"type":"object","properties":{"persona":{"type":"string"},"layoutOrder":{"type":"array","items":{"type":"string"}},"pulls":{"type":"number"},"avgReward":{"type":"number"},"totalReward":{"type":"number"},"alpha":{"type":"number"},"beta":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true,"description":"Learned layout weights per persona"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guardrails/{componentId}":{"put":{"operationId":"putGuardrailsByComponentId","summary":"Set component guardrail threshold and min observations","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"componentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guardrails/{componentId}/unpause":{"post":{"operationId":"postGuardrailsByComponentIdUnpause","summary":"Unpause guardrail-paused variants for a component","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"componentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/decision-log":{"get":{"operationId":"getDecisionLog","summary":"Recent decisions for a session","tags":["ingest"],"responses":{"200":{"description":"Recent decision log entries for the session","content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"persona":{"type":"string"},"confidence":{"type":"number"},"layoutOrder":{"type":"array","items":{"type":"string"}},"assignments":{"type":"object","additionalProperties":true},"shadowOnly":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":true,"description":"Recent decision log entries for the session"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/goals":{"post":{"operationId":"postGoals","summary":"Record a goal/conversion event","tags":["ingest"],"responses":{"202":{"description":"Goal event accepted for processing","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"integer","description":"Number of goal events accepted"}},"additionalProperties":true,"description":"Goal event accepted for processing"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/webhook/stripe":{"post":{"operationId":"postWebhookStripe","responses":{"200":{"description":"Default Response"}}}},"/v1/mgmt/me":{"get":{"operationId":"getMgmtMe","summary":"Caller's role and billing-owner flag","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string"},"isBillingOwner":{"type":"boolean"}},"additionalProperties":true}}}}}}},"/v1/mgmt/team":{"get":{"operationId":"getMgmtTeam","summary":"Team management or member view","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string"},"seatLimit":{"type":"number"},"seatCount":{"type":"number"},"isBillingOwner":{"type":"boolean"}},"additionalProperties":true}}}}}},"patch":{"operationId":"patchMgmtTeam","summary":"Rename the workspace","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/team/invite":{"post":{"operationId":"postMgmtTeamInvite","summary":"Invite a team member","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"resent":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/team/members/{memberId}":{"patch":{"operationId":"patchMgmtTeamMembersByMemberId","summary":"Change a member's role","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"memberId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteMgmtTeamMembersByMemberId","summary":"Remove a team member","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"memberId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/team/members/{memberId}/projects":{"put":{"operationId":"putMgmtTeamMembersByMemberIdProjects","summary":"Replace a member's project visibility","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"memberId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/team/leave":{"post":{"operationId":"postMgmtTeamLeave","summary":"Leave your team","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/join/preview":{"get":{"operationId":"getMgmtJoinPreview","summary":"Preview an invite before accepting","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"team_name":{"type":"string"},"invited_email":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/join":{"post":{"operationId":"postMgmtJoin","summary":"Accept an invite via token","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects":{"get":{"operationId":"getMgmtProjects","summary":"List visible projects","tags":["mgmt"],"responses":{"200":{"description":"Projects the caller can see","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Project UUID"},"name":{"type":"string"},"context_type":{"type":"string"}},"additionalProperties":true},"description":"Projects the caller can see"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"postMgmtProjects","summary":"Create a project","tags":["mgmt"],"responses":{"201":{"description":"Project created","content":{"application/json":{"schema":{"type":"object","required":["id","apiKey"],"properties":{"id":{"type":"string","description":"New project UUID"},"apiKey":{"type":"string","description":"pk_ public key for the SDK"}},"description":"Project created"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}":{"get":{"operationId":"getMgmtProjectsById","summary":"Get project details","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Project details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string"},"shadow_mode":{"type":"boolean"},"holdout_rate":{"type":"number"},"key_prefix":{"type":"string","nullable":true}},"additionalProperties":true,"description":"Project details"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"patchMgmtProjectsById","summary":"Update project settings","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteMgmtProjectsById","summary":"Delete a project","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/keys":{"get":{"operationId":"getMgmtKeys","summary":"List API keys","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"project_name":{"type":"string"},"key_prefix":{"type":"string"},"revoked":{"type":"boolean"}},"additionalProperties":true}}}}}}},"post":{"operationId":"postMgmtKeys","summary":"Rotate a project public key","tags":["mgmt"],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"prefix":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/keys/server":{"post":{"operationId":"postMgmtKeysServer","summary":"Issue a server key","tags":["mgmt"],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"prefix":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/keys/{id}/revoke":{"post":{"operationId":"postMgmtKeysByIdRevoke","summary":"Revoke a key","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/origins":{"get":{"operationId":"getMgmtProjectsByIdOrigins","summary":"List allowed origins","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"origins":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"postMgmtProjectsByIdOrigins","summary":"Add an allowed origin","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"origins":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteMgmtProjectsByIdOrigins","summary":"Remove an allowed origin","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"origins":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/variants/restore":{"post":{"operationId":"postMgmtProjectsByIdVariantsRestore","summary":"Restore a variant to active","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/variants/pause":{"post":{"operationId":"postMgmtProjectsByIdVariantsPause","summary":"Pause a variant","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/variants/retire":{"post":{"operationId":"postMgmtProjectsByIdVariantsRetire","summary":"Retire (archive) an active variant","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/variants":{"post":{"operationId":"postMgmtProjectsByIdVariants","summary":"Create a draft variant","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":"string"},"status":{"type":"string"},"displayName":{"type":"string","nullable":true}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"operationId":"patchMgmtProjectsByIdVariants","summary":"Update a managed variant","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteMgmtProjectsByIdVariants","summary":"Delete a draft variant","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/previews":{"get":{"operationId":"getMgmtProjectsByIdPreviews","summary":"List component variant previews","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"operationId":"putMgmtProjectsByIdPreviews","summary":"Batch upsert variant previews","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"updated":{"type":"number"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/components":{"get":{"operationId":"getMgmtProjectsByIdComponents","summary":"List component aggregates for a project","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Paginated component aggregation","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"},"components":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true,"description":"Paginated component aggregation"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/components/{componentId}/promote":{"post":{"operationId":"postMgmtProjectsByIdComponentsByComponentIdPromote","summary":"Promote a variant for a component","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"componentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteMgmtProjectsByIdComponentsByComponentIdPromote","summary":"Remove the latest promotion for a component","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"componentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/goals":{"get":{"operationId":"getMgmtProjectsByIdGoals","summary":"Goal hit counts and per-variant completion rates","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"goals":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/analytics":{"get":{"operationId":"getMgmtProjectsByIdAnalytics","summary":"Daily impressions and conversions per variant","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/health":{"get":{"operationId":"getMgmtProjectsByIdHealth","summary":"Project ingestion health and 24h traffic breakdown","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"events24h":{"type":"number"},"sessions24h":{"type":"number"},"agentCalls":{"type":"number"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/trends":{"get":{"operationId":"getMgmtProjectsByIdTrends","summary":"CVR momentum, session volume, and breakdown trends","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/guardrail-events":{"get":{"operationId":"getMgmtProjectsByIdGuardrailEvents","summary":"Variants auto-paused by guardrails in the last 24h","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"guardrailEvents":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/device-stats":{"get":{"operationId":"getMgmtProjectsByIdDeviceStats","summary":"Per-device impressions, conversions, and CVR","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"devices":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/lift":{"get":{"operationId":"getMgmtProjectsByIdLift","summary":"Conversion lift of personalization vs. holdout","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"liftPct":{"type":"number"},"significant":{"type":"boolean"},"pinnedExcluded":{"type":"number"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/verification":{"get":{"operationId":"getMgmtProjectsByIdVerification","summary":"Setup verification status, milestones, and observed surfaces","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/graph/edges":{"get":{"operationId":"getMgmtProjectsByIdGraphEdges","summary":"List graph edges for a page","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Edges keyed under `edges`","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Edges keyed under `edges`"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/graph/node-clusters":{"get":{"operationId":"getMgmtProjectsByIdGraphNodeClusters","summary":"Dominant audience cluster per component","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Clusters keyed under `clusters`","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Clusters keyed under `clusters`"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/onboarding":{"get":{"operationId":"getMgmtProjectsByIdOnboarding","summary":"Onboarding milestone status","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Steps keyed under `steps`","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Steps keyed under `steps`"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/layout-stats":{"get":{"operationId":"getMgmtProjectsByIdLayoutStats","summary":"Per-persona layout weights","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Layout stats rows","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Layout stats rows"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/shadow-stats":{"get":{"operationId":"getMgmtProjectsByIdShadowStats","summary":"Shadow-mode decision stats","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Shadow decision summary","content":{"application/json":{"schema":{"type":"object","properties":{"shadowDecisions":{"type":"number"},"personaCount":{"type":"number"},"readyToPromote":{"type":"boolean"},"minRequired":{"type":"number"}},"additionalProperties":true,"description":"Shadow decision summary"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/graph":{"get":{"operationId":"getMgmtProjectsByIdGraph","summary":"Component graph for a project or page","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Page summary (`pages`) or page nodes (`nodes`)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Page summary (`pages`) or page nodes (`nodes`)"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/portraits":{"get":{"operationId":"getMgmtProjectsByIdPortraits","summary":"Persona clusters for a project","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Session totals and per-cluster persona dimensions","content":{"application/json":{"schema":{"type":"object","properties":{"totalSessions":{"type":"integer"},"reliableSessions":{"type":"integer"},"avgReliability":{"type":"number","nullable":true},"clusters":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true,"description":"Session totals and per-cluster persona dimensions"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/engagement-matrix":{"get":{"operationId":"getMgmtProjectsByIdEngagementMatrix","summary":"Persona × section engagement matrix","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Persona × section attention indices with confidence intervals","content":{"application/json":{"schema":{"type":"object","properties":{"window":{"type":"string"},"sections":{"type":"array","items":{"type":"string"}}},"additionalProperties":true,"description":"Persona × section attention indices with confidence intervals"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/webhooks":{"get":{"operationId":"getMgmtProjectsByIdWebhooks","summary":"List project webhooks","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"label":{"type":"string","nullable":true},"url":{"type":"string"},"active":{"type":"boolean"}},"additionalProperties":true}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"postMgmtProjectsByIdWebhooks","summary":"Create a webhook","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string","nullable":true}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/webhooks/{webhookId}/test":{"post":{"operationId":"postMgmtProjectsByIdWebhooksByWebhookIdTest","summary":"Test a webhook","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"webhookId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":true}}}}}}},"/v1/mgmt/projects/{id}/webhooks/{webhookId}":{"delete":{"operationId":"deleteMgmtProjectsByIdWebhooksByWebhookId","summary":"Delete a webhook","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"webhookId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/billing":{"get":{"operationId":"getMgmtBilling","summary":"Get billing summary","tags":["mgmt"],"responses":{"200":{"description":"Billing summary","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","description":"Current plan id"},"sessionsUsed":{"type":"number","description":"Sessions counted this month"},"sessionsLimit":{"type":"number","description":"Monthly session allowance for the plan"},"sessionsPct":{"type":"number","description":"sessionsUsed / sessionsLimit"},"projectCount":{"type":"number","description":"Number of projects on the account"},"stripeCustomerId":{"type":"string","nullable":true,"description":"Stripe customer id, if any"}},"additionalProperties":true,"description":"Billing summary"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/billing/checkout":{"post":{"operationId":"postMgmtBillingCheckout","summary":"Create a Stripe checkout session","tags":["mgmt"],"description":"Starts a Stripe Checkout session for a plan upgrade. Supports the Idempotency-Key header: a retried request with the same key returns the original checkout URL instead of creating a duplicate session.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","description":"Target plan id (e.g. starter, growth)"},"billing":{"type":"string","enum":["monthly","annual"],"description":"Billing cycle; defaults to monthly"}}}}}},"parameters":[{"schema":{"type":"string","maxLength":255},"in":"header","name":"Idempotency-Key","required":false,"description":"Client-supplied key; a retried POST with the same key replays the first response."}],"responses":{"200":{"description":"Checkout session created","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Stripe Checkout URL to redirect the user to"}},"additionalProperties":true,"description":"Checkout session created"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/billing/portal":{"post":{"operationId":"postMgmtBillingPortal","summary":"Create a Stripe billing portal session","tags":["mgmt"],"responses":{"200":{"description":"Billing portal session created","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Stripe billing portal URL"}},"additionalProperties":true,"description":"Billing portal session created"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/stream":{"get":{"operationId":"getMgmtProjectsByIdStream","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/mgmt/projects/{id}/export":{"get":{"operationId":"getMgmtProjectsByIdExport","summary":"Export project data bundle","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Aggregate project export (excludes raw_events)","content":{"application/json":{"schema":{"type":"object","properties":{"exportedAt":{"type":"string","description":"ISO 8601 export timestamp"},"note":{"type":"string"}},"additionalProperties":true,"description":"Aggregate project export (excludes raw_events)"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/export/events":{"get":{"operationId":"getMgmtProjectsByIdExportEvents","summary":"Export raw events (keyset paginated)","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A page of raw events","content":{"application/json":{"schema":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass back to fetch the next page; null when exhausted"},"count":{"type":"integer","description":"Number of events in this page"}},"additionalProperties":true,"description":"A page of raw events"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/audit":{"get":{"operationId":"getMgmtProjectsByIdAudit","summary":"List audit entries","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Page of audit entries","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Audit event UUID"},"user_id":{"type":"string"},"project_id":{"type":"string","nullable":true},"action":{"type":"string"},"ip":{"type":"string","nullable":true}},"additionalProperties":true}},"nextCursor":{"type":"string","nullable":true,"description":"Keyset cursor for the next page"}},"additionalProperties":true,"description":"Page of audit entries"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/audit/export":{"get":{"operationId":"getMgmtProjectsByIdAuditExport","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/mgmt/projects/{id}/audit/actions":{"get":{"operationId":"getMgmtProjectsByIdAuditActions","summary":"List distinct audit actions","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Distinct action names seen for this project","content":{"application/json":{"schema":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"string"}}},"additionalProperties":true,"description":"Distinct action names seen for this project"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/projects":{"get":{"operationId":"getMgmtAdminProjects","summary":"List all projects across tenants","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sentryConfigured":{"type":"boolean"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/projects/{id}/plan":{"post":{"operationId":"postMgmtAdminProjectsByIdPlan","summary":"Set a project owner's plan","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"plan":{"type":"string"},"comp_expires_at":{"type":"string","nullable":true}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/projects/{id}":{"get":{"operationId":"getMgmtAdminProjectsById","summary":"Get full admin view of a project","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deleteMgmtAdminProjectsById","summary":"Hard-delete any project","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/projects/{id}/disabled":{"post":{"operationId":"postMgmtAdminProjectsByIdDisabled","summary":"Toggle a project ingest kill switch","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"disabled":{"type":"boolean"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/users/{id}":{"delete":{"operationId":"deleteMgmtAdminUsersById","summary":"Hard-delete a user and everything they own","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"deletedProjects":{"type":"number"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"operationId":"getMgmtAdminUsersById","summary":"Get full admin view of a user","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/audit":{"get":{"operationId":"getMgmtAdminAudit","summary":"Global audit feed","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/whoami":{"get":{"operationId":"getMgmtAdminWhoami","summary":"Check the caller is an admin","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"admin":{"type":"boolean"},"userId":{"type":"string"}},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/users":{"get":{"operationId":"getMgmtAdminUsers","summary":"List all user accounts","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/admin/users/{id}/plan":{"post":{"operationId":"postMgmtAdminUsersByIdPlan","summary":"Set a user's plan","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"plan":{"type":"string"},"comp_expires_at":{"type":"string","nullable":true}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/notifications":{"get":{"operationId":"getMgmtNotifications","summary":"List notifications","tags":["mgmt"],"responses":{"200":{"description":"Notifications for the caller, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"notifications":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true,"description":"Notifications for the caller, newest first"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/notifications/read":{"post":{"operationId":"postMgmtNotificationsRead","summary":"Mark notifications read","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"number"}},"additionalProperties":true}}}}}}},"/v1/mgmt/notifications/read-all":{"post":{"operationId":"postMgmtNotificationsReadAll","summary":"Mark all notifications read","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"number"}},"additionalProperties":true}}}}}}},"/v1/mgmt/notification-preferences":{"get":{"operationId":"getMgmtNotificationPreferences","summary":"Get notification preferences","tags":["mgmt"],"responses":{"200":{"description":"Per-type notification preferences","content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":true,"description":"Per-type notification preferences"}}}}}},"put":{"operationId":"putMgmtNotificationPreferences","summary":"Update notification preferences","tags":["mgmt"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}}}}},"/v1/mgmt/projects/{id}/insights":{"get":{"operationId":"getMgmtProjectsByIdInsights","summary":"Latest AI insights for a project","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Insights payload; status=empty when none generated yet","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok","empty"]},"narratorBullets":{"type":"array","items":{"type":"string"}},"advisorBullets":{"type":"array","items":{"type":"string"}},"generatedAt":{"type":"string","description":"ISO timestamp of generation"},"isStale":{"type":"boolean"}},"additionalProperties":true,"description":"Insights payload; status=empty when none generated yet"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/insights/refresh":{"post":{"operationId":"postMgmtProjectsByIdInsightsRefresh","summary":"Trigger AI insight generation (async)","tags":["mgmt"],"description":"Starts insight generation and returns 202 immediately. Poll the pollUrl (also in the Location header) — GET /v1/mgmt/projects/{id}/insights — for the generated result.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Project UUID"}],"responses":{"202":{"description":"Generation started; poll pollUrl (also in the Location header)","content":{"application/json":{"schema":{"type":"object","required":["status","jobId","pollUrl"],"properties":{"status":{"type":"string","enum":["generating"]},"jobId":{"type":"string","description":"Identifier for this generation run"},"pollUrl":{"type":"string","description":"GET this to poll for the generated insights"}},"description":"Generation started; poll pollUrl (also in the Location header)"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/discovered-goals":{"get":{"operationId":"getMgmtProjectsByIdDiscoveredGoals","summary":"List discovered goals","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Undismissed discovered goals","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"signal_type":{"type":"string"},"component_id":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"session_count":{"type":"integer"},"confirmed":{"type":"boolean"}},"additionalProperties":true},"description":"Undismissed discovered goals"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/discovered-goals/{goalId}/confirm":{"post":{"operationId":"postMgmtProjectsByIdDiscoveredGoalsByGoalIdConfirm","summary":"Confirm a discovered goal","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/discovered-goals/{goalId}/dismiss":{"post":{"operationId":"postMgmtProjectsByIdDiscoveredGoalsByGoalIdDismiss","summary":"Dismiss a discovered goal","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/observation-mode":{"patch":{"operationId":"patchMgmtProjectsByIdObservationMode","summary":"Toggle observation mode","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"New observation-mode state","content":{"application/json":{"schema":{"type":"object","properties":{"observationMode":{"type":"boolean"}},"additionalProperties":true,"description":"New observation-mode state"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/chat":{"post":{"operationId":"postMgmtProjectsByIdChat","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/mgmt/projects/{id}/clusters":{"get":{"operationId":"getMgmtProjectsByIdClusters","summary":"List project clusters","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Clusters ordered by member count","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Cluster UUID"},"label":{"type":"string"},"member_count":{"type":"number"},"top_variant_id":{"type":"string","nullable":true},"top_variant_avg_reward":{"type":"number","nullable":true}},"additionalProperties":true},"description":"Clusters ordered by member count"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/slots":{"get":{"operationId":"getMgmtProjectsByIdSlots","summary":"Per-slot summary of what each visitor type sees","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Per-slot arm and persona breakdown","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true,"description":"Per-slot arm and persona breakdown"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/suggestions":{"get":{"operationId":"getMgmtProjectsByIdSuggestions","summary":"Rule-based next-step suggestions","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Suggestion cards","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true,"description":"Suggestion cards"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/slot-definitions":{"get":{"operationId":"getMgmtProjectsByIdSlotDefinitions","summary":"List slot definitions","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Draft + published slot definitions for the project","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true,"description":"Draft + published slot definitions for the project"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/slot-definitions/{slotId}":{"put":{"operationId":"putMgmtProjectsByIdSlotDefinitionsBySlotId","summary":"Create or update a slot draft","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"slotId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/slot-definitions/{slotId}/publish":{"post":{"operationId":"postMgmtProjectsByIdSlotDefinitionsBySlotIdPublish","summary":"Publish a slot draft","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"slotId","required":true}],"responses":{"200":{"description":"Slot published","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"publishedVersion":{"type":"number"}},"additionalProperties":true,"description":"Slot published"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/slot-definitions/{slotId}/pin":{"post":{"operationId":"postMgmtProjectsByIdSlotDefinitionsBySlotIdPin","summary":"Set or clear a slot pin","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"slotId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/slot-definitions/{slotId}/archive":{"post":{"operationId":"postMgmtProjectsByIdSlotDefinitionsBySlotIdArchive","summary":"Archive a slot","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"slotId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/goal-definitions":{"get":{"operationId":"getMgmtProjectsByIdGoalDefinitions","summary":"List goal definitions","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Active and archived goal definitions","content":{"application/json":{"schema":{"type":"object","properties":{"goals":{"type":"array","items":{"type":"object","properties":{"goal_id":{"type":"string"},"event":{"type":"string"},"url_pattern":{"type":"string","nullable":true},"slot_id":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string","nullable":true},"auditTargetId":{"type":"string","nullable":true}},"additionalProperties":true}}},"additionalProperties":true,"description":"Active and archived goal definitions"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/goal-definitions/{goalId}":{"put":{"operationId":"putMgmtProjectsByIdGoalDefinitionsByGoalId","summary":"Create or update a goal","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/goal-definitions/{goalId}/publish":{"post":{"operationId":"postMgmtProjectsByIdGoalDefinitionsByGoalIdPublish","summary":"Publish a draft goal","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/goal-definitions/{goalId}/archive":{"post":{"operationId":"postMgmtProjectsByIdGoalDefinitionsByGoalIdArchive","summary":"Archive a goal","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"goalId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":true}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/editor-token":{"post":{"operationId":"postMgmtProjectsByIdEditorToken","summary":"Mint a visual-editor token","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Editor token issued","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Short-lived draft editor token"},"expiresInMs":{"type":"integer","description":"Token lifetime in milliseconds"}},"additionalProperties":true,"description":"Editor token issued"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/goal-builder":{"post":{"operationId":"postMgmtProjectsByIdGoalBuilder","summary":"Draft a goal from a plain-English conversation","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A clarifying question, a proposed goal draft, or an error reason","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","description":"question | draft | error"},"question":{"type":"string","description":"A single clarifying question (kind=question)"},"reason":{"type":"string","description":"Why no goal could be drafted (kind=error)"},"assistantMessage":{"type":"string","description":"Raw assistant text to append to the conversation history"}},"additionalProperties":true,"description":"A clarifying question, a proposed goal draft, or an error reason"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/home-summary":{"get":{"operationId":"getMgmtProjectsByIdHomeSummary","summary":"Dashboard home summary","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Cold/learning/ready state with lift, learning progress, movers, and suggestions","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","description":"cold | learning | ready"}},"additionalProperties":true,"description":"Cold/learning/ready state with lift, learning progress, movers, and suggestions"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/site-audit":{"get":{"operationId":"getMgmtProjectsByIdSiteAudit","summary":"Get the latest site audit","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Audit status and, when complete, the report","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"overallScore":{"type":"number","nullable":true},"auditedAt":{"type":"string","nullable":true,"description":"ISO 8601 timestamp"},"error":{"type":"string","nullable":true}},"additionalProperties":true,"description":"Audit status and, when complete, the report"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/mgmt/projects/{id}/site-audit/refresh":{"post":{"operationId":"postMgmtProjectsByIdSiteAuditRefresh","summary":"Queue a site audit re-run","tags":["mgmt"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"202":{"description":"Audit re-run queued","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":true,"description":"Audit re-run queued"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"servers":[{"url":"https://api.sentient-ui.com","description":"Production"}],"tags":[{"name":"ingest","description":"SDK event ingest and assignment"},{"name":"mgmt","description":"Project management (sk_ authenticated)"},{"name":"agent","description":"AI agent content access"}]}