{"openapi":"3.1.0","info":{"title":"Synchronex API","version":"1.0.0","description":"Programmatic access to Synchronex memory, products, decisions, context exports, sessions, and AI telemetry."},"servers":[{"url":"https://synchronex.ai/api/v1","description":"Production"},{"url":"http://localhost:3010/api/v1","description":"Local development"}],"security":[{"BearerAuth":[]},{"OAuthAccessToken":[]},{"OAuth2":["read"]}],"tags":[{"name":"Memory"},{"name":"Decisions"},{"name":"Signals"},{"name":"Intake"},{"name":"Inbox"},{"name":"Costs"},{"name":"BYOK"},{"name":"Kernel"},{"name":"Scope"},{"name":"Bridge"},{"name":"Render"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sx_live_...","description":"Synchronex API key. Send as Authorization: Bearer sx_live_..."},"SynchronexApiKey":{"type":"http","scheme":"bearer","bearerFormat":"sx_live or sx_test","description":"Synchronex API key generated from MCP settings. Accepted format: sx_live_... or sx_test_..."},"OAuthAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"sxo","description":"OAuth access token issued by the Synchronex OAuth flow. Accepted format: sxo_..."},"OAuth2":{"type":"oauth2","description":"OAuth 2.0 authorization-code flow with PKCE (S256). Tokens issued to third-party connector clients are attenuated to read + propose — approval endpoints and MCP approval tools reject them; approve in the Synchronex dashboard.","flows":{"authorizationCode":{"authorizationUrl":"https://synchronex.ai/oauth/authorize","tokenUrl":"https://synchronex.ai/api/oauth/token","refreshUrl":"https://synchronex.ai/api/oauth/token","scopes":{"read":"Read memory, decisions, product state, and pending proposals.","write":"Create and update resources; submit inbound command proposals (approve-first — nothing executes directly)."}}}},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT or Synchronex API key"}},"headers":{"X-RateLimit-Limit":{"description":"Maximum requests in the active rate-limit window.","schema":{"oneOf":[{"type":"integer"},{"type":"string","enum":["unlimited"]}]}},"X-RateLimit-Remaining":{"description":"Requests remaining in the active rate-limit window.","schema":{"oneOf":[{"type":"integer"},{"type":"string","enum":["unlimited"]}]}},"X-RateLimit-Reset":{"description":"Unix timestamp when the active rate-limit window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds until retry is recommended after a 429.","schema":{"type":"integer"}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","NOT_FOUND","RATE_LIMITED","VALIDATION_ERROR","TIER_REQUIRED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}},"RateLimitExceeded":{"type":"object","required":["error","retry_after","limit","remaining","reset_at"],"properties":{"error":{"type":"string","enum":["rate_limit_exceeded"]},"retry_after":{"type":"integer","minimum":1},"limit":{"type":"integer"},"remaining":{"type":"integer","enum":[0]},"reset_at":{"type":"string","format":"date-time"}}},"IdentityKernelResponse":{"type":"object","required":["kernel","injection_block","token_count","confidence","updated_at"],"properties":{"kernel":{"type":"object","additionalProperties":true},"injection_block":{"type":["string","null"]},"token_count":{"type":"integer"},"confidence":{"type":"object","properties":{"score":{"type":"number"},"recommendation":{"type":"string"},"flags":{"type":"array","items":{"type":"string"}}}},"updated_at":{"type":"string","format":"date-time"}}},"ProductStateResponse":{"type":"object","required":["product_name","status","state"],"properties":{"product_name":{"type":"string"},"status":{"type":["string","null"]},"state":{"type":["object","null"],"additionalProperties":true}}},"Decision":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"decision":{"type":"string"},"reasoning":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"product_name":{"type":["string","null"]},"affects_products":{"type":"array","items":{"type":"string"}},"decided_at":{"type":"string","format":"date-time"}}},"MemoryInterchangeFormat":{"type":"object","required":["mif_version","provenance","identity_kernel"],"properties":{"mif_version":{"type":"string","enum":["0.1"]},"provenance":{"type":"object","additionalProperties":true},"identity_kernel":{"type":"object","additionalProperties":true},"user_corpus":{"type":"array","items":{"type":"object","additionalProperties":true}},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}},"metadata":{"type":"object","additionalProperties":true}}},"CostSummary":{"type":"object","properties":{"total_cost_usd":{"type":"number"},"total_tokens":{"type":"object","properties":{"input":{"type":"integer"},"output":{"type":"integer"}}},"by_model":{"type":"array","items":{"type":"object","additionalProperties":true}},"by_day":{"type":"array","items":{"type":"object","additionalProperties":true}},"period_days":{"type":"integer"},"event_count":{"type":"integer"}}},"ByokCredential":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service":{"type":"string"},"label":{"type":"string"},"key_hint":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"}}},"ScopeResponse":{"type":"object","properties":{"active_workspace_id":{"type":["string","null"],"format":"uuid"},"workspaces":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"RenderVideoRequest":{"type":"object","required":["brief"],"properties":{"template":{"type":"string","maxLength":120},"brand":{"type":"object","additionalProperties":true,"description":"Raw brand context used for routing only; it is not persisted by this endpoint."},"brief":{"type":"string","minLength":3,"maxLength":8000},"format":{"type":"string","enum":["short_video","square_video","story_video","wide_video"],"default":"short_video"},"duration":{"type":"integer","minimum":5,"maximum":180},"run_id":{"type":"string","format":"uuid","description":"Optional marketing run id. When present, Synchronex reuses unchanged scene chunks from `video_scene_chunks`."},"workspace_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"maxLength":120}}},"RenderVideoResponse":{"type":"object","required":["asset_url","render_id","cost_cents"],"properties":{"asset_url":{"type":"string","format":"uri"},"render_id":{"type":"string"},"cost_cents":{"type":"integer","minimum":0}}},"IngestEventRequest":{"type":"object","required":["event_type"],"properties":{"event_type":{"type":"string","maxLength":120},"severity":{"type":"string","enum":["info","warning","error","critical"],"default":"info"},"external_id":{"type":"string","maxLength":255},"idempotency_key":{"type":"string","maxLength":255},"occurred_at":{"type":"string","format":"date-time"},"worker_type":{"type":"string"},"payload":{"type":"object","additionalProperties":true}}},"IngestDatasetRowsRequest":{"type":"object","required":["rows"],"properties":{"mode":{"type":"string","enum":["append","upsert"],"default":"append"},"idempotency_key":{"type":"string","maxLength":255},"owning_worker_type":{"type":"string"},"rows":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","additionalProperties":true}}}},"IngestResponse":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"},"event_id":{"type":["string","null"],"format":"uuid"},"dataset_id":{"type":"string","format":"uuid"},"inserted":{"type":"integer","minimum":0},"deduplicated":{"type":"boolean"}}},"IngestUploadPreviewResponse":{"type":"object","required":["success","upload_id","dataset_name","row_count","inferred_schema","sample_rows"],"properties":{"success":{"type":"boolean"},"upload_id":{"type":"string","format":"uuid"},"dataset_name":{"type":"string"},"row_count":{"type":"integer","minimum":0},"inferred_schema":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","null","object","array"]}}}},"sample_rows":{"type":"array","items":{"type":"object","additionalProperties":true}},"expires_at":{"type":"string","format":"date-time"}}},"IngestUploadConfirmRequest":{"type":"object","required":["upload_id"],"properties":{"upload_id":{"type":"string","format":"uuid"},"dataset_name":{"type":"string","minLength":1,"maxLength":120},"schema_overrides":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","boolean","null","object","array"]}}}},"owning_worker_type":{"type":"string"}}},"ProducibleRenderJobRequest":{"type":"object","required":["format","ir"],"properties":{"output_id":{"type":"string","format":"uuid"},"worker_run_id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"format":{"type":"string","enum":["pdf","docx","pptx","xlsx","csv","svg","html"]},"ir":{"type":"object","additionalProperties":true,"description":"Validated ProducibleIR v1 document tree."}}},"ProducibleRenderJobResponse":{"type":"object","required":["jobId","status"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","rendering","completed","failed"]},"signedUrl":{"type":["string","null"],"format":"uri"},"format":{"type":"string"},"producibleKind":{"type":"string"},"error":{"type":["string","null"]}}},"ProjectSignalIngestRequest":{"type":"object","required":["event_type","title"],"properties":{"event_type":{"type":"string","examples":["build.failed","deploy.succeeded"]},"title":{"type":"string","maxLength":200},"severity":{"type":"string","enum":["info","warning","error"],"default":"info"},"body":{"type":"object","additionalProperties":true},"external_id":{"type":"string","description":"Idempotency key from the source system."}}},"ConnectorIntakeRequest":{"type":"object","required":["raw_content"],"properties":{"ai_vendor":{"type":"string","enum":["chatgpt","claude","gemini","custom"],"default":"custom"},"workspace_id":{"type":["string","null"],"format":"uuid"},"raw_content":{"type":"string","minLength":1,"maxLength":32000},"requested_capability":{"type":["string","null"],"minLength":1,"maxLength":200}}},"ConnectorIntakeResponse":{"type":"object","required":["outcome","ledger_id"],"properties":{"outcome":{"type":"string","enum":["proposed","lead_queued"]},"ledger_id":{"type":"string","format":"uuid"},"proposal_id":{"type":"string","format":"uuid"}}},"SignalPayload":{"type":"object","required":["triggered_at"],"properties":{"triggered_at":{"type":"string","format":"date-time"},"source_url":{"type":["string","null"],"format":"uri"},"metric_key":{"type":["string","null"],"minLength":1,"maxLength":200},"baseline_value":{"type":["number","null"]},"current_value":{"type":["number","null"]},"delta_percent":{"type":["number","null"]},"metadata":{"type":"object","additionalProperties":true,"default":{}}}},"ProducerSignal":{"type":"object","required":["source","signal_type","dedup_key","severity","title","payload","collapse_window_minutes"],"properties":{"source":{"type":"string","enum":["posthog","axiom","sendinel","decision_index","mcp","api","manual"]},"entity_scope":{"type":"string","enum":["user","workspace","brand","product"],"default":"user"},"entity_id":{"type":["string","null"],"minLength":1,"maxLength":500},"signal_type":{"type":"string","minLength":1,"maxLength":200},"dedup_key":{"type":"string","minLength":1,"maxLength":500},"severity":{"type":"string","enum":["info","warning","error","critical"]},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"],"maxLength":4000},"payload":{"$ref":"#/components/schemas/SignalPayload"},"evidence":{"type":"array","items":{"type":"object","additionalProperties":true},"default":[]},"related_decisions":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"confidence_score":{"type":["number","null"],"minimum":0,"maximum":1},"collapse_window_minutes":{"type":"integer","minimum":1,"default":60}}},"SignalIngestRequest":{"type":"object","required":["signals"],"properties":{"workspaceId":{"type":["string","null"],"format":"uuid"},"signals":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/ProducerSignal"}}}},"SignalIngestResponse":{"type":"object","required":["ids","errors"],"properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"}},"errors":{"type":"array","items":{"type":"string"}}}},"InboxDraftAlternative":{"type":"object","additionalProperties":false,"required":["tone","text"],"properties":{"tone":{"type":"string","maxLength":120},"text":{"type":"string","maxLength":50000}}},"InboxThreadDraft":{"type":"object","additionalProperties":false,"required":["thread_id","latest_message_id","latest_message_at","generated_at","why","drafts"],"properties":{"thread_id":{"type":"string","pattern":"^[0-9a-fA-F]+$","maxLength":64},"latest_message_id":{"type":"string","pattern":"^[0-9a-fA-F]+$","maxLength":64},"latest_message_at":{"type":"string","format":"date-time"},"generated_at":{"type":"string","format":"date-time"},"why":{"type":"string","maxLength":2000},"drafts":{"type":"array","minItems":1,"maxItems":5,"items":{"$ref":"#/components/schemas/InboxDraftAlternative"}}}},"InboxDraftsPutRequest":{"type":"object","additionalProperties":false,"required":["account","drafts"],"properties":{"account":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":320}}},"replace":{"type":"boolean","default":true},"drafts":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/InboxThreadDraft"}}}},"InboxDraftsPutResponse":{"type":"object","additionalProperties":false,"required":["upserted","deleted"],"properties":{"upserted":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}}},"InboxDraftsGetResponse":{"oneOf":[{"type":"object","additionalProperties":false,"required":["state","matched_on","drafts","why","latest_message_at","generated_at"],"properties":{"state":{"const":"draft_available"},"matched_on":{"type":"string","enum":["legacy_thread_id","thread_perm_id"]},"drafts":{"type":"array","minItems":1,"maxItems":5,"items":{"$ref":"#/components/schemas/InboxDraftAlternative"}},"why":{"type":"string","maxLength":2000},"latest_message_at":{"type":"string","format":"date-time"},"generated_at":{"type":"string","format":"date-time"}}},{"type":"object","additionalProperties":false,"required":["state","matched_on"],"properties":{"state":{"const":"no_draft"},"matched_on":{"type":"string","enum":["legacy_thread_id","thread_perm_id"]}}},{"type":"object","additionalProperties":false,"required":["state","matched_on"],"properties":{"state":{"const":"indeterminate"},"matched_on":{"type":["string","null"],"enum":["legacy_thread_id","thread_perm_id",null]},"drafts":{"type":"array","minItems":1,"maxItems":5,"items":{"$ref":"#/components/schemas/InboxDraftAlternative"}},"why":{"type":"string","maxLength":2000},"latest_message_at":{"type":"string","format":"date-time"},"generated_at":{"type":"string","format":"date-time"}}}],"discriminator":{"propertyName":"state"}},"Product":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string"}}},"IntelligenceFeedItem":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["decision","state_change","anomaly"]},"product_name":{"type":["string","null"]},"summary":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"severity":{"type":"string"}}},"MemoryConfidenceItem":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"content":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]},"score":{"type":"number"}}}}},"paths":{"/memory/identity":{"get":{"tags":["Memory"],"operationId":"getIdentityKernel","summary":"Get Identity Kernel","description":"Returns the authenticated user identity kernel with a ready-to-inject memory block.","responses":{"200":{"description":"Identity kernel found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityKernelResponse"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Memory"],"operationId":"updateIdentityKernel","summary":"Update Identity Kernel","description":"Partially updates the authenticated user identity kernel. Requires write scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Identity kernel updated.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"token_count":{"type":"integer"},"version":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict. The requested mutation conflicts with current state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memory/product/{name}/state":{"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Memory"],"operationId":"getProductState","summary":"Get Product State","responses":{"200":{"description":"Product state found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductStateResponse"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}}}},"post":{"tags":["Memory"],"operationId":"updateProductState","summary":"Update Product State","description":"Upserts product state for a product owned by the authenticated user. Requires write scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Product state updated.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"product_name":{"type":"string"},"id":{"type":"string","format":"uuid"},"version":{"type":"integer"},"updated_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memory/search":{"get":{"tags":["Memory"],"operationId":"searchMemory","summary":"Search Memory","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"maximum":20}},{"name":"min_similarity","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":1,"default":0.5}},{"name":"include","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated list: decisions,product_states"}}],"responses":{"200":{"description":"Memory search results.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}},"product_states":{"type":"array","items":{"type":"object"}},"count":{"type":"integer"},"total":{"type":"integer"},"search_mode":{"type":"string","enum":["semantic","keyword"]},"query":{"type":"string"},"latency_ms":{"type":"integer"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}}}}},"/memory/export-mif":{"get":{"tags":["Memory"],"operationId":"exportMemoryInterchangeFormat","summary":"Export Memory Interchange Format","description":"Exports Identity Kernel, optional user_corpus, and decisions as versioned MIF 0.1 JSON.","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["identity_only","identity_corpus","full"],"default":"full"}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"download","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"MIF document exported.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryInterchangeFormat"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memory/import-mif":{"post":{"tags":["Memory"],"operationId":"importMemoryInterchangeFormat","summary":"Import Memory Interchange Format","description":"Stages or applies a MIF 0.1 import. Raw text can be normalized into an identity-only MIF import.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mif":{"$ref":"#/components/schemas/MemoryInterchangeFormat"},"raw_content":{"type":"string"},"merge_strategy":{"type":"string","enum":["merge","replace","append"],"default":"merge"},"apply_immediately":{"type":"boolean","default":false},"workspace_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"MIF import accepted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"corpus_imported":{"type":"integer"},"decisions_imported":{"type":"integer"},"conflicts":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memory/consolidate":{"post":{"tags":["Memory"],"operationId":"consolidateMemory","summary":"Run Memory Consolidation","description":"Runs budgeted async-style consolidation outside the injection path and records duplicate/stale-memory candidates.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","format":"uuid"},"compute_budget_tokens":{"type":"integer","minimum":1,"maximum":5000,"default":2000}}}}}},"responses":{"200":{"description":"Consolidation completed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"runId":{"type":"string","format":"uuid"},"corpusDeduplicated":{"type":"integer"},"staleDecisionsFlagged":{"type":"integer"},"redundancyScore":{"type":"number"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memory/decisions/search":{"get":{"tags":["Decisions"],"operationId":"searchDecisions","summary":"Search Decision Index","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"maximum":50}},{"name":"product","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Decision search results.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}},"count":{"type":"integer"},"search_mode":{"type":"string","enum":["semantic","keyword"]},"query":{"type":"string"},"latency_ms":{"type":"integer"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}}}}},"/memory/decisions":{"post":{"tags":["Decisions"],"operationId":"createDecision","summary":"Create Decision","description":"Creates a decision record for an owned product. Requires write scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decision","product_name"],"properties":{"decision":{"type":"string","maxLength":2000},"reasoning":{"type":"string","maxLength":5000},"product_name":{"type":"string","maxLength":100},"affects_products":{"type":"array","items":{"type":"string"},"default":[]}}}}}},"responses":{"201":{"description":"Decision created.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string","format":"uuid"},"decision":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"affects_products":{"type":"array","items":{"type":"string"}},"decided_at":{"type":"string","format":"date-time"},"embedded":{"type":"boolean"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memory/decisions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"delete":{"tags":["Decisions"],"operationId":"deleteDecision","summary":"Delete Decision","description":"Deletes an owned decision. Requires write scope.","responses":{"200":{"description":"Decision deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/{project_id}":{"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"tags":["Signals"],"operationId":"ingestProjectSignal","summary":"Ingest Project Signal","description":"Ingests a project signal from a native webhook, MCP tool, or HMAC-signed REST client. Use X-Synchronex-Signature and X-Synchronex-Timestamp for signed REST ingestion.","parameters":[{"name":"X-Synchronex-Signature","in":"header","required":false,"schema":{"type":"string","pattern":"^sha256="}},{"name":"X-Synchronex-Timestamp","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSignalIngestRequest"}}}},"responses":{"200":{"description":"Signal accepted or idempotent duplicate acknowledged.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"duplicate":{"type":"boolean"},"signal_id":{"type":["string","null"],"format":"uuid"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signals/ingest":{"post":{"tags":["Signals"],"operationId":"ingestSignalBatch","summary":"Ingest Signal Batch","description":"Ingests one to fifty producer signals in a single request. Requires authenticated write access. Signals are validated against the ProducerSignal contract and written independently, so the response may contain both accepted ids and per-signal errors.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalIngestRequest"}}}},"responses":{"201":{"description":"All signals were accepted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalIngestResponse"}}}},"207":{"description":"The batch was partially accepted. Inspect ids and errors for per-signal results.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalIngestResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connectors/intake":{"post":{"tags":["Intake"],"operationId":"submitConnectorIntake","summary":"Submit External AI Command","description":"Accepts an OAuth-authenticated command from an external AI connector and records it as a pending inbound command proposal. Nothing executes directly; approvals stay on first-party human surfaces.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorIntakeRequest"}}}},"responses":{"200":{"description":"Command recorded as a proposal.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorIntakeResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbox/drafts":{"get":{"tags":["Inbox"],"operationId":"getInboxDrafts","summary":"Get Inbox Drafts","description":"Looks up the newest stored draft set for one Gmail thread without running inference. Freshness is compared by message time, never by message id.","parameters":[{"name":"account_email","in":"query","required":true,"schema":{"type":"string","format":"email","maxLength":320}},{"name":"thread_perm_id","in":"query","required":false,"schema":{"type":"string","maxLength":256}},{"name":"legacy_thread_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"message_id","in":"query","required":false,"schema":{"type":"string","maxLength":256}},{"name":"latest_message_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Draft lookup result.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxDraftsGetResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Inbox"],"operationId":"replaceInboxDrafts","summary":"Replace Inbox Drafts","description":"Upserts one Wren draft row per Gmail thread and optionally deletes rows omitted from this mailbox replacement set. Requires write scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxDraftsPutRequest"}}}},"responses":{"200":{"description":"Draft replacement set stored.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxDraftsPutResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai/costs":{"get":{"tags":["Costs"],"operationId":"getAiCosts","summary":"Get AI Cost Summary","description":"Returns AI usage cost totals. Requires Pro or Managed tier.","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"maximum":90}}],"responses":{"200":{"description":"Cost summary.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostSummary"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}}}}},"/ai/costs/{product}":{"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Costs"],"operationId":"getProductAiCosts","summary":"Get Product AI Costs","description":"Returns AI usage cost totals for a single owned product. Requires Pro or Managed tier.","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"maximum":90}}],"responses":{"200":{"description":"Product cost summary.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CostSummary"},{"type":"object","properties":{"product_name":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}}}}},"/byok":{"get":{"tags":["BYOK"],"operationId":"listByokCredentials","summary":"List BYOK Credentials","description":"Lists encrypted BYOK credentials without raw secret values. Requires Pro or Managed tier.","responses":{"200":{"description":"Credential list.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"type":"array","items":{"$ref":"#/components/schemas/ByokCredential"}}}}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["BYOK"],"operationId":"createByokCredential","summary":"Create BYOK Credential","description":"Encrypts and stores a BYOK credential. Requires write scope and Pro or Managed tier.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["service","label","key"],"properties":{"service":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"}}}}}},"responses":{"201":{"description":"Credential stored.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"credential":{"$ref":"#/components/schemas/ByokCredential"},"message":{"type":"string"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict. The requested mutation conflicts with current state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/byok/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"delete":{"tags":["BYOK"],"operationId":"deleteByokCredential","summary":"Delete BYOK Credential","description":"Deletes an owned BYOK credential. Requires write scope and Pro or Managed tier.","responses":{"200":{"description":"Credential deleted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"id":{"type":"string","format":"uuid"}}}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/kernel/export":{"get":{"tags":["Kernel"],"operationId":"exportKernelGet","summary":"Export Active Kernel","parameters":[{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["claude-md","agents-md","gemini-md","cursorrules","chatgpt-instructions","raw"]}},{"name":"product","in":"query","required":false,"schema":{"type":"string"}},{"name":"budget","in":"query","required":false,"schema":{"type":"integer"}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Kernel export body. Content type depends on selected format.","headers":{"X-Synchronex-Kernel-Warnings":{"description":"Semicolon-delimited merge warnings.","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Kernel"],"operationId":"exportKernelPost","summary":"Export Active Kernel","description":"POST alias for clients that prefer tool-style calls. Query parameters are the same as GET.","responses":{"200":{"description":"Kernel export body."},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scope":{"get":{"tags":["Scope"],"operationId":"getScope","summary":"Get Active Scope","responses":{"200":{"description":"Current active workspace and reachable workspaces.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeResponse"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}}}},"patch":{"tags":["Scope"],"operationId":"setScope","summary":"Set Active Scope","description":"Sets the active workspace after validating the caller can reach it. Requires write scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id"],"properties":{"workspace_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Scope updated.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"active_workspace_id":{"type":["string","null"],"format":"uuid"}}}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}}}}},"/ingest/events":{"post":{"tags":["Ingest"],"operationId":"ingestBusinessEvent","summary":"Ingest Business Event","description":"Accepts event-shaped business data using a hashed `sx_ingest_*` key. `kpi.snapshot` events also attempt the KPI snapshot fast path.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestEventRequest"}}}},"responses":{"200":{"description":"Event ingested.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/datasets/{name}/rows":{"post":{"tags":["Ingest"],"operationId":"ingestDatasetRows","summary":"Ingest Dataset Rows","description":"Appends or upserts tabular business rows into a named dataset using a hashed `sx_ingest_*` key.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestDatasetRowsRequest"}}}},"responses":{"200":{"description":"Dataset rows ingested.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/upload":{"post":{"tags":["Ingest"],"operationId":"previewDatasetFileUpload","summary":"Preview Dataset File Upload","description":"Accepts a CSV or XLSX file using a hashed `sx_ingest_*` key, infers schema, and returns sample rows. No database rows are written until `/ingest/upload/confirm` is called.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","dataset_name"],"properties":{"file":{"type":"string","format":"binary"},"dataset_name":{"type":"string","minLength":1,"maxLength":120},"source_kind":{"type":"string","enum":["file"],"default":"file"},"owning_worker_type":{"type":"string"}}}}}},"responses":{"200":{"description":"Upload parsed and ready for confirmation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestUploadPreviewResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ingest/upload/confirm":{"post":{"tags":["Ingest"],"operationId":"confirmDatasetFileUpload","summary":"Confirm Dataset File Upload","description":"Confirms a recent upload preview and writes the parsed rows into `datasets` and `dataset_rows`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestUploadConfirmRequest"}}}},"responses":{"200":{"description":"Dataset upload confirmed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bridge/status":{"get":{"tags":["Bridge"],"operationId":"getAgentBridgeStatus","summary":"Get Agent Bridge Status","description":"Returns redacted Bridge availability for the API-key owner. This endpoint accepts only first-party Synchronex API keys (`sx_live_*` or `sx_test_*`); OAuth and delegated-agent tokens are forbidden.","security":[{"SynchronexApiKey":[]}],"responses":{"200":{"description":"Current bridge availability.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["available","status","detected_clis"],"properties":{"available":{"type":"boolean"},"status":{"type":"string","enum":["online","unavailable"]},"detected_clis":{"type":"array","items":{"type":"string","enum":["anthropic","openai","gemini","cursor"]}}}}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bridge/generate":{"post":{"tags":["Bridge"],"operationId":"createAgentBridgeGeneration","summary":"Queue or Run Agent Bridge Generation","description":"Queues text generation on the user-owned local bridge when a matching CLI is live. If no bridge is reachable and the caller does not require a specific provider, falls back through the managed/BYOK generation gateway.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_prompt"],"properties":{"system_prompt":{"type":"string","maxLength":12000},"user_prompt":{"type":"string","minLength":1,"maxLength":40000},"purpose":{"type":"string","minLength":1,"maxLength":120,"default":"portfolio_bridge_generate"},"tier":{"type":"string","enum":["haiku","sonnet","opus","frontier"],"default":"sonnet"},"provider":{"type":"string","enum":["anthropic","openai","gemini","cursor"]},"workspace_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"format":"uuid"},"max_tokens":{"type":"integer","minimum":128,"maximum":8000},"images":{"type":"array","maxItems":8,"items":{"type":"object","required":["name","url"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"url":{"type":"string","format":"uri"}}}}}}}}},"responses":{"200":{"description":"Generation completed through managed/BYOK fallback.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["job_id","status","source","result"],"properties":{"job_id":{"type":"null"},"status":{"type":"string","enum":["completed"]},"source":{"type":"string","enum":["bridge","managed"]},"provider":{"type":"string"},"model":{"type":["string","null"]},"result":{"type":"object","properties":{"text":{"type":"string"}}}}}}}},"202":{"description":"Generation queued on the user-owned local bridge.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["job_id","status","status_url","source","provider"],"properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued"]},"status_url":{"type":"string"},"source":{"type":"string","enum":["bridge"]},"provider":{"type":"string","enum":["anthropic","openai","gemini","cursor"]},"model":{"type":["string","null"]}}}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No matching local bridge session is available and managed/BYOK fallback is unavailable.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bridge/generate/{jobId}":{"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Bridge"],"operationId":"getAgentBridgeGenerationStatus","summary":"Get Agent Bridge Generation Status","description":"Polls a bridge generation job owned by the authenticated user until it reaches completed, failed, cancelled, or expired.","responses":{"200":{"description":"Current bridge generation job state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["job_id","status","source","result","error"],"properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","completed","failed","cancelled","expired"]},"source":{"type":"string","enum":["bridge"]},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"result":{"type":["object","null"],"properties":{"text":{"type":"string"}}},"error":{"type":["string","null"]}}}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/render/video":{"post":{"tags":["Render"],"operationId":"renderMarketingVideo","summary":"Render Marketing Video","description":"Queues a Remotion-backed marketing video render for Sendinel and first-party clients. Requires write scope when called with a Synchronex API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderVideoRequest"}}}},"responses":{"200":{"description":"Video render completed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderVideoResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Video renderer is not configured or temporarily unavailable.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/render/producibles/jobs":{"post":{"tags":["Render"],"operationId":"queueProducibleRenderJob","summary":"Queue Producible Render Job","description":"Queues a worker producible render from validated IR, uploads the resulting file to private Supabase Storage, and attaches the signed asset to worker_outputs when output_id is provided.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProducibleRenderJobRequest"}}}},"responses":{"202":{"description":"Producible render job queued.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProducibleRenderJobResponse"}}}},"400":{"description":"Validation error. The request body or query string is invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The token scope or account tier is insufficient.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/render/producibles/jobs/{jobId}/status":{"get":{"tags":["Render"],"operationId":"getProducibleRenderJobStatus","summary":"Get Producible Render Job Status","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Current producible render job state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProducibleRenderJobResponse"}}}},"401":{"description":"Unauthorized. Missing, malformed, expired, or revoked bearer token.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not owned by the authenticated user.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Retry after the indicated reset time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceeded"}}}},"503":{"description":"Render job storage or table is unavailable.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/kernel":{"get":{"tags":["Memory"],"security":[{"bearerAuth":[]}],"summary":"Retrieve identity kernel","description":"Alias for retrieving the authenticated user identity kernel.","responses":{"200":{"description":"Identity kernel response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityKernelResponse"}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Memory"],"security":[{"bearerAuth":[]}],"summary":"Update identity kernel","description":"Updates the authenticated user identity kernel.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Identity kernel updated.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decisions":{"get":{"tags":["Decisions"],"security":[{"bearerAuth":[]}],"summary":"List decisions","description":"Lists decision-index records for the authenticated user.","parameters":[{"name":"product_name","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Decision list.","content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}}}}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Decisions"],"security":[{"bearerAuth":[]}],"summary":"Create decision","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decision"],"properties":{"decision":{"type":"string"},"reasoning":{"type":"string"},"product_name":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Decision created.","content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"$ref":"#/components/schemas/Decision"}}}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"tags":["Products"],"security":[{"bearerAuth":[]}],"summary":"List products","responses":{"200":{"description":"Product list.","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Products"],"security":[{"bearerAuth":[]}],"summary":"Create product","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"}}}}}},"responses":{"201":{"description":"Product created.","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/intelligence/feed":{"get":{"tags":["Intelligence"],"security":[{"bearerAuth":[]}],"summary":"Cross-product intelligence feed","responses":{"200":{"description":"Merged intelligence feed.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IntelligenceFeedItem"}}}}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/context/export":{"get":{"tags":["Memory"],"security":[{"bearerAuth":[]}],"summary":"Export context","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["claude","agents","cursor","chatgpt","json"]}}],"responses":{"200":{"description":"Context export attachment.","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memory/confidence":{"get":{"tags":["Memory"],"security":[{"bearerAuth":[]}],"summary":"Memory confidence scores","parameters":[{"name":"product_name","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Scored memory list.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MemoryConfidenceItem"}}}}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/handoff":{"post":{"tags":["Sessions"],"security":[{"bearerAuth":[]}],"summary":"Create session handoff","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Session handoff.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Sessions"],"security":[{"bearerAuth":[]}],"summary":"Get session handoff","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Session handoff.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request body or query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Bearer authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The caller lacks scope, ownership, or tier access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}