{"info":{"description":"Product-scoped subscriber authentication, Membership, and billing API. Request schemas are also enforced at runtime.","title":"Billing Core API","version":"f5b20360ebf38f70899f3e68e6b226075528a62d"},"openapi":"3.1.0","servers":[{"url":"https://api.expertschat.net"}],"components":{"securitySchemes":{"cookieAuth":{"in":"cookie","name":"billing_session","type":"apiKey"},"serviceBearerAuth":{"bearerFormat":"opaque","scheme":"bearer","type":"http"},"supportBearerAuth":{"bearerFormat":"bcs_ opaque Support credential","description":"Revocable Support credential. PostgreSQL mailbox routes require mailboxes:admin and enforce its optional Product scope.","scheme":"bearer","type":"http"},"publicIntakeBearerAuth":{"bearerFormat":"opaque-public-intake","description":"The 256-bit opaque public intake capability returned by intake creation.","scheme":"bearer","type":"http"}},"schemas":{},"parameters":{}},"paths":{"/api/v1/public/landing-content-assets/{id}/{languageCode}/{contentHash}/{filename}":{"get":{"operationId":"getPublicLandingContentAsset","tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"required":true,"name":"contentHash","in":"path"},{"schema":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*\\.(?:avif|gif|jpg|png|webp)$"},"required":true,"name":"filename","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":true,"name":"languageCode","in":"path"}],"responses":{"200":{"description":"Returns an immutable content-addressed Landing Content image.","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The public asset path is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The immutable Landing Content image was not found."}}},"head":{"operationId":"headPublicLandingContentAsset","tags":["Landing Pages"],"parameters":[{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"required":true,"name":"contentHash","in":"path"},{"schema":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*\\.(?:avif|gif|jpg|png|webp)$"},"required":true,"name":"filename","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":true,"name":"languageCode","in":"path"}],"responses":{"200":{"description":"Returns an immutable content-addressed Landing Content image.","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The public asset path is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The immutable Landing Content image was not found."}}}},"/health":{"get":{"description":"Reports process health without accessing PostgreSQL.","operationId":"getHealth","tags":["Operations"],"responses":{"200":{"description":"Worker is running.","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["local","review","staging","production"]},"service":{"type":"string","enum":["billing-v2-api"]},"status":{"type":"string","enum":["ok"]},"version":{"type":"string","minLength":1,"maxLength":128}},"required":["environment","service","status","version"],"additionalProperties":false}}}},"400":{"description":"The request query is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/ready":{"get":{"description":"Checks that the Worker can reach PostgreSQL.","operationId":"getReadiness","tags":["Operations"],"responses":{"200":{"description":"Worker and PostgreSQL are ready.","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["local","review","staging","production"]},"service":{"type":"string","enum":["billing-v2-api"]},"status":{"type":"string","enum":["ready"]},"version":{"type":"string","minLength":1,"maxLength":128}},"required":["environment","service","status","version"],"additionalProperties":false}}}},"400":{"description":"The request query is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"PostgreSQL is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/internal/analytics/facts":{"post":{"description":"Accepts validated web or app facts from trusted producers and publishes them to the isolated analytics Queue. Final conversion facts use event 103, require cost to equal amount, and require zero Affiliate payout when scrubbed.","operationId":"ingestAnalyticsFacts","tags":["Internal","Analytics"],"parameters":[{"schema":{"type":"string","pattern":"^Bearer [A-Za-z0-9_-]{32,255}$"},"required":true,"name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"table":{"type":"string","enum":["event"]},"row":{"type":"object","properties":{"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"source_id":{"type":"string","enum":["web","app"]},"event_datetime":{"type":"string","format":"date-time"},"event_type_id":{"type":"integer","minimum":0},"subscription_datetime":{"type":["string","null"],"format":"date-time","default":null},"user_id":{"type":"integer","minimum":0,"default":0},"product_id":{"type":"integer","minimum":0,"default":0},"mobile_app_id":{"type":"integer","minimum":0,"default":0},"company_id":{"type":"integer","minimum":0,"default":0},"country_id":{"type":"integer","minimum":0,"default":0},"language_id":{"type":"integer","minimum":0,"default":0},"subscription_plan_id":{"type":"integer","minimum":0,"default":0},"network_account_id":{"type":"integer","minimum":0,"default":0},"network_id":{"type":"integer","minimum":0,"default":0},"campaign_id":{"type":"integer","minimum":0,"default":0},"adgroup_id":{"type":"integer","minimum":0,"default":0},"creative_id":{"type":"integer","minimum":0,"default":0},"keyword_id":{"type":"integer","minimum":0,"default":0},"match_type":{"type":"string","maxLength":16,"default":""},"ad_position":{"type":"string","maxLength":32,"default":""},"placement_id":{"type":"integer","minimum":0,"default":0},"click_id":{"type":"string","maxLength":255,"default":""},"visitor_id":{"type":"string","maxLength":255,"default":""},"affiliate_id":{"type":"integer","minimum":0,"default":0},"funnel_id":{"type":"integer","minimum":0,"default":0},"marketing_domain_id":{"type":"integer","minimum":0,"default":0},"advertiser_id":{"type":"integer","minimum":0,"default":0},"offer_id":{"type":"integer","minimum":0,"default":0},"offer_type_id":{"type":"integer","minimum":0,"default":0},"prelanding_landing_design_id":{"type":"integer","minimum":0,"default":0},"checkout_landing_design_id":{"type":"integer","minimum":0,"default":0},"revenue":{"type":"integer","default":0},"cost":{"type":"integer","default":0},"amount":{"type":"integer","default":0},"fee":{"type":"integer","default":0},"payment_number":{"type":"integer","minimum":0,"default":0},"conversion_transaction_id":{"type":"string","maxLength":255,"default":""},"cc_brand":{"type":"string","maxLength":32,"default":""},"cc_first6":{"type":"string","pattern":"^(|[0-9]{6})$","default":""},"cc_last4":{"type":"string","pattern":"^(|[0-9]{4})$","default":""},"threeds":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"threeds_protocol_version":{"type":"string","maxLength":32,"default":""},"merchant_id":{"type":"integer","minimum":0,"default":0},"gateway_id":{"type":"integer","minimum":0,"default":0},"acquirer_id":{"type":"integer","minimum":0,"default":0},"user_agent_id":{"type":"integer","minimum":0,"default":0},"user_agent":{"type":"string","maxLength":500,"default":""},"user_agent_browser_id":{"type":"integer","minimum":0,"default":0},"user_agent_browser_version":{"type":"string","maxLength":64,"default":""},"user_agent_engine_id":{"type":"integer","minimum":0,"default":0},"user_agent_engine_version":{"type":"string","maxLength":64,"default":""},"user_agent_os_id":{"type":"integer","minimum":0,"default":0},"user_agent_os_version":{"type":"string","maxLength":64,"default":""},"user_agent_device_id":{"type":"integer","minimum":0,"default":0},"user_agent_cpu_id":{"type":"integer","minimum":0,"default":0},"user_agent_is_mobile":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"user_agent_is_bot":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"ip":{"type":"string","maxLength":64,"default":""},"source":{"type":"string","maxLength":100,"default":""},"unsubscription_flow_id":{"type":"integer","minimum":0,"default":0},"is_adjustment":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"chargeback_alert_source":{"type":"string","maxLength":64,"default":""},"is_rdr":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0}},"required":["event_id","trace_id","source_id","event_datetime","event_type_id"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["ad_spend"]},"row":{"type":"object","properties":{"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"source_id":{"type":"string","enum":["web","app"]},"event_datetime":{"type":"string","format":"date-time"},"report_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"event_type_id":{"anyOf":[{"type":"number","enum":[100]},{"type":"number","enum":[101]}]},"network_account_id":{"type":"integer","minimum":0,"default":0},"network_id":{"type":"integer","minimum":0,"default":0},"campaign_id":{"type":"integer","minimum":0,"default":0},"adgroup_id":{"type":"integer","minimum":0,"default":0},"creative_id":{"type":"integer","minimum":0,"default":0},"keyword_id":{"type":"integer","minimum":0,"default":0},"match_type":{"type":"string","maxLength":16,"default":""},"ad_position":{"type":"string","maxLength":32,"default":""},"placement_id":{"type":"integer","minimum":0,"default":0},"click_id":{"type":"string","maxLength":255,"default":""},"visitor_id":{"type":"string","maxLength":255,"default":""},"affiliate_id":{"type":"integer","minimum":0,"default":0},"funnel_id":{"type":"integer","minimum":0,"default":0},"marketing_domain_id":{"type":"integer","minimum":0,"default":0},"advertiser_id":{"type":"integer","minimum":0,"default":0},"offer_id":{"type":"integer","minimum":0,"default":0},"offer_type_id":{"type":"integer","minimum":0,"default":0},"prelanding_landing_design_id":{"type":"integer","minimum":0,"default":0},"checkout_landing_design_id":{"type":"integer","minimum":0,"default":0},"mobile_app_id":{"type":"integer","minimum":0,"default":0},"country_id":{"type":"integer","minimum":0,"default":0},"is_custom_event":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"quality_score":{"type":"integer","minimum":0,"default":0},"impressions":{"type":"integer","minimum":0,"default":0},"clicks":{"type":"integer","minimum":0,"default":0},"conversions":{"type":"integer","minimum":0,"default":0},"revenue":{"type":"integer","default":0},"cost":{"type":"integer","default":0},"amount":{"type":"integer","default":0},"fee":{"type":"integer","default":0}},"required":["event_id","trace_id","source_id","event_datetime","event_type_id"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["ad_revenue"]},"row":{"type":"object","properties":{"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"source_id":{"type":"string","enum":["web","app"]},"event_datetime":{"type":"string","format":"date-time"},"event_type_id":{"type":"number","enum":[102]},"subscription_datetime":{"type":["string","null"],"format":"date-time","default":null},"user_id":{"type":"integer","minimum":0,"default":0},"product_id":{"type":"integer","minimum":0,"default":0},"mobile_app_id":{"type":"integer","minimum":0,"default":0},"company_id":{"type":"integer","minimum":0,"default":0},"country_id":{"type":"integer","minimum":0,"default":0},"language_id":{"type":"integer","minimum":0,"default":0},"subscription_plan_id":{"type":"integer","minimum":0,"default":0},"network_account_id":{"type":"integer","minimum":0,"default":0},"network_id":{"type":"integer","minimum":0,"default":0},"campaign_id":{"type":"integer","minimum":0,"default":0},"adgroup_id":{"type":"integer","minimum":0,"default":0},"creative_id":{"type":"integer","minimum":0,"default":0},"keyword_id":{"type":"integer","minimum":0,"default":0},"match_type":{"type":"string","maxLength":16,"default":""},"ad_position":{"type":"string","maxLength":32,"default":""},"placement_id":{"type":"integer","minimum":0,"default":0},"click_id":{"type":"string","maxLength":255,"default":""},"visitor_id":{"type":"string","maxLength":255,"default":""},"affiliate_id":{"type":"integer","minimum":0,"default":0},"funnel_id":{"type":"integer","minimum":0,"default":0},"marketing_domain_id":{"type":"integer","minimum":0,"default":0},"advertiser_id":{"type":"integer","minimum":0,"default":0},"offer_id":{"type":"integer","minimum":0,"default":0},"offer_type_id":{"type":"integer","minimum":0,"default":0},"prelanding_landing_design_id":{"type":"integer","minimum":0,"default":0},"checkout_landing_design_id":{"type":"integer","minimum":0,"default":0},"ad_impressions_count":{"type":"integer","minimum":0,"default":0},"revenue":{"type":"integer","default":0},"cost":{"type":"integer","default":0},"amount":{"type":"integer","default":0},"fee":{"type":"integer","default":0}},"required":["event_id","trace_id","source_id","event_datetime","event_type_id"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["agent_turn"]},"row":{"type":"object","properties":{"event_datetime":{"type":"string","format":"date-time"},"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"agent_mode":{"type":"string","enum":["keyword","triage"]},"actor":{"type":"string","enum":["expert_ai","triage"]},"conversation_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"product_id":{"type":"integer","minimum":0},"source":{"type":"string","enum":["dashboard","landing"]},"subscriber_user_id":{"type":"integer","minimum":0},"attachment_count":{"type":"integer","minimum":0,"maximum":4},"buffered":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":1000000},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":1000000},"container_started":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"duration_ms":{"type":"integer","minimum":0},"engine_version":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"estimated_cost_microusd":{"type":"integer","minimum":0},"execution_tier":{"type":"string","enum":["direct_model","worker","justbash","linux"]},"failed_tool_call_count":{"type":"integer","minimum":0,"maximum":1000000},"guardrail_decision":{"type":"string","enum":["allow","rewrite","block"]},"input_tokens":{"type":"integer","minimum":0,"maximum":1000000},"model":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$"},"operation":{"type":"string","enum":["answer","analyze_attachment","web_search","generate_csv","generate_json","generate_markdown","generate_text","generate_xlsx","combine_csv","filter_csv","filter_text","query_json","transform_text","browser_render","convert_document","imagemagick","native_tool","ocr","pandas"]},"output_tokens":{"type":"integer","minimum":0,"maximum":1000000},"policy_version":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"prompt_version":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"review_count":{"type":"integer","minimum":0,"maximum":100},"rewrite_count":{"type":"integer","minimum":0,"maximum":100},"risk_level":{"type":"string","enum":["low","medium","high","critical"]},"sandbox_avoided":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"submission_id":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"telemetry_version":{"type":"number","enum":[1]},"tool_call_count":{"type":"integer","minimum":0,"maximum":1000000},"tool_names":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9._:-]{0,99}$"},"maxItems":100},"total_tokens":{"type":"integer","minimum":0,"maximum":1000000}},"required":["event_datetime","event_id","trace_id","agent_mode","actor","conversation_id","message_id","product_id","source","subscriber_user_id","attachment_count","buffered","cache_read_tokens","cache_write_tokens","container_started","duration_ms","engine_version","estimated_cost_microusd","execution_tier","failed_tool_call_count","guardrail_decision","input_tokens","model","operation","output_tokens","policy_version","prompt_version","review_count","rewrite_count","risk_level","sandbox_avoided","submission_id","telemetry_version","tool_call_count","tool_names","total_tokens"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["agent_security_event"]},"row":{"type":"object","properties":{"event_datetime":{"type":"string","format":"date-time"},"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"agent_mode":{"type":"string","enum":["keyword","triage"]},"actor":{"type":"string","enum":["expert_ai","triage"]},"conversation_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"product_id":{"type":"integer","minimum":0},"source":{"type":"string","enum":["dashboard","landing"]},"subscriber_user_id":{"type":"integer","minimum":0},"agent_turn_event_id":{"type":"string","minLength":1,"maxLength":255},"blocked_reason":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"buffered":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"guardrail_decision":{"type":"string","enum":["allow","rewrite","block"]},"judge_latency_ms":{"type":"integer","minimum":0},"judge_model":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$"},{"type":"string","enum":[""]}]},"execution_tier":{"anyOf":[{"type":"string","enum":["direct_model","worker","justbash","linux"]},{"type":"string","enum":[""]}]},"policy_codes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policy_version":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"requires_buffered_response":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"requires_judge":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"review_count":{"type":"integer","minimum":0,"maximum":100},"rewrite_count":{"type":"integer","minimum":0,"maximum":100},"risk_categories":{"type":"array","items":{"type":"string","enum":["code_execution","credential_exfiltration","cross_user_data","dangerous_activity","dangerous_artifact","financial_high_risk","legal_high_risk","limit_evasion","malware","medical_emergency","medical_high_risk","minor_safety","network_access","prompt_injection","self_harm","system_prompt_extraction","untrusted_attachment","violence"]},"maxItems":18},"risk_level":{"type":"string","enum":["low","medium","high","critical"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submission_id":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"tool_name":{"type":"string","pattern":"^(?:|[A-Za-z][A-Za-z0-9._:-]{0,99})$"}},"required":["event_datetime","event_id","trace_id","agent_mode","actor","conversation_id","message_id","product_id","source","subscriber_user_id","agent_turn_event_id","blocked_reason","buffered","guardrail_decision","judge_latency_ms","judge_model","execution_tier","policy_codes","policy_version","requires_buffered_response","requires_judge","review_count","rewrite_count","risk_categories","risk_level","stage","submission_id","tool_name"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["agent_evaluation"]},"row":{"type":"object","properties":{"event_datetime":{"type":"string","format":"date-time"},"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"agent_mode":{"type":"string","enum":["keyword","triage"]},"actor":{"type":"string","enum":["expert_ai","triage"]},"conversation_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"product_id":{"type":"integer","minimum":0},"source":{"type":"string","enum":["dashboard","landing"]},"subscriber_user_id":{"type":"integer","minimum":0},"agent_turn_event_id":{"type":"string","minLength":1,"maxLength":255},"attachment_use_score":{"type":["integer","null"],"minimum":0,"maximum":100},"correctness_score":{"type":["integer","null"],"minimum":0,"maximum":100},"evaluation_duration_ms":{"type":"integer","minimum":0},"evaluation_codes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"evaluation_trigger":{"type":"string","enum":["error","sample","security","tool"]},"evaluation_version":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"evaluator_model":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$"},"groundedness_score":{"type":["integer","null"],"minimum":0,"maximum":100},"handoff_score":{"type":["integer","null"],"minimum":0,"maximum":100},"helpfulness_score":{"type":["integer","null"],"minimum":0,"maximum":100},"instruction_following_score":{"type":["integer","null"],"minimum":0,"maximum":100},"outcome":{"type":"string","enum":["pass","fail","review"]},"safety_score":{"type":["integer","null"],"minimum":0,"maximum":100},"sample_bucket":{"type":"integer","minimum":0,"maximum":9999},"tone_score":{"type":["integer","null"],"minimum":0,"maximum":100},"triage_score":{"type":["integer","null"],"minimum":0,"maximum":100},"uncertainty_score":{"type":["integer","null"],"minimum":0,"maximum":100}},"required":["event_datetime","event_id","trace_id","agent_mode","actor","conversation_id","message_id","product_id","source","subscriber_user_id","agent_turn_event_id","attachment_use_score","correctness_score","evaluation_duration_ms","evaluation_codes","evaluation_trigger","evaluation_version","evaluator_model","groundedness_score","handoff_score","helpfulness_score","instruction_following_score","outcome","safety_score","sample_bucket","tone_score","triage_score","uncertainty_score"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["ai_model_call"]},"row":{"type":"object","properties":{"event_datetime":{"type":"string","format":"date-time"},"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"agent_mode":{"type":"string","enum":["keyword","triage"]},"conversation_id":{"type":"string","format":"uuid"},"product_id":{"type":"integer","minimum":0},"source":{"type":"string","enum":["dashboard","landing"]},"subscriber_user_id":{"type":"integer","minimum":0},"cache_read_tokens":{"type":"integer","minimum":0,"maximum":1000000},"cache_write_tokens":{"type":"integer","minimum":0,"maximum":1000000},"charge_scope":{"type":"string","enum":["customer","platform"]},"duration_ms":{"type":"integer","minimum":0},"error_class":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"estimated_cost_microusd":{"type":"integer","minimum":0},"gateway_cost_microusd":{"type":["integer","null"],"minimum":0},"gateway_log_id":{"type":"string","maxLength":255},"input_tokens":{"type":"integer","minimum":0,"maximum":1000000},"model":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$"},"output_tokens":{"type":"integer","minimum":0,"maximum":1000000},"provider":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$"},"purpose":{"type":"string","enum":["agent","compaction","compaction_prefix","safety","web_search","title","evaluation"]},"status":{"type":"string","enum":["success","error","blocked"]},"submission_id":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"total_tokens":{"type":"integer","minimum":0,"maximum":1000000},"turn_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}},"required":["event_datetime","event_id","trace_id","agent_mode","conversation_id","product_id","source","subscriber_user_id","cache_read_tokens","cache_write_tokens","charge_scope","duration_ms","error_class","estimated_cost_microusd","gateway_cost_microusd","gateway_log_id","input_tokens","model","output_tokens","provider","purpose","status","submission_id","total_tokens","turn_id"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["agent_outcome"]},"row":{"type":"object","properties":{"conversation_id":{"type":"string","format":"uuid"},"event_datetime":{"type":"string","format":"date-time"},"event_id":{"type":"string","minLength":1,"maxLength":255},"event_type":{"type":"string","enum":["triage_completed","signup_completed","expert_first_response","artifact_delivered","customer_continued","customer_returned","human_requested","human_paused","human_started","human_connected","human_failed","feedback_positive","feedback_negative","inactive"]},"product_id":{"type":"integer","minimum":0},"reason":{"type":"string","enum":["professional_selected","checkout_completed","first_expert_response","artifact_published","expert_followup","inactivity_elapsed","customer_requested","checkout_activated","ai_resumed","agent_signal_failed","membership_unavailable","consultation_limit_reached","delay_elapsed","pearl_message_received","pearl_dispatch_failed","user_feedback","inactivity_timeout"]},"source":{"type":"string","enum":["dashboard","landing"]},"subscriber_user_id":{"type":"integer","minimum":0},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"version":{"type":"number","enum":[1]}},"required":["conversation_id","event_datetime","event_id","event_type","product_id","reason","source","subscriber_user_id","trace_id","version"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["conversion"]},"row":{"type":"object","properties":{"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"source_id":{"type":"string","enum":["web","app"]},"event_datetime":{"type":"string","format":"date-time"},"event_type_id":{"type":"number","enum":[103]},"subscription_datetime":{"type":["string","null"],"format":"date-time","default":null},"user_id":{"type":"integer","minimum":0,"default":0},"product_id":{"type":"integer","minimum":0,"default":0},"mobile_app_id":{"type":"integer","minimum":0,"default":0},"company_id":{"type":"integer","minimum":0,"default":0},"country_id":{"type":"integer","minimum":0,"default":0},"language_id":{"type":"integer","minimum":0,"default":0},"subscription_plan_id":{"type":"integer","minimum":0,"default":0},"network_account_id":{"type":"integer","minimum":0,"default":0},"network_id":{"type":"integer","minimum":0,"default":0},"campaign_id":{"type":"integer","minimum":0,"default":0},"adgroup_id":{"type":"integer","minimum":0,"default":0},"creative_id":{"type":"integer","minimum":0,"default":0},"keyword_id":{"type":"integer","minimum":0,"default":0},"match_type":{"type":"string","maxLength":16,"default":""},"ad_position":{"type":"string","maxLength":32,"default":""},"placement_id":{"type":"integer","minimum":0,"default":0},"click_id":{"type":"string","maxLength":255,"default":""},"visitor_id":{"type":"string","maxLength":255,"default":""},"affiliate_id":{"type":"integer","minimum":0,"default":0},"funnel_id":{"type":"integer","minimum":0,"default":0},"marketing_domain_id":{"type":"integer","minimum":0,"default":0},"advertiser_id":{"type":"integer","minimum":0,"default":0},"offer_id":{"type":"integer","minimum":0,"default":0},"offer_type_id":{"type":"integer","minimum":0,"default":0},"prelanding_landing_design_id":{"type":"integer","minimum":0,"default":0},"checkout_landing_design_id":{"type":"integer","minimum":0,"default":0},"user_agent_id":{"type":"integer","minimum":0,"default":0},"user_agent":{"type":"string","maxLength":500,"default":""},"user_agent_browser_id":{"type":"integer","minimum":0,"default":0},"user_agent_browser_version":{"type":"string","maxLength":64,"default":""},"user_agent_engine_id":{"type":"integer","minimum":0,"default":0},"user_agent_engine_version":{"type":"string","maxLength":64,"default":""},"user_agent_os_id":{"type":"integer","minimum":0,"default":0},"user_agent_os_version":{"type":"string","maxLength":64,"default":""},"user_agent_device_id":{"type":"integer","minimum":0,"default":0},"user_agent_cpu_id":{"type":"integer","minimum":0,"default":0},"user_agent_is_mobile":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"user_agent_is_bot":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"ip":{"type":"string","maxLength":64,"default":""},"scrubbed":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"revenue":{"type":"integer","default":0},"cost":{"type":"integer","default":0},"amount":{"type":"integer","default":0},"fee":{"type":"integer","default":0}},"required":["event_id","trace_id","source_id","event_datetime","event_type_id","scrubbed"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false},{"type":"object","properties":{"table":{"type":"string","enum":["impression"]},"row":{"type":"object","properties":{"event_id":{"type":"string","minLength":1,"maxLength":255},"trace_id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"source_id":{"type":"string","enum":["web","app"]},"event_datetime":{"type":"string","format":"date-time"},"event_type_id":{"anyOf":[{"type":"number","enum":[104]},{"type":"number","enum":[105]},{"type":"number","enum":[106]},{"type":"number","enum":[108]}]},"impression_type":{"type":"string","enum":["prelanding","checkout","offer"]},"network_account_id":{"type":"integer","minimum":0,"default":0},"network_id":{"type":"integer","minimum":0,"default":0},"campaign_id":{"type":"integer","minimum":0,"default":0},"adgroup_id":{"type":"integer","minimum":0,"default":0},"creative_id":{"type":"integer","minimum":0,"default":0},"keyword_id":{"type":"integer","minimum":0,"default":0},"match_type":{"type":"string","maxLength":16,"default":""},"ad_position":{"type":"string","maxLength":32,"default":""},"placement_id":{"type":"integer","minimum":0,"default":0},"click_id":{"type":"string","maxLength":255,"default":""},"visitor_id":{"type":"string","maxLength":255,"default":""},"affiliate_id":{"type":"integer","minimum":0,"default":0},"funnel_id":{"type":"integer","minimum":0,"default":0},"marketing_domain_id":{"type":"integer","minimum":0,"default":0},"advertiser_id":{"type":"integer","minimum":0,"default":0},"offer_id":{"type":"integer","minimum":0,"default":0},"offer_type_id":{"type":"integer","minimum":0,"default":0},"prelanding_landing_design_id":{"type":"integer","minimum":0,"default":0},"checkout_landing_design_id":{"type":"integer","minimum":0,"default":0},"mobile_app_id":{"type":"integer","minimum":0,"default":0},"country_id":{"type":"integer","minimum":0,"default":0},"browser_language_id":{"type":"integer","minimum":0,"default":0},"landing_language_id":{"type":"integer","minimum":0,"default":0},"subscription_plan_id":{"type":"integer","minimum":0,"default":0},"user_agent_id":{"type":"integer","minimum":0,"default":0},"user_agent":{"type":"string","maxLength":500,"default":""},"user_agent_browser_id":{"type":"integer","minimum":0,"default":0},"user_agent_browser_version":{"type":"string","maxLength":64,"default":""},"user_agent_engine_id":{"type":"integer","minimum":0,"default":0},"user_agent_engine_version":{"type":"string","maxLength":64,"default":""},"user_agent_os_id":{"type":"integer","minimum":0,"default":0},"user_agent_os_version":{"type":"string","maxLength":64,"default":""},"user_agent_device_id":{"type":"integer","minimum":0,"default":0},"user_agent_cpu_id":{"type":"integer","minimum":0,"default":0},"user_agent_is_mobile":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"user_agent_is_bot":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"ip":{"type":"string","maxLength":64,"default":""},"previous_prelanding_impression":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}],"default":0},"impression_number":{"type":"integer","minimum":0,"default":0}},"required":["event_id","trace_id","source_id","event_datetime","event_type_id","impression_type"],"additionalProperties":false}},"required":["table","row"],"additionalProperties":false}]},"minItems":1,"maxItems":100}},"required":["facts"],"additionalProperties":false}}}},"responses":{"202":{"description":"The batch was accepted by Cloudflare Queues.","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"integer","minimum":1,"maximum":100},"status":{"type":"string","enum":["accepted"]}},"required":["accepted","status"],"additionalProperties":false}}}},"400":{"description":"The request does not match the strict analytics contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The producer credential is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The analytics Queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/internal/analytics/landing":{"post":{"description":"Accepts one validated Landing Pages event from a trusted preview deployment and publishes it to the matching environment Queue.","operationId":"ingestLandingAnalytics","tags":["Internal","Analytics"],"parameters":[{"schema":{"type":"string","pattern":"^Bearer [A-Za-z0-9_-]{32,255}$"},"required":true,"name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"click":{"type":"object","properties":{"advertiserId":{"type":["integer","null"],"exclusiveMinimum":0},"affiliateAccountId":{"type":["integer","null"],"exclusiveMinimum":0},"affiliateUserId":{"type":["integer","null"],"exclusiveMinimum":0},"browserLanguage":{"type":["string","null"],"maxLength":10},"checkoutDesignId":{"type":["integer","null"],"exclusiveMinimum":0},"clickDatetime":{"type":"integer","minimum":0},"clickId":{"type":"string","format":"uuid"},"companyId":{"type":["integer","null"],"exclusiveMinimum":0},"contentId":{"type":["integer","null"],"exclusiveMinimum":0},"contentSlug":{"type":["string","null"],"maxLength":100},"countryId":{"type":["integer","null"],"minimum":0},"countryIso2":{"type":["string","null"],"minLength":2,"maxLength":2},"funnelId":{"type":["integer","null"],"exclusiveMinimum":0},"landingDesignId":{"type":["integer","null"],"exclusiveMinimum":0},"landingLanguage":{"type":"string","minLength":2,"maxLength":10},"marketingDomainId":{"type":["integer","null"],"exclusiveMinimum":0},"merchantId":{"type":["integer","null"],"exclusiveMinimum":0},"offerId":{"type":["integer","null"],"exclusiveMinimum":0},"offerTypeId":{"type":["integer","null"],"exclusiveMinimum":0},"productId":{"type":["integer","null"],"exclusiveMinimum":0},"queryParameters":{"type":"object","additionalProperties":{"type":"string"}},"subscriptionPlanId":{"type":["integer","null"],"exclusiveMinimum":0},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"userAgent":{"type":["string","null"],"maxLength":500},"userAgentHeaders":{"type":"object","properties":{"secChUa":{"type":["string","null"],"maxLength":500},"secChUaMobile":{"type":["string","null"],"maxLength":500},"secChUaPlatform":{"type":["string","null"],"maxLength":500},"secChUaPlatformVersion":{"type":["string","null"],"maxLength":500}},"required":["secChUa","secChUaMobile","secChUaPlatform","secChUaPlatformVersion"],"additionalProperties":false},"visitorId":{"type":["string","null"],"maxLength":255}},"required":["advertiserId","affiliateAccountId","affiliateUserId","browserLanguage","checkoutDesignId","clickDatetime","clickId","companyId","contentId","contentSlug","countryId","countryIso2","funnelId","landingDesignId","landingLanguage","marketingDomainId","merchantId","offerId","offerTypeId","productId","queryParameters","subscriptionPlanId","traceId","userAgent","userAgentHeaders","visitorId"],"additionalProperties":false},"eventId":{"type":"string","minLength":1,"maxLength":255},"eventType":{"anyOf":[{"type":"number","enum":[104]},{"type":"number","enum":[105]},{"type":"number","enum":[106]},{"type":"number","enum":[108]}]},"impressionNumber":{"type":"integer","minimum":0,"default":0},"impressionType":{"type":"string","enum":["prelanding","checkout","offer"]},"ip":{"type":"string","maxLength":64,"default":""},"jobId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["analytics.landing"]},"previousPrelandingImpression":{"type":"boolean","default":false},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"version":{"type":"number","enum":[1]}},"required":["click","eventId","eventType","impressionType","jobId","kind","traceId","version"],"additionalProperties":false}}}},"responses":{"202":{"description":"The Landing Pages event was accepted by the environment analytics Queue.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["accepted"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The request does not match the strict Landing Pages event contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The producer credential is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The analytics Queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/internal/landing-designs/sync":{"put":{"description":"Idempotently synchronizes the complete Landing Pages design manifest and, unless an authenticated deployment defers it, queues a differential reconciliation of every Landing Pages cache projection.","operationId":"synchronizeLandingDesigns","tags":["Internal","Affiliation"],"parameters":[{"schema":{"type":"string","pattern":"^Bearer [A-Za-z0-9_-]{32,255}$"},"required":true,"name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cacheRefresh":{"type":"string","enum":["deferred"]},"designs":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"contentContract":{"type":"object","properties":{"allowsLandingContent":{"type":"boolean"},"designCode":{"type":"string","minLength":1,"maxLength":100},"images":{"type":"array","items":{"type":"object","properties":{"aspectRatio":{"type":["string","null"],"pattern":"^\\d+(?:\\.\\d+)?:\\d+(?:\\.\\d+)?$"},"compatibleComponents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20},"compatibleDesigns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":500},"description":{"type":"string","minLength":1,"maxLength":1000},"example":{"type":"string","maxLength":20000},"format":{"type":"string","enum":["plain_text","rich_text","https_url"]},"key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:[._][a-z0-9]+)*$"},"required":{"type":"boolean"},"type":{"type":"string","enum":["string"]}},"required":["aspectRatio","compatibleComponents","compatibleDesigns","description","example","format","key","required","type"],"additionalProperties":false},"maxItems":500},"translations":{"type":"array","items":{"type":"object","properties":{"aspectRatio":{"type":["string","null"],"pattern":"^\\d+(?:\\.\\d+)?:\\d+(?:\\.\\d+)?$"},"compatibleComponents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20},"compatibleDesigns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":500},"description":{"type":"string","minLength":1,"maxLength":1000},"example":{"type":"string","maxLength":20000},"format":{"type":"string","enum":["plain_text","rich_text","https_url"]},"key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:[._][a-z0-9]+)*$"},"required":{"type":"boolean"},"type":{"type":"string","enum":["string"]}},"required":["aspectRatio","compatibleComponents","compatibleDesigns","description","example","format","key","required","type"],"additionalProperties":false},"maxItems":1000},"version":{"type":"number","enum":[1]}},"required":["allowsLandingContent","designCode","images","translations","version"],"additionalProperties":false},"english":{"type":"object","additionalProperties":{"type":"string","maxLength":20000}},"kind":{"type":"string","enum":["landing","checkout","offer","component"]},"name":{"type":["string","null"],"minLength":1,"maxLength":255}},"required":["code","english","kind"],"additionalProperties":false},"maxItems":500}},"required":["designs"],"additionalProperties":false}}}},"responses":{"200":{"description":"The complete design manifest was synchronized atomically.","content":{"application/json":{"schema":{"type":"object","properties":{"activated":{"type":"integer","minimum":0},"disabled":{"type":"integer","minimum":0},"disabledFunnels":{"type":"integer","minimum":0},"disabledOffers":{"type":"integer","minimum":0},"englishLocalesChanged":{"type":"integer","minimum":0},"status":{"type":"string","enum":["complete"]}},"required":["activated","disabled","disabledFunnels","disabledOffers","englishLocalesChanged","status"],"additionalProperties":false}}}},"400":{"description":"The design manifest is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The deployment credential is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The manifest conflicts with active catalog relations.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Landing Design synchronization is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/internal/landing-cache/sync":{"post":{"description":"Synchronously reconciles only divergent keys in the disposable Landing Pages KV projection after a deployment.","operationId":"synchronizeLandingCache","tags":["Internal","Affiliation"],"parameters":[{"schema":{"type":"string","pattern":"^Bearer [A-Za-z0-9_-]{32,255}$"},"required":true,"name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["all","products","plans","merchants","offers","funnels","translations","contents"],"default":"all"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The selected KV projection was differentially reconciled.","content":{"application/json":{"schema":{"type":"object","properties":{"contents":{"type":"integer","minimum":0},"funnels":{"type":"integer","minimum":0},"merchants":{"type":"integer","minimum":0},"offers":{"type":"integer","minimum":0},"plans":{"type":"integer","minimum":0},"products":{"type":"integer","minimum":0},"scope":{"type":"string","enum":["all","products","plans","merchants","offers","funnels","translations","contents"]},"status":{"type":"string","enum":["complete"]},"translations":{"type":"integer","minimum":0}},"required":["contents","funnels","merchants","offers","plans","products","scope","status","translations"],"additionalProperties":false}}}},"400":{"description":"The cache scope is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The deployment credential is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The Landing Pages cache is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/public/context":{"get":{"description":"Resolves the white-label Product from the request domain and returns its public signup catalog.","operationId":"getPublicProductContext","tags":["Public"],"responses":{"200":{"description":"Public Product and Plan context.","content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"object","properties":{"hasLegalCookies":{"type":"boolean"},"hasLegalPrivacy":{"type":"boolean"},"hasLegalTerms":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":160}},"required":["hasLegalCookies","hasLegalPrivacy","hasLegalTerms","name"],"additionalProperties":false},"dashboardProduct":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string","minLength":1,"maxLength":100},"panelUrl":{"type":["string","null"],"maxLength":2048,"format":"uri"}},"required":["domain","id","name","panelUrl"],"additionalProperties":false},"humanConsultation":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"price":{"type":"integer","minimum":0}},"required":["currency","price"],"additionalProperties":false},"plans":{"type":"array","items":{"type":"object","properties":{"billingPeriodMonths":{"type":"integer","exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"familyGuestLimit":{"type":"integer","minimum":0},"id":{"type":"integer","exclusiveMinimum":0},"includedHumanChats":{"type":"integer","minimum":0},"name":{"type":"string","minLength":1,"maxLength":100},"price":{"type":"integer","minimum":0},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"trialDurationDays":{"type":"integer","minimum":0},"trialPrice":{"type":["integer","null"],"minimum":0}},"required":["billingPeriodMonths","currency","familyGuestLimit","id","includedHumanChats","name","price","slug","trialDurationDays","trialPrice"],"additionalProperties":false}},"product":{"type":"object","properties":{"apiUrl":{"type":["string","null"],"maxLength":2048,"format":"uri"},"checkoutUrl":{"type":["string","null"],"maxLength":2048,"format":"uri"},"cookiesUrl":{"type":["string","null"],"maxLength":2048,"format":"uri"},"domain":{"type":"string","minLength":1,"maxLength":253},"email":{"type":"string","maxLength":320,"format":"email"},"faviconObjectKey":{"type":["string","null"],"minLength":1,"maxLength":1024},"homepageUrl":{"type":["string","null"],"maxLength":2048,"format":"uri"},"id":{"type":"integer","exclusiveMinimum":0},"logoObjectKey":{"type":["string","null"],"minLength":1,"maxLength":1024},"name":{"type":"string","minLength":1,"maxLength":100},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"privacyUrl":{"type":["string","null"],"maxLength":2048,"format":"uri"},"tosUrl":{"type":["string","null"],"maxLength":2048,"format":"uri"}},"required":["apiUrl","checkoutUrl","cookiesUrl","domain","email","faviconObjectKey","homepageUrl","id","logoObjectKey","name","primaryColor","privacyUrl","tosUrl"],"additionalProperties":false}},"required":["company","dashboardProduct","humanConsultation","plans","product"],"additionalProperties":false}}}},"400":{"description":"The request query or Product domain is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"No active Product exists for the request domain.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"500":{"description":"The Product context could not be loaded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliation/conversions":{"get":{"description":"Durably accepts an advertiser conversion notification for background authentication, click matching, and conversion processing. Unknown query fields remain available to existing postback macros.","operationId":"acceptAdvertiserConversion","tags":["Affiliation"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"click_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"secure","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"transaction_id","in":"query"}],"responses":{"202":{"description":"The conversion notification was durably accepted for background processing.","content":{"application/json":{"schema":{"type":"object","properties":{"conversionId":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["accepted","skipped"]}},"required":["conversionId","status"],"additionalProperties":false}}}},"400":{"description":"The query does not match the advertiser postback contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The durable affiliation intake is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/advertiserPostback":{"get":{"description":"Permanent compatibility alias for legacy advertisers. It durably accepts the notification and never waits for conversion reconciliation.","operationId":"acceptLegacyAdvertiserConversion","tags":["Affiliation"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"click_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"secure","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"transaction_id","in":"query"}],"responses":{"202":{"description":"The conversion notification was durably accepted for background processing.","content":{"application/json":{"schema":{"type":"object","properties":{"conversionId":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["accepted","skipped"]}},"required":["conversionId","status"],"additionalProperties":false}}}},"400":{"description":"The query does not match the advertiser postback contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The durable affiliation intake is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/auth/signup":{"post":{"description":"Starts a Product-scoped signup using an active Plan from the public Product catalog. The subscriber account and billing entities are created atomically only after gateway approval.","operationId":"createSubscriber","tags":["Authentication","Billing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","maxLength":320,"format":"email"},"password":{"type":"string","minLength":8,"maxLength":128},"clickId":{"type":"string","minLength":1,"maxLength":255},"intakeId":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"card":{"type":"object","properties":{"cardholderName":{"type":"string","minLength":1,"maxLength":100},"number":{"type":"string","pattern":"^[0-9]{12,19}$"},"expiryMonth":{"type":"string","pattern":"^(0[1-9]|1[0-2])$"},"expiryYear":{"type":"string","pattern":"^[0-9]{4}$"},"cvv":{"type":"string","pattern":"^[0-9]{3,4}$"}},"required":["cardholderName","number","expiryMonth","expiryYear","cvv"],"additionalProperties":false},"browser":{"type":"object","properties":{"colorDepth":{"type":"integer","minimum":1,"maximum":64},"javaEnabled":{"type":"boolean"},"javascriptEnabled":{"type":"boolean"},"language":{"type":"string","minLength":1,"maxLength":35},"screenHeight":{"type":"integer","minimum":1,"maximum":100000},"screenWidth":{"type":"integer","minimum":1,"maximum":100000},"timezoneOffset":{"type":"integer","minimum":-1440,"maximum":1440}},"additionalProperties":false},"planId":{"type":"integer","exclusiveMinimum":0}},"required":["name","email","password","card","planId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Gateway approval completed the atomic signup, or this independent attempt requires a 3DS browser action.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"loginUrl":{"type":"string","maxLength":2048,"format":"uri"},"status":{"type":"string","enum":["complete"]}},"required":["loginUrl","status"],"additionalProperties":false},{"type":"object","properties":{"presentation":{"type":"string","enum":["iframe"]},"redirectUrl":{"type":"string","maxLength":2048,"format":"uri"},"status":{"type":"string","enum":["requires_action"]}},"required":["presentation","redirectUrl","status"],"additionalProperties":false}]}}}},"400":{"description":"The JSON request does not match the signup contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The selected Plan is not available.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Product-scoped account already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The payment was declined.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Billing is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/billing/threeds/{id}/continue":{"get":{"description":"Loads the encrypted pending browser action for one opaque 3DS attempt and renders it from the neutral API origin.","operationId":"presentThreedsSignup","tags":["Billing"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"A Method, Challenge, or processing page is rendered.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"The checkout identifier is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"Another signup completed this Product account.","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"The 3DS attempt is invalid or expired.","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"The checkout presentation is temporarily unavailable.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/billing/threeds/human-credit/callback":{"post":{"description":"Opaque Redsys browser callback for a customer-initiated stored-token human-credit payment. Provider fields are bounded at transport level and verified by the gateway state machine.","operationId":"continueHumanCreditThreedsPayment","tags":["Billing","Consulting"],"responses":{"200":{"description":"The credit completed or another browser authentication action is rendered.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"The checkout correlation identifier is missing.","content":{"text/html":{"schema":{"type":"string"}}}},"413":{"description":"The callback exceeds the transport size limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The stored-token payment continuation could not be completed.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/billing/threeds/{id}/callback":{"post":{"description":"Provider-extensible Challenge callback. Its form fields are intentionally opaque and are verified by the gateway continuation instead of a field whitelist.","operationId":"continueThreedsSignup","tags":["Billing"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The payment completed or another browser action is rendered.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"The checkout identifier is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"Another signup completed this Product account.","content":{"text/html":{"schema":{"type":"string"}}}},"413":{"description":"The callback exceeds the transport size limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The gateway continuation could not be completed.","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"The checkout continuation is temporarily unavailable.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/billing/threeds/{id}/method-callback":{"post":{"description":"Receives the issuer's opaque 3DS Method completion notification. An empty form still means the Method completed.","operationId":"completeThreedsMethod","tags":["Billing"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The outer 3DS iframe advances or reports a bounded result exactly once.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"The checkout identifier is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"Another signup completed this Product account.","content":{"text/html":{"schema":{"type":"string"}}}},"413":{"description":"The callback exceeds the transport size limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The Method continuation was rejected.","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"The Method continuation is temporarily unavailable.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/billing/threeds/{id}/method-timeout":{"post":{"description":"Continues an unfinished 3DS Method once with threeDSCompInd=N after the browser's ten-second deadline.","operationId":"timeoutThreedsMethod","tags":["Billing"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The iframe advances, completes, fails safely, or observes another claimant.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["in_progress"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"redirectUrl":{"type":"string","maxLength":2048,"format":"uri"},"status":{"type":"string","enum":["continue"]}},"required":["redirectUrl","status"],"additionalProperties":false},{"type":"object","properties":{"loginUrl":{"type":"string","maxLength":2048,"format":"uri"},"status":{"type":"string","enum":["complete"]}},"required":["loginUrl","status"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":64},"status":{"type":"string","enum":["failed"]}},"required":["code","status"],"additionalProperties":false}]}}}},"400":{"description":"The checkout identifier or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The timeout did not originate from the neutral API page.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"Another signup completed this Product account.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The Method continuation was rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The Method continuation is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/auth/ticket":{"get":{"description":"Consumes a short-lived, one-use signup ticket on the Product API host, creates an opaque browser session, and redirects to the Product Dashboard.","operationId":"consumeSignupLoginTicket","tags":["Authentication"],"parameters":[{"schema":{"type":"string","maxLength":255,"description":"Legacy Landing chat identifier; accepted for compatibility and discarded on redirect"},"required":false,"description":"Legacy Landing chat identifier; accepted for compatibility and discarded on redirect","name":"chat_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"conversation","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":true,"name":"ticket","in":"query"}],"responses":{"303":{"description":"The ticket was consumed and the browser continues to the dashboard, or the ticket was invalid and the browser continues to login.","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"description":"The ticket shape is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/auth/login":{"post":{"description":"Creates a session in the Product API hostname-selected realm or the fixed administrative realm. The browser never chooses the account scope, and Product accounts are not searched from the administrative API.","operationId":"login","tags":["Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["email","password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Login succeeded and an opaque session cookie was set.","content":{"application/json":{"schema":{"type":"object","properties":{"redirectTo":{"type":"string","enum":["/dashboard","/admin","/affiliate"]},"status":{"type":"string","enum":["complete"]}},"required":["redirectTo","status"],"additionalProperties":false}}}},"400":{"description":"The JSON request does not match the login contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The credentials are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/auth/password/forgot":{"post":{"description":"Requests a one-use password recovery link without revealing whether an account exists.","operationId":"requestPasswordReset","tags":["Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"}},"required":["email"],"additionalProperties":false}}}},"responses":{"202":{"description":"The request was accepted regardless of account existence.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["accepted"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The JSON request does not match the recovery contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/auth/password/reset":{"get":{"description":"Checks a one-use recovery token in the API hostname-selected account scope.","operationId":"getPasswordResetStatus","tags":["Authentication"],"parameters":[{"schema":{"type":"string","minLength":80,"maxLength":160,"pattern":"^[0-9a-f-]{36}\\.[A-Za-z0-9_-]{43}$"},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"The token status. Invalid and expired tokens are indistinguishable.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"}},"required":["valid"],"additionalProperties":false}}}},"400":{"description":"The token shape is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"description":"Consumes a one-use recovery token, updates the password, and revokes sessions.","operationId":"resetPassword","tags":["Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","minLength":8,"maxLength":128},"token":{"type":"string","minLength":80,"maxLength":160,"pattern":"^[0-9a-f-]{36}\\.[A-Za-z0-9_-]{43}$"}},"required":["newPassword","token"],"additionalProperties":false}}}},"responses":{"200":{"description":"The password was updated and the token consumed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The JSON request does not match the reset contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The token is invalid, expired, used, or belongs to another portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/auth/logout":{"post":{"description":"Revokes the current session and clears its cookie.","operationId":"logoutSubscriber","security":[{"cookieAuth":[]}],"tags":["Authentication"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The session is no longer usable.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/me":{"get":{"description":"Returns the minimum current-session bootstrap: user display fields, allowed sections, and Product Membership when applicable.","operationId":"getCurrentSubscriber","security":[{"cookieAuth":[]}],"tags":["Account"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Current subscriber account.","content":{"application/json":{"schema":{"type":"object","properties":{"availableSections":{"type":"array","items":{"type":"string","enum":["customer","admin","affiliate"]},"minItems":1,"maxItems":2},"canConsult":{"type":"boolean"},"membership":{"type":["object","null"],"properties":{"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"string","format":"date-time"},"familyGuestLimit":{"type":["integer","null"],"minimum":0},"includedHumanChats":{"type":["integer","null"],"minimum":0},"planName":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["owner","guest"]},"status":{"type":"string","enum":["trialing","active","past_due","ended"]},"trialEndsAt":{"type":["string","null"],"format":"date-time"}},"required":["cancelAtPeriodEnd","currentPeriodEnd","familyGuestLimit","includedHumanChats","planName","role","status","trialEndsAt"],"additionalProperties":false},"product":{"type":["object","null"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"realm":{"type":"string","enum":["global","product"]},"user":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["email","name"],"additionalProperties":false}},"required":["availableSections","canConsult","membership","product","realm","user"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid session exists for this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/auth/family-invitation":{"get":{"description":"Checks a product-bound one-use family invitation without performing password derivation or exposing its invited email.","operationId":"validateMembershipFamilyInvitation","tags":["Authentication","Family"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"Invitation validity.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"}},"required":["valid"],"additionalProperties":false}}}},"400":{"description":"The invitation token is malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"description":"Creates one isolated Product account and session from a valid family invitation. The shared Membership allowance is attached atomically.","operationId":"acceptMembershipFamilyInvitation","tags":["Authentication","Family"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"password":{"type":"string","minLength":8,"maxLength":128},"token":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["name","password","token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Guest account, family access, and Product session created.","content":{"application/json":{"schema":{"type":"object","properties":{"redirectTo":{"type":"string","enum":["/dashboard"]},"status":{"type":"string","enum":["complete"]}},"required":["redirectTo","status"],"additionalProperties":false}}}},"400":{"description":"The request does not match the strict acceptance contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The family Membership is not configured for invitations.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The invitation is expired, revoked, used, belongs to another Product, the family is full, or the Product account already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/account/family":{"get":{"description":"Returns the authenticated subscriber's family membership. Guests receive only their own identity; owners receive members and pending invitations.","operationId":"getMembershipFamily","security":[{"cookieAuth":[]}],"tags":["Account","Family"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Current family membership.","content":{"application/json":{"schema":{"type":"object","properties":{"familyGuestLimit":{"type":"integer","minimum":0},"invitations":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"email":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"}},"required":["createdAt","email","expiresAt","id"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"joinedAt":{"type":"string","format":"date-time"},"name":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["owner","guest"]},"userId":{"type":"integer","exclusiveMinimum":0}},"required":["email","joinedAt","name","role","userId"],"additionalProperties":false},"minItems":1},"role":{"type":"string","enum":["owner","guest"]}},"required":["familyGuestLimit","invitations","members","role"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Product session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"No active family Membership exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/account/family/invitations":{"post":{"description":"Creates a seven-day one-use family invitation. Only its SHA-256 digest is persisted; the bearer URL is returned once to the owner.","operationId":"createMembershipFamilyInvitation","security":[{"cookieAuth":[]}],"tags":["Account","Family"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"],"additionalProperties":false}}}},"responses":{"201":{"description":"One-use invitation link and safe invitation metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"acceptUrl":{"type":"string","maxLength":2048,"format":"uri"},"invitation":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"email":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"}},"required":["createdAt","email","expiresAt","id"],"additionalProperties":false}},"required":["acceptUrl","invitation"],"additionalProperties":false}}}},"400":{"description":"The request does not match the strict invitation contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Product session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request is cross-origin or the subscriber is not the owner.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"No active family Membership exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The family is full or that Product account already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/account/family/invitations/{invitationId}":{"delete":{"description":"Revokes an unresolved family invitation owned by the current Membership.","operationId":"revokeMembershipFamilyInvitation","security":[{"cookieAuth":[]}],"tags":["Account","Family"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"invitationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Invitation revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The path, query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Product session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request is cross-origin or the subscriber is not the owner.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The unresolved invitation does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/account/family/members/{userId}":{"delete":{"description":"Removes one guest from the shared Membership without deleting that guest's account, conversations, or files.","operationId":"removeMembershipFamilyMember","security":[{"cookieAuth":[]}],"tags":["Account","Family"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Guest access removed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The path, query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Product session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request is cross-origin or the subscriber is not the owner.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The active guest does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/public/consulting/intakes":{"post":{"description":"Starts an opaque pre-registration ExpertAnswer triage. Private content never enters a URL and is not copied to core PostgreSQL before a successful signup; the anonymous intake remains in a bounded-retention agent Durable Object until expiry. Communication locale and approximate Cloudflare country/city context are derived server-side and remain correctable hints.","operationId":"createPublicConsultingIntake","tags":["Consulting","Public"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientMessageId":{"type":"string","format":"uuid"},"message":{"type":"string","minLength":1,"maxLength":2000},"intakeId":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["clientMessageId","message","intakeId"],"additionalProperties":false}}}},"responses":{"202":{"description":"The public triage message was durably admitted.","content":{"application/json":{"schema":{"type":"object","properties":{"intakeId":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["processing"]},"submissionId":{"type":"string","minLength":1,"maxLength":160}},"required":["intakeId","status","submissionId"],"additionalProperties":false}}}},"400":{"description":"The public triage request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The intake is complete or has reached its bounded turn limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The public triage rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Public triage is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"get":{"description":"Reads the safe visible transcript and handoff readiness for an opaque public triage.","operationId":"getPublicConsultingIntake","security":[{"publicIntakeBearerAuth":[]}],"tags":["Consulting","Public"],"parameters":[{"schema":{"type":"string","pattern":"^Bearer [A-Za-z0-9_-]{43}$"},"required":true,"name":"authorization","in":"header"}],"responses":{"200":{"description":"Current public triage.","content":{"application/json":{"schema":{"type":"object","properties":{"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"message":{"type":"string","maxLength":20000},"role":{"type":"string","enum":["assistant","user"]},"submissionId":{"type":["string","null"],"minLength":1,"maxLength":160}},"required":["id","message","role","submissionId"],"additionalProperties":false},"maxItems":32},"intakeId":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"ready":{"type":"boolean"}},"required":["history","intakeId","professional","ready"],"additionalProperties":false}}}},"400":{"description":"The opaque intake identifier is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The opaque intake does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The public triage rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Public triage is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/public/consulting/intakes/messages":{"post":{"description":"Adds one bounded follow-up to an opaque pre-registration triage. Completed intakes are immutable.","operationId":"sendPublicConsultingIntakeMessage","security":[{"publicIntakeBearerAuth":[]}],"tags":["Consulting","Public"],"parameters":[{"schema":{"type":"string","pattern":"^Bearer [A-Za-z0-9_-]{43}$"},"required":true,"name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientMessageId":{"type":"string","format":"uuid"},"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["clientMessageId","message"],"additionalProperties":false}}}},"responses":{"202":{"description":"The public triage message was durably admitted.","content":{"application/json":{"schema":{"type":"object","properties":{"intakeId":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","enum":["processing"]},"submissionId":{"type":"string","minLength":1,"maxLength":160}},"required":["intakeId","status","submissionId"],"additionalProperties":false}}}},"400":{"description":"The public triage request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The opaque intake does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The intake is complete or has reached its bounded turn limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The public triage rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Public triage is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations":{"get":{"description":"Lists the authenticated subscriber's durable consulting conversations.","operationId":"listConsultingConversations","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","enum":["active","archived"],"default":"active"},"required":false,"name":"view","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Conversation index.","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title"],"additionalProperties":false},"maxItems":100},"humanConsultations":{"type":["object","null"],"properties":{"available":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"purchase":{"type":"object","properties":{"amount":{"type":"number","enum":[3995]},"currency":{"type":"string","enum":["EUR"]}},"required":["amount","currency"],"additionalProperties":false},"purchasedAvailable":{"type":"integer","minimum":0},"used":{"type":"integer","minimum":0}},"required":["available","limit","purchase","purchasedAvailable","used"],"additionalProperties":false}},"required":["conversations","humanConsultations"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"description":"Creates a fresh dashboard triaje conversation. Landing-origin conversations are created atomically by paid signup.","operationId":"createConsultingConversation","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"Conversation created.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title"],"additionalProperties":false}},"required":["conversation"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The subscriber has no active consulting access.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the conversation creation rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Consulting admission controls are unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}/archive":{"post":{"description":"Archives one owned conversation without deleting its transcript or files.","operationId":"archiveConsultingConversation","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Updated conversation archive state.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title"],"additionalProperties":false}},"required":["conversation"],"additionalProperties":false}}}},"400":{"description":"The path, query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"delete":{"description":"Restores one archived owned conversation to the active conversation list.","operationId":"restoreConsultingConversation","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Updated conversation archive state.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title"],"additionalProperties":false}},"required":["conversation"],"additionalProperties":false}}}},"400":{"description":"The path, query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}/human/read":{"post":{"description":"Marks all currently persisted human replies in one owned conversation as read.","operationId":"markConsultingHumanActivityRead","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Current conversation summary with the human unread count cleared.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title"],"additionalProperties":false}},"required":["conversation"],"additionalProperties":false}}}},"400":{"description":"The path, query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/usage":{"get":{"description":"Returns the authenticated subscriber's estimated weekly AI usage as a percentage. Monetary plan limits are never exposed.","operationId":"getConsultingUsage","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Current weekly AI usage.","content":{"application/json":{"schema":{"type":"object","properties":{"exhaustionReason":{"type":["string","null"],"enum":["cost_ceiling","turn_reservation","weekly_limit",null]},"estimated":{"type":"boolean","enum":[true]},"periodStart":{"type":"string","format":"date-time"},"remainingPercent":{"type":"integer","minimum":0,"maximum":100},"resetAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["available","exhausted"]},"usedPercent":{"type":"integer","minimum":0,"maximum":100}},"required":["exhaustionReason","estimated","periodStart","remainingPercent","resetAt","status","usedPercent"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"AI usage accounting is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}":{"get":{"description":"Returns one owned conversation and its PostgreSQL-backed durable transcript.","operationId":"getConsultingConversation","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Conversation detail.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80},"intakeContext":{"type":["string","null"],"maxLength":8000}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title","intakeContext"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["user","triage","expert_ai","human","system"]},"channel":{"type":"string","enum":["ai","human"]},"clientMessageId":{"type":["string","null"],"format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"],"minLength":1,"maxLength":160},"id":{"type":"string","format":"uuid"},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"],"additionalProperties":false},{"type":"object","properties":{"attachmentId":{"type":"string","minLength":1,"maxLength":160},"filename":{"type":"string","maxLength":160},"mediaType":{"type":"string","maxLength":100},"size":{"type":"integer","minimum":0},"type":{"type":"string","enum":["file"]},"url":{"type":"string","maxLength":2048}},"required":["attachmentId","filename","mediaType","size","type","url"],"additionalProperties":false},{"type":"object","properties":{"data":{"type":"object","additionalProperties":{}},"type":{"type":"string","enum":["handoff"]}},"required":["data","type"],"additionalProperties":false},{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":240},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["title","url"],"additionalProperties":false},"minItems":1,"maxItems":8},"type":{"type":"string","enum":["citations"]}},"required":["sources","type"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","format":"uuid"},"filename":{"type":"string","minLength":1,"maxLength":160},"mediaType":{"type":"string","minLength":1,"maxLength":100},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size":{"type":"integer","exclusiveMinimum":0,"maximum":26214400},"url":{"type":"string","maxLength":2048},"type":{"type":"string","enum":["artifact"]}},"required":["artifactId","filename","mediaType","sha256","size","url","type"],"additionalProperties":false},{"type":"object","properties":{"executionTier":{"type":"string","enum":["worker","justbash","linux"]},"label":{"type":"string","minLength":1,"maxLength":160},"status":{"type":"string","enum":["active","escalated","failed","opening","published","publishing"]},"taskId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["file_status"]}},"required":["executionTier","label","status","taskId","type"],"additionalProperties":false}]}},"role":{"type":"string","enum":["user","assistant","human","system"]},"sequence":{"type":"integer","minimum":0},"submissionId":{"type":["string","null"],"minLength":1,"maxLength":160}},"required":["actor","channel","content","createdAt","id","parts","role","sequence"],"additionalProperties":false}}},"required":["conversation","messages"],"additionalProperties":false}}}},"400":{"description":"The path, query, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}/artifacts/{artifactId}":{"get":{"description":"Downloads one generated artifact after verifying that it belongs to the authenticated subscriber's conversation.","operationId":"getConsultingConversationArtifact","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"artifactId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Generated artifact bytes, always served as a download.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The path, query, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation or artifact is not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the download rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The consulting worker is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}/sync":{"post":{"description":"Synchronizes a completed Flue transcript into PostgreSQL and generates a title once meaningful context exists.","operationId":"synchronizeConsultingConversation","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Transcript synchronized.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title"],"additionalProperties":false},"synchronizedMessages":{"type":"integer","minimum":0}},"required":["conversation","synchronizedMessages"],"additionalProperties":false}}}},"400":{"description":"The path, query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The consulting worker or conversation title generation is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}/share":{"post":{"description":"Rotates the share secret and returns a public URL whose read token remains only in the URL fragment.","operationId":"shareConsultingConversation","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Share URL created.","content":{"application/json":{"schema":{"type":"object","properties":{"shareId":{"type":"string","minLength":22,"maxLength":22},"token":{"type":"string","minLength":43,"maxLength":43},"url":{"type":"string","format":"uri"}},"required":["shareId","token","url"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the sharing rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Consulting admission controls are unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"delete":{"description":"Revokes the current public share URL immediately.","operationId":"revokeConsultingConversationShare","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Share URL revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the sharing rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Consulting admission controls are unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}/human":{"post":{"description":"Schedules a human search after a private three-minute grace period. Pearl receives only a concise problem summary when dispatch starts, and usage is consumed at that time.","operationId":"requestHumanConsultation","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Human consultation scheduled or an active request replayed.","content":{"application/json":{"schema":{"type":"object","properties":{"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"available":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"purchase":{"type":"object","properties":{"amount":{"type":"number","enum":[3995]},"currency":{"type":"string","enum":["EUR"]}},"required":["amount","currency"],"additionalProperties":false},"purchasedAvailable":{"type":"integer","minimum":0},"used":{"type":"integer","minimum":0}},"required":["humanStatus","available","limit","purchase","purchasedAvailable","used"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The subscriber has no active consulting access.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"Triaje is incomplete or the monthly allowance is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the human consultation rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The consulting worker is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/human-credits/purchases":{"post":{"description":"Starts one customer-initiated EUR 39.95 human-consultation purchase with the membership owner's stored token. The server fixes the amount, a purchase UUID makes transport retries idempotent, 3DS is returned when required, and one unresolved charge blocks any replacement attempt until reconciliation finishes.","operationId":"purchaseHumanConsultationCredit","security":[{"cookieAuth":[]}],"tags":["Consulting","Billing"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"browser":{"type":"object","properties":{"colorDepth":{"type":"integer","minimum":1,"maximum":64},"javaEnabled":{"type":"boolean"},"javascriptEnabled":{"type":"boolean"},"language":{"type":"string","minLength":1,"maxLength":35},"screenHeight":{"type":"integer","minimum":1,"maximum":100000},"screenWidth":{"type":"integer","minimum":1,"maximum":100000},"timezoneOffset":{"type":"integer","minimum":-1440,"maximum":1440}},"additionalProperties":false},"conversationId":{"type":"string","format":"uuid"},"purchaseId":{"type":"string","format":"uuid"}},"required":["conversationId","purchaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The credit payment completed and is available to the family membership, or a 3DS browser action is required.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"humanConsultations":{"type":"object","properties":{"available":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"purchase":{"type":"object","properties":{"amount":{"type":"number","enum":[3995]},"currency":{"type":"string","enum":["EUR"]}},"required":["amount","currency"],"additionalProperties":false},"purchasedAvailable":{"type":"integer","minimum":0},"used":{"type":"integer","minimum":0}},"required":["available","limit","purchase","purchasedAvailable","used"],"additionalProperties":false},"paymentId":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["complete"]}},"required":["humanConsultations","paymentId","status"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"value":{"type":"string","maxLength":256000}},"required":["name","value"],"additionalProperties":false},"maxItems":32},"method":{"type":"string","enum":["POST"]},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["fields","method","url"],"additionalProperties":false},"status":{"type":"string","enum":["requires_action"]}},"required":["action","status"],"additionalProperties":false}]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The subscriber has no active consulting access.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"Only the family membership owner can approve a new charge.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The stored payment method is unavailable, a payment is already in progress, or gateway reconciliation is still required.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The payment was declined.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the human purchase rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Billing is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/conversations/{conversationId}/human/messages":{"post":{"description":"Persists a subscriber message after Pearl has connected and sends only that new message to the existing Pearl session.","operationId":"sendHumanConsultingMessage","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientMessageId":{"type":"string","format":"uuid"},"message":{"type":"string","minLength":1,"maxLength":20000}},"required":["clientMessageId","message"],"additionalProperties":false}}}},"responses":{"202":{"description":"Human message synchronized.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["accepted"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The message is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The subscriber has no active consulting access.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"A human professional has not connected yet.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the human message rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Pearl is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/public/consulting/conversations/{shareId}":{"post":{"description":"Resolves a shared transcript using the secret supplied from the URL fragment.","operationId":"getPublicConsultingConversation","tags":["Consulting","Public"],"parameters":[{"schema":{"type":"string","minLength":22,"maxLength":22},"required":true,"name":"shareId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":43,"maxLength":43}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Read-only shared transcript.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"agentMode":{"type":"string","enum":["triage","keyword"]},"archivedAt":{"type":["string","null"],"format":"date-time"},"assistant":{"type":["string","null"],"enum":["sofia","laura","elena",null]},"createdAt":{"type":"string","format":"date-time"},"humanExpert":{"type":["object","null"],"properties":{"avatarUrl":{"type":["string","null"],"format":"uri"},"name":{"type":"string","minLength":1,"maxLength":100},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarUrl","name","title"],"additionalProperties":false},"humanStatus":{"type":"string","enum":["not_requested","scheduled","searching","connected","paused","failed"]},"humanDueAt":{"type":["string","null"],"format":"date-time"},"humanUnreadCount":{"type":"integer","minimum":0},"id":{"type":"string","format":"uuid"},"lastHumanMessageAt":{"type":["string","null"],"format":"date-time"},"lastMessageAt":{"type":["string","null"],"format":"date-time"},"professional":{"type":["object","null"],"properties":{"avatarProfile":{"type":"string","enum":["man","woman"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2})?$/i"},"name":{"type":"string","minLength":1,"maxLength":100},"specialty":{"type":"string","minLength":1,"maxLength":160},"summary":{"type":"string","minLength":1,"maxLength":1500},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["avatarProfile","name","specialty","summary","title"],"additionalProperties":false},"source":{"type":"string","enum":["dashboard","landing"]},"title":{"type":["string","null"],"maxLength":80},"intakeContext":{"type":["string","null"],"maxLength":8000}},"required":["agentMode","assistant","createdAt","humanExpert","humanStatus","humanDueAt","id","lastMessageAt","professional","source","title","intakeContext"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["user","triage","expert_ai","human","system"]},"channel":{"type":"string","enum":["ai","human"]},"clientMessageId":{"type":["string","null"],"format":"uuid"},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"externalId":{"type":["string","null"],"minLength":1,"maxLength":160},"id":{"type":"string","format":"uuid"},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"],"additionalProperties":false},{"type":"object","properties":{"attachmentId":{"type":"string","minLength":1,"maxLength":160},"filename":{"type":"string","maxLength":160},"mediaType":{"type":"string","maxLength":100},"size":{"type":"integer","minimum":0},"type":{"type":"string","enum":["file"]},"url":{"type":"string","maxLength":2048}},"required":["attachmentId","filename","mediaType","size","type","url"],"additionalProperties":false},{"type":"object","properties":{"data":{"type":"object","additionalProperties":{}},"type":{"type":"string","enum":["handoff"]}},"required":["data","type"],"additionalProperties":false},{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":240},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["title","url"],"additionalProperties":false},"minItems":1,"maxItems":8},"type":{"type":"string","enum":["citations"]}},"required":["sources","type"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","format":"uuid"},"filename":{"type":"string","minLength":1,"maxLength":160},"mediaType":{"type":"string","minLength":1,"maxLength":100},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size":{"type":"integer","exclusiveMinimum":0,"maximum":26214400},"url":{"type":"string","maxLength":2048},"type":{"type":"string","enum":["artifact"]}},"required":["artifactId","filename","mediaType","sha256","size","url","type"],"additionalProperties":false},{"type":"object","properties":{"executionTier":{"type":"string","enum":["worker","justbash","linux"]},"label":{"type":"string","minLength":1,"maxLength":160},"status":{"type":"string","enum":["active","escalated","failed","opening","published","publishing"]},"taskId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["file_status"]}},"required":["executionTier","label","status","taskId","type"],"additionalProperties":false}]}},"role":{"type":"string","enum":["user","assistant","human","system"]},"sequence":{"type":"integer","minimum":0},"submissionId":{"type":["string","null"],"minLength":1,"maxLength":160}},"required":["actor","channel","content","createdAt","id","parts","role","sequence"],"additionalProperties":false}}},"required":["conversation","messages"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The share URL is invalid or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The public share access rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Consulting admission controls are unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/public/consulting/conversations/{shareId}/attachments/{attachmentId}":{"post":{"description":"Reads one attachment belonging to a valid shared conversation.","operationId":"getPublicConsultingAttachment","tags":["Consulting","Public"],"parameters":[{"schema":{"type":"string","minLength":22,"maxLength":22},"required":true,"name":"shareId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":160},"required":true,"name":"attachmentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":43,"maxLength":43}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Attachment bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The share or attachment is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The public download rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Consulting admission controls are unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/public/consulting/conversations/{shareId}/artifacts/{artifactId}":{"post":{"description":"Downloads one generated artifact belonging to a valid shared conversation.","operationId":"getPublicConsultingArtifact","tags":["Consulting","Public"],"parameters":[{"schema":{"type":"string","minLength":22,"maxLength":22},"required":true,"name":"shareId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"artifactId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":43,"maxLength":43}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Generated artifact bytes, always served as a download.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The share or artifact is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The public download rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The consulting worker is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/integrations/pearl/webhook":{"post":{"description":"Receives signed Pearl expert messages with raw-body signature verification.","operationId":"receivePearlConsultingMessage","tags":["Consulting","Integrations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512},"required":true,"name":"x-pearl-api-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expert":{"type":"object","properties":{"AvatarUrl":{"type":"string","format":"uri"},"JobDescription":{"type":"string","maxLength":200},"Name":{"type":"string","maxLength":100}},"additionalProperties":false},"message":{"type":"string","minLength":1,"maxLength":20000},"messageDateTime":{"type":"string","format":"date-time"},"sessionId":{"type":"string","format":"uuid"}},"required":["message","sessionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Message accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The Pearl payload is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The Pearl signature is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Pearl session is unknown.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The verified Pearl session exceeded the webhook rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Pearl admission controls are unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/{mode}/{conversationId}/messages":{"post":{"description":"Durably accepts one subscriber message. Messages for a running conversation are incorporated by Flue at its next safe turn boundary; messages over the execution cap remain queued.","operationId":"admitConsultingMessage","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","enum":["keyword","triage"]},"required":true,"name":"mode","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"data":{"type":"string","minLength":1,"maxLength":13981016},"filename":{"type":"string","maxLength":160},"mimeType":{"type":"string","enum":["application/json","application/pdf","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","image/gif","image/jpeg","image/png","image/webp","text/csv","text/markdown","text/plain"]},"type":{"type":"string","enum":["image"]}},"required":["data","mimeType","type"],"additionalProperties":false},"maxItems":4},"body":{"type":"string","maxLength":20000},"kind":{"type":"string","enum":["user"]},"clientMessageId":{"type":"string","format":"uuid"},"intent":{"type":"string","enum":["start_landing"]}},"required":["body","kind","clientMessageId"],"additionalProperties":false}}}},"responses":{"202":{"description":"The message was durably accepted or its exact receipt was replayed.","content":{"application/json":{"schema":{"type":"object","properties":{"acceptedAt":{"type":"string","format":"date-time"},"clientMessageId":{"type":"string","format":"uuid"},"executionStatus":{"type":"string","enum":["queued","running","waiting_capacity","terminalizing","settled"]},"messageStatus":{"type":"string","enum":["accepted","dispatched","incorporated","terminal"]}},"required":["acceptedAt","clientMessageId","executionStatus","messageStatus"],"additionalProperties":false}}}},"400":{"description":"The message or attachment contract is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The subscriber has no active consulting access.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The client message id was already used for different content.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"413":{"description":"The request or attachments are too large.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded a consulting admission rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Durable consulting admission is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/{mode}/{conversationId}/state":{"get":{"description":"Reads durable subscriber message delivery and execution state without exposing internal Flue receipts or execution identifiers.","operationId":"readConsultingMessageState","security":[{"cookieAuth":[]}],"tags":["Consulting"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","enum":["keyword","triage"]},"required":true,"name":"mode","in":"path"},{"schema":{"type":"string","pattern":"^v1_[A-Za-z0-9_-]{43}$/u"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"reconcileClientMessageId","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Current durable message and execution state.","content":{"application/json":{"schema":{"type":"object","properties":{"execution":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running","waiting_capacity","terminalizing","settled"]}},"required":["status"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"acceptedAt":{"type":"string","format":"date-time"},"answeredBySubmissionId":{"type":["string","null"],"minLength":1,"maxLength":160,"default":null},"answeredAt":{"type":["string","null"],"format":"date-time"},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":160},"mimeType":{"type":"string","enum":["application/json","application/pdf","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","image/gif","image/jpeg","image/png","image/webp","text/csv","text/markdown","text/plain"]},"size":{"type":"integer","exclusiveMinimum":0,"maximum":10485760},"type":{"type":"string","enum":["image"]}},"required":["filename","mimeType","size","type"],"additionalProperties":false},"maxItems":4},"body":{"type":"string","maxLength":20000},"clientMessageId":{"type":"string","format":"uuid"},"conversationSequence":{"type":["integer","null"],"exclusiveMinimum":0},"failureAt":{"type":["string","null"],"format":"date-time","default":null},"failureReason":{"type":["string","null"],"enum":["credits_exhausted","delivery_failed",null],"default":null},"flueSubmissionId":{"type":["string","null"],"minLength":1,"maxLength":160},"hiddenAttemptSubmissionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":160},"maxItems":32,"default":[]},"messageStatus":{"type":"string","enum":["accepted","dispatched","incorporated","terminal"]}},"required":["acceptedAt","answeredAt","attachments","body","clientMessageId","messageStatus"],"additionalProperties":false},"maxItems":200},"nextCursor":{"type":["string","null"],"pattern":"^v1_[A-Za-z0-9_-]{43}$/u","default":null}},"required":["execution","messages"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded a consulting read rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Durable consulting state is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/{mode}/{conversationId}":{"get":{"description":"Reads the owned Flue history or resumable update stream. The dashboard normally uses the Flue React client.","operationId":"readConsultingAgentStream","security":[{"cookieAuth":[]}],"tags":["Consulting","Flue"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","enum":["keyword","triage"]},"required":true,"name":"mode","in":"path"},{"schema":{"type":"string","enum":["long-poll","sse"]},"required":false,"name":"live","in":"query"},{"schema":{"type":"string"},"required":false,"name":"offset","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":1000},"required":false,"name":"tail","in":"query"},{"schema":{"type":"string","enum":["history","updates"]},"required":false,"name":"view","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Flue snapshot or updates stream.","content":{"application/json":{"schema":{}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"The stream query is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The consulting worker is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/{mode}/{conversationId}/abort":{"post":{"description":"Aborts queued or in-flight work for one owned conversation.","operationId":"abortConsultingAgent","security":[{"cookieAuth":[]}],"tags":["Consulting","Flue"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","enum":["keyword","triage"]},"required":true,"name":"mode","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Abort completed.","content":{"application/json":{"schema":{}}}},"202":{"description":"Abort accepted.","content":{"application/json":{"schema":{}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation is not owned by the subscriber.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The consulting worker is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/consulting/{mode}/{conversationId}/attachments/{attachmentId}":{"get":{"description":"Reads one attachment from an owned Flue conversation.","operationId":"getConsultingAttachment","security":[{"cookieAuth":[]}],"tags":["Consulting","Flue"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","enum":["keyword","triage"]},"required":true,"name":"mode","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":160},"required":true,"name":"attachmentId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Attachment bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The path or query is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No Product subscriber session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation or attachment is not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The subscriber exceeded the download rate limit.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The consulting worker is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/account/password":{"post":{"description":"Changes the current account password after verifying the existing password. Other sessions are revoked.","operationId":"changeCurrentPassword","security":[{"cookieAuth":[]}],"tags":["Account"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currentPassword":{"type":"string","minLength":1,"maxLength":128},"newPassword":{"type":"string","minLength":8,"maxLength":128}},"required":["currentPassword","newPassword"],"additionalProperties":false}}}},"responses":{"200":{"description":"The password was changed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The JSON request does not match the password contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"The session or current password is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The new password matches the current password.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/reports/catalog":{"get":{"description":"Returns only the report dimensions and metrics allowed for the authenticated Affiliate.","operationId":"getAffiliateReportCatalog","security":[{"cookieAuth":[]}],"tags":["Affiliation","Reporting"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Affiliate-filtered report catalog.","content":{"application/json":{"schema":{"type":"object","properties":{"dimensions":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"entity":{"type":"boolean"},"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string"},"renamedFrom":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"}},"type":{"type":"string","enum":["date","datetime","number","string"]}},"required":["category","entity","key","label","renamedFrom","type"],"additionalProperties":false}},"metrics":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"format":{"type":"string","enum":["currency","number","percentage"]},"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string"},"summary":{"type":"string"}},"required":["category","format","key","label","summary"],"additionalProperties":false}},"role":{"type":"string","enum":["admin","affiliate","service"]}},"required":["dimensions","metrics","role"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Reporting is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/reports/query":{"post":{"description":"Runs a strictly validated report with an Affiliate scope derived from the authenticated session. Client input cannot replace that scope.","operationId":"runAffiliateReport","security":[{"cookieAuth":[]}],"tags":["Affiliation","Reporting"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cumulative":{"type":"object","properties":{"untilPayment":{"type":"integer","minimum":1,"maximum":1000},"untilSubscriptionDay":{"type":"integer","minimum":0,"maximum":3650}},"default":{},"additionalProperties":false},"dateBasis":{"type":"string","enum":["event","subscription"],"default":"event"},"dimensions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"operator":{"type":"string","enum":["eq","neq","in","not_in","gt","gte","lt","lte"]},"value":{"anyOf":[{"type":"number"},{"type":"string","maxLength":2048},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","maxLength":2048}]},"minItems":1,"maxItems":500}]}},"required":["field","operator","value"],"additionalProperties":false},"maxItems":50,"default":[]},"having":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"period":{"type":"integer","minimum":1,"maximum":4},"value":{"type":"number"}},"required":["field","operator","value"],"additionalProperties":false},"maxItems":20,"default":[]},"includeTotals":{"type":"boolean","default":true},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"minItems":1,"maxItems":50},"order":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"]},"field":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"period":{"type":"integer","minimum":1,"maximum":4}},"required":["direction","field"],"additionalProperties":false},"maxItems":10,"default":[]},"page":{"type":"integer","minimum":1,"maximum":100000,"default":1},"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":100},"periods":{"type":"array","items":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"from2":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to2":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]}},"required":["from","to"],"additionalProperties":false},"minItems":1,"maxItems":4},"timezoneOffsetMinutes":{"type":"integer","minimum":-840,"maximum":840,"default":0}},"required":["metrics","periods"],"additionalProperties":false}}}},"responses":{"200":{"description":"Affiliate-scoped report rows, totals, pagination, and dimension metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]}}},"meta":{"type":"object","properties":{"dimensionCoverage":{"type":"array","items":{"type":"object","properties":{"defaultedTables":{"type":"array","items":{"type":"string"}},"dimension":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"populatedTables":{"type":"array","items":{"type":"string"}}},"required":["defaultedTables","dimension","populatedTables"],"additionalProperties":false}},"dimensions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"}},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"}},"periods":{"type":"integer","minimum":1,"maximum":4},"tables":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["dimensionCoverage","dimensions","metrics","periods","tables","warnings"],"additionalProperties":false},"pagination":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0},"pageSize":{"type":"integer","exclusiveMinimum":0},"totalRows":{"type":"integer","minimum":0}},"required":["page","pageSize","totalRows"],"additionalProperties":false},"totals":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]}}},"required":["data","meta","pagination","totals"],"additionalProperties":false}}}},"400":{"description":"The report contract, metric, dimension, filter, or policy is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Reporting is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/reports/dimensions/{dimension}/values":{"get":{"description":"Resolves paginated dimension identifiers for report controls scoped to the authenticated Affiliate.","operationId":"getAffiliateReportDimensionValues","security":[{"cookieAuth":[]}],"tags":["Affiliation","Reporting"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"required":true,"name":"dimension","in":"path"},{"schema":{"type":"string","maxLength":4096,"pattern":"^[0-9]+(?:,[0-9]+)*$"},"required":false,"name":"ids","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"pageSize","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Affiliate-scoped dimension identifiers and display names.","content":{"application/json":{"schema":{"type":"object","properties":{"dimension":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"pagination":{"type":"object","properties":{"more":{"type":"boolean"},"page":{"type":"integer","exclusiveMinimum":0},"pageSize":{"type":"integer","exclusiveMinimum":0}},"required":["more","page","pageSize"],"additionalProperties":false},"values":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":["string","null"]},"id":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["externalId","id","name"],"additionalProperties":false}}},"required":["dimension","pagination","values"],"additionalProperties":false}}}},"400":{"description":"The dimension or query is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Reporting is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/reports/catalog":{"get":{"description":"Returns the dimensions and metrics allowed for the authenticated Admin, Affiliate, or service credential.","operationId":"getReportCatalog","security":[{"cookieAuth":[]},{"serviceBearerAuth":[]}],"tags":["Reporting"],"responses":{"200":{"description":"Role-filtered report catalog.","content":{"application/json":{"schema":{"type":"object","properties":{"dimensions":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"entity":{"type":"boolean"},"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string"},"renamedFrom":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"}},"type":{"type":"string","enum":["date","datetime","number","string"]}},"required":["category","entity","key","label","renamedFrom","type"],"additionalProperties":false}},"metrics":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"format":{"type":"string","enum":["currency","number","percentage"]},"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string"},"summary":{"type":"string"}},"required":["category","format","key","label","summary"],"additionalProperties":false}},"role":{"type":"string","enum":["admin","affiliate","service"]}},"required":["dimensions","metrics","role"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Reporting is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/reports/query":{"post":{"description":"Runs a strictly validated predefined report. Raw query language is never accepted.","operationId":"runReport","security":[{"cookieAuth":[]},{"serviceBearerAuth":[]}],"tags":["Reporting"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cumulative":{"type":"object","properties":{"untilPayment":{"type":"integer","minimum":1,"maximum":1000},"untilSubscriptionDay":{"type":"integer","minimum":0,"maximum":3650}},"default":{},"additionalProperties":false},"dateBasis":{"type":"string","enum":["event","subscription"],"default":"event"},"dimensions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"maxItems":12,"default":[]},"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"operator":{"type":"string","enum":["eq","neq","in","not_in","gt","gte","lt","lte"]},"value":{"anyOf":[{"type":"number"},{"type":"string","maxLength":2048},{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"string","maxLength":2048}]},"minItems":1,"maxItems":500}]}},"required":["field","operator","value"],"additionalProperties":false},"maxItems":50,"default":[]},"having":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"period":{"type":"integer","minimum":1,"maximum":4},"value":{"type":"number"}},"required":["field","operator","value"],"additionalProperties":false},"maxItems":20,"default":[]},"includeTotals":{"type":"boolean","default":true},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"minItems":1,"maxItems":50},"order":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"]},"field":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"period":{"type":"integer","minimum":1,"maximum":4}},"required":["direction","field"],"additionalProperties":false},"maxItems":10,"default":[]},"page":{"type":"integer","minimum":1,"maximum":100000,"default":1},"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":100},"periods":{"type":"array","items":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"from2":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to2":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]}},"required":["from","to"],"additionalProperties":false},"minItems":1,"maxItems":4},"timezoneOffsetMinutes":{"type":"integer","minimum":-840,"maximum":840,"default":0}},"required":["metrics","periods"],"additionalProperties":false}}}},"responses":{"200":{"description":"Report rows, totals, pagination, and dimension coverage metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]}}},"meta":{"type":"object","properties":{"dimensionCoverage":{"type":"array","items":{"type":"object","properties":{"defaultedTables":{"type":"array","items":{"type":"string"}},"dimension":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"populatedTables":{"type":"array","items":{"type":"string"}}},"required":["defaultedTables","dimension","populatedTables"],"additionalProperties":false}},"dimensions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"}},"metrics":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"}},"periods":{"type":"integer","minimum":1,"maximum":4},"tables":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["dimensionCoverage","dimensions","metrics","periods","tables","warnings"],"additionalProperties":false},"pagination":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0},"pageSize":{"type":"integer","exclusiveMinimum":0},"totalRows":{"type":"integer","minimum":0}},"required":["page","pageSize","totalRows"],"additionalProperties":false},"totals":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]}}},"required":["data","meta","pagination","totals"],"additionalProperties":false}}}},"400":{"description":"The report contract, metric, dimension, filter, or policy is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Reporting is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/reports/dimensions/{dimension}/values":{"get":{"description":"Resolves paginated dimension identifiers for filter controls, scoped to the authenticated role.","operationId":"getReportDimensionValues","security":[{"cookieAuth":[]},{"serviceBearerAuth":[]}],"tags":["Reporting"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"required":true,"name":"dimension","in":"path"},{"schema":{"type":"string","maxLength":4096,"pattern":"^[0-9]+(?:,[0-9]+)*$"},"required":false,"name":"ids","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"pageSize","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Dimension identifiers and display names.","content":{"application/json":{"schema":{"type":"object","properties":{"dimension":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z][a-z0-9_]*$"},"pagination":{"type":"object","properties":{"more":{"type":"boolean"},"page":{"type":"integer","exclusiveMinimum":0},"pageSize":{"type":"integer","exclusiveMinimum":0}},"required":["more","page","pageSize"],"additionalProperties":false},"values":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":["string","null"]},"id":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["externalId","id","name"],"additionalProperties":false}}},"required":["dimension","pagination","values"],"additionalProperties":false}}}},"400":{"description":"The dimension or query is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Reporting is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/account/postback":{"get":{"description":"Returns the default Postback URL owned by the authenticated Affiliate account.","operationId":"getAffiliatePostbackConfiguration","security":[{"cookieAuth":[]}],"tags":["Account","Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The Affiliate's current default Postback URL, or null when none is set.","content":{"application/json":{"schema":{"type":"object","properties":{"postbackUrl":{"type":["string","null"],"minLength":1,"maxLength":2048,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"}},"required":["postbackUrl","updatedAt"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Postback configuration is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"put":{"description":"Stores or removes the authenticated Affiliate's default Postback URL using syntax validation only. No request is sent to the URL.","operationId":"saveAffiliatePostbackConfiguration","security":[{"cookieAuth":[]}],"tags":["Account","Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"postbackUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048,"format":"uri"},{"type":"string","minLength":0,"maxLength":0},{"type":"null"}]}},"required":["postbackUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"The canonical persisted Postback URL; empty input is returned as null.","content":{"application/json":{"schema":{"type":"object","properties":{"postbackUrl":{"type":["string","null"],"minLength":1,"maxLength":2048,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"}},"required":["postbackUrl","updatedAt"],"additionalProperties":false}}}},"400":{"description":"The Postback URL request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Postback configuration is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/account/windsor":{"get":{"description":"Returns only non-secret Windsor connection state for the authenticated Affiliate account.","operationId":"getAffiliateWindsorConfiguration","security":[{"cookieAuth":[]}],"tags":["Account","Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The safe Windsor configuration state; the API key is never returned.","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"configured":{"type":"boolean"},"updatedAt":{"type":["string","null"],"format":"date-time"},"warning":{"type":["string","null"],"enum":["NO_GOOGLE_ADS_ACCOUNTS",null]}},"required":["active","configured","updatedAt","warning"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Windsor configuration is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"put":{"description":"Validates a Windsor API key with a bounded read-only Google Ads request, then encrypts and stores it for the authenticated Affiliate.","operationId":"saveAffiliateWindsorConfiguration","security":[{"cookieAuth":[]}],"tags":["Account","Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","minLength":16,"maxLength":512,"pattern":"^\\S+$"}},"required":["apiKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"The key was verified and encrypted. A warning can report that no Google Ads accounts were observed.","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"configured":{"type":"boolean"},"updatedAt":{"type":["string","null"],"format":"date-time"},"warning":{"type":["string","null"],"enum":["NO_GOOGLE_ADS_ACCOUNTS",null]}},"required":["active","configured","updatedAt","warning"],"additionalProperties":false}}}},"400":{"description":"The API key request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"Windsor rejected the API key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"Too many validation attempts were made for this Affiliate account.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Windsor validation or secure storage is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"delete":{"description":"Removes the encrypted Windsor API key and disables future imports without deleting historical reports.","operationId":"deleteAffiliateWindsorConfiguration","security":[{"cookieAuth":[]}],"tags":["Account","Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Windsor was disabled and its encrypted key was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"configured":{"type":"boolean"},"updatedAt":{"type":["string","null"],"format":"date-time"},"warning":{"type":["string","null"],"enum":["NO_GOOGLE_ADS_ACCOUNTS",null]}},"required":["active","configured","updatedAt","warning"],"additionalProperties":false}}}},"400":{"description":"The query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Windsor configuration is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/marketing-domains":{"get":{"description":"Lists only the authenticated Affiliate's Marketing Domains without exposing Cloudflare credentials.","operationId":"listMarketingDomains","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The Affiliate's Marketing Domains.","content":{"application/json":{"schema":{"type":"object","properties":{"marketingDomains":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"desiredState":{"type":"string","enum":["active","inactive"]},"domain":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"lastErrorAt":{"type":["string","null"],"format":"date-time"},"lastErrorCode":{"type":["string","null"]},"lastErrorMessage":{"type":["string","null"]},"nameServers":{"type":"array","items":{"type":"string"}},"operationVersion":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["pending","configuring","waiting_dns","active","action_required","deleting","inactive"]},"subdomain":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","desiredState","domain","id","lastErrorAt","lastErrorCode","lastErrorMessage","nameServers","operationVersion","status","subdomain","updatedAt"],"additionalProperties":false}}},"required":["marketingDomains"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"description":"Creates a Marketing Domain and starts its revisioned Cloudflare Workflow.","operationId":"createMarketingDomain","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$"},"subdomain":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"accountId":{"type":"string","minLength":1,"maxLength":255},"authenticationType":{"type":"string","enum":["api_token"]},"token":{"type":"string","minLength":1,"maxLength":2048}},"required":["domain","subdomain","accountId","authenticationType","token"],"additionalProperties":false},{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$"},"subdomain":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"accountId":{"type":"string","minLength":1,"maxLength":255},"authenticationType":{"type":"string","enum":["global_api_key"]},"email":{"type":"string","maxLength":320,"format":"email"},"globalApiKey":{"type":"string","minLength":1,"maxLength":2048}},"required":["domain","subdomain","accountId","authenticationType","email","globalApiKey"],"additionalProperties":false}]}}}},"responses":{"202":{"description":"The idempotent setup Workflow was started.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"operationVersion":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["pending","configuring","waiting_dns","active","action_required","deleting","inactive"]}},"required":["id","operationVersion","status"],"additionalProperties":false}}}},"400":{"description":"The Marketing Domain request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The hostname is already registered or is still being removed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"Cloudflare rejected the supplied credentials or account.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/marketing-domains/{id}/credentials":{"patch":{"description":"Replaces the encrypted Cloudflare credentials stored on one Marketing Domain and starts reconciliation.","operationId":"updateMarketingDomainCredentials","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":255},"authenticationType":{"type":"string","enum":["api_token"]},"token":{"type":"string","minLength":1,"maxLength":2048}},"required":["accountId","authenticationType","token"],"additionalProperties":false},{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":255},"authenticationType":{"type":"string","enum":["global_api_key"]},"email":{"type":"string","maxLength":320,"format":"email"},"globalApiKey":{"type":"string","minLength":1,"maxLength":2048}},"required":["accountId","authenticationType","email","globalApiKey"],"additionalProperties":false}]}}}},"responses":{"202":{"description":"The credentials were replaced and setup reconciliation was started.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"operationVersion":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["pending","configuring","waiting_dns","active","action_required","deleting","inactive"]}},"required":["id","operationVersion","status"],"additionalProperties":false}}}},"400":{"description":"The credentials request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Marketing Domain does not belong to this Affiliate.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"Another live Marketing Domain already uses this hostname.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"Cloudflare rejected the supplied credentials or account.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/marketing-domains/{id}/reconcile":{"post":{"description":"Starts a new operation version so the current setup revision is reconciled idempotently.","operationId":"reconcileMarketingDomain","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"202":{"description":"A new reconciliation operation was started.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"operationVersion":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["pending","configuring","waiting_dns","active","action_required","deleting","inactive"]}},"required":["id","operationVersion","status"],"additionalProperties":false}}}},"400":{"description":"The path, query, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Marketing Domain does not belong to this Affiliate.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"Another live Marketing Domain already uses this hostname.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/marketing-domains/{id}":{"delete":{"description":"Removes Landing Pages KV, the Pages hostname, and only the CNAME owned by Billing Core. The affiliate zone is never deleted.","operationId":"deleteMarketingDomain","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"202":{"description":"A new deprovisioning operation was started.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"operationVersion":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["pending","configuring","waiting_dns","active","action_required","deleting","inactive"]}},"required":["id","operationVersion","status"],"additionalProperties":false}}}},"400":{"description":"The path, query, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Marketing Domain does not belong to this Affiliate.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"An active Funnel still uses this Marketing Domain.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/advertisers":{"get":{"description":"Lists Advertisers without exposing webhook secrets.","operationId":"listAffiliationAdvertisers","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Lists Advertisers without exposing webhook secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"advertisers":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","name","status","updatedAt"],"additionalProperties":false}}},"required":["advertisers"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"operationId":"createAffiliationAdvertiser","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"webhookSecret":{"type":"string","minLength":16,"maxLength":255}},"required":["name","webhookSecret"],"additionalProperties":false}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"201":{"description":"The Advertiser was created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/advertisers/{id}":{"patch":{"operationId":"updateAffiliationAdvertiser","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["active","disabled"]},"webhookSecret":{"type":"string","minLength":16,"maxLength":255}},"additionalProperties":false}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/offer-types":{"get":{"description":"Lists Offer Types.","operationId":"listAffiliationOfferTypes","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Lists Offer Types.","content":{"application/json":{"schema":{"type":"object","properties":{"offerTypes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["code","createdAt","id","name","status","updatedAt"],"additionalProperties":false}}},"required":["offerTypes"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"operationId":"createAffiliationOfferType","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["code","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"201":{"description":"The Offer Type was created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/offer-types/{id}":{"patch":{"operationId":"updateAffiliationOfferType","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"name":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["active","disabled"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/landing-designs":{"get":{"description":"Lists Landing Designs with editable Offer Types, Affiliate assignments, and active usage.","operationId":"listAffiliationLandingDesigns","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Lists Landing Designs with editable Offer Types, Affiliate assignments, and active usage.","content":{"application/json":{"schema":{"type":"object","properties":{"affiliates":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"}},"required":["email","id","name"],"additionalProperties":false}},"landingDesigns":{"type":"array","items":{"type":"object","properties":{"activeFunnelCount":{"type":"integer","minimum":0},"activeFunnelAffiliateUserIds":{"type":"array","items":{"type":"integer","exclusiveMinimum":0}},"activeOfferCount":{"type":"integer","minimum":0},"activeProductCount":{"type":"integer","minimum":0},"affiliateUserIds":{"type":"array","items":{"type":"integer","exclusiveMinimum":0}},"code":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"kind":{"type":"string","enum":["landing","checkout","offer","component"]},"name":{"type":["string","null"]},"offerTypeId":{"type":["integer","null"],"exclusiveMinimum":0}},"required":["activeFunnelCount","activeFunnelAffiliateUserIds","activeOfferCount","activeProductCount","affiliateUserIds","code","id","kind","name","offerTypeId"],"additionalProperties":false}},"offerTypes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]}},"required":["code","id","name","status"],"additionalProperties":false}}},"required":["affiliates","landingDesigns","offerTypes"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/landing-designs/{id}":{"patch":{"operationId":"updateAffiliationLandingDesign","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"affiliateUserIds":{"type":"array","items":{"type":"integer","exclusiveMinimum":0},"maxItems":1000},"name":{"type":"string","minLength":1,"maxLength":255},"offerTypeId":{"type":["integer","null"],"exclusiveMinimum":0}},"required":["affiliateUserIds","name","offerTypeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The editable design fields and Affiliate assignments were replaced atomically.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The requested design values are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Design, Offer Type, or Affiliate was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"An active Funnel or Offer prevents the requested change.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/offers":{"get":{"description":"Lists the complete Offer administration catalog, including editable Offers and Affiliate overrides.","operationId":"listAffiliationOffers","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Lists the complete Offer administration catalog, including editable Offers and Affiliate overrides.","content":{"application/json":{"schema":{"type":"object","properties":{"advertisers":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","name","status","updatedAt"],"additionalProperties":false}},"affiliates":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"scrubRate":{"type":"number","minimum":0,"maximum":1}},"required":["email","id","name","scrubRate"],"additionalProperties":false}},"checkoutDesigns":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":["string","null"]},"offerTypeId":{"type":["integer","null"],"exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["code","id","name","offerTypeId","status"],"additionalProperties":false}},"countries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0},"iso2":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"}},"required":["id","iso2","name"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"advertiserId":{"type":"integer","exclusiveMinimum":0},"allowDirectTraffic":{"type":"boolean"},"checkoutLandingDesignId":{"type":["integer","null"],"exclusiveMinimum":0},"countryId":{"type":["integer","null"],"minimum":0},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["EUR"]},"destinationUrl":{"type":["string","null"]},"id":{"type":"integer","exclusiveMinimum":0},"kind":{"type":"string","enum":["internal","external"]},"name":{"type":"string"},"payout":{"type":"integer"},"payoutType":{"type":"string","enum":["TS","TS5","TC","INS"]},"publicId":{"type":"string","minLength":1,"maxLength":45,"pattern":"^[A-Za-z0-9_-]+$"},"revenue":{"type":"integer"},"status":{"type":"string","enum":["active","disabled"]},"typeId":{"type":"integer","exclusiveMinimum":0},"updatedAt":{"type":"string","format":"date-time"}},"required":["advertiserId","allowDirectTraffic","checkoutLandingDesignId","countryId","createdAt","currency","destinationUrl","id","kind","name","payout","payoutType","publicId","revenue","status","typeId","updatedAt"],"additionalProperties":false}},"offerTypes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]}},"required":["code","id","name","status"],"additionalProperties":false}},"overrides":{"type":"array","items":{"type":"object","properties":{"affiliateUserId":{"type":"integer","exclusiveMinimum":0},"offerId":{"type":"integer","exclusiveMinimum":0},"payout":{"type":["integer","null"],"minimum":0},"scrubRate":{"type":["number","null"],"minimum":0,"maximum":1}},"required":["affiliateUserId","offerId","payout","scrubRate"],"additionalProperties":false}}},"required":["advertisers","affiliates","checkoutDesigns","countries","offers","offerTypes","overrides"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"operationId":"createAffiliationOffer","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"allowDirectTraffic":{"type":"boolean"},"countryId":{"type":["integer","null"],"minimum":0},"name":{"type":"string","minLength":1,"maxLength":255},"payout":{"type":"integer","minimum":0},"payoutType":{"type":"string","enum":["TS","TS5","TC","INS"]},"revenue":{"type":"integer","minimum":0},"typeId":{"type":"integer","exclusiveMinimum":0},"checkoutLandingDesignId":{"type":"integer","exclusiveMinimum":0},"kind":{"type":"string","enum":["internal"]}},"required":["allowDirectTraffic","name","payout","payoutType","revenue","typeId","checkoutLandingDesignId","kind"],"additionalProperties":false},{"type":"object","properties":{"allowDirectTraffic":{"type":"boolean"},"countryId":{"type":["integer","null"],"minimum":0},"name":{"type":"string","minLength":1,"maxLength":255},"payout":{"type":"integer","minimum":0},"payoutType":{"type":"string","enum":["TS","TS5","TC","INS"]},"revenue":{"type":"integer","minimum":0},"typeId":{"type":"integer","exclusiveMinimum":0},"advertiserId":{"type":"integer","exclusiveMinimum":0},"destinationUrl":{"type":"string","minLength":1,"maxLength":2048},"kind":{"type":"string","enum":["external"]}},"required":["allowDirectTraffic","name","payout","payoutType","revenue","typeId","advertiserId","destinationUrl","kind"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"201":{"description":"The Offer was created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/offers/{id}":{"put":{"description":"Replaces the editable configuration of an Offer without changing its status.","operationId":"updateAffiliationOffer","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"allowDirectTraffic":{"type":"boolean"},"countryId":{"type":["integer","null"],"minimum":0},"name":{"type":"string","minLength":1,"maxLength":255},"payout":{"type":"integer","minimum":0},"payoutType":{"type":"string","enum":["TS","TS5","TC","INS"]},"revenue":{"type":"integer","minimum":0},"typeId":{"type":"integer","exclusiveMinimum":0},"checkoutLandingDesignId":{"type":"integer","exclusiveMinimum":0},"kind":{"type":"string","enum":["internal"]}},"required":["allowDirectTraffic","name","payout","payoutType","revenue","typeId","checkoutLandingDesignId","kind"],"additionalProperties":false},{"type":"object","properties":{"allowDirectTraffic":{"type":"boolean"},"countryId":{"type":["integer","null"],"minimum":0},"name":{"type":"string","minLength":1,"maxLength":255},"payout":{"type":"integer","minimum":0},"payoutType":{"type":"string","enum":["TS","TS5","TC","INS"]},"revenue":{"type":"integer","minimum":0},"typeId":{"type":"integer","exclusiveMinimum":0},"advertiserId":{"type":"integer","exclusiveMinimum":0},"destinationUrl":{"type":"string","minLength":1,"maxLength":2048},"kind":{"type":"string","enum":["external"]}},"required":["allowDirectTraffic","name","payout","payoutType","revenue","typeId","advertiserId","destinationUrl","kind"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The Offer changed, but the Landing Pages cache refresh could not be queued.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/offers/{id}/status":{"patch":{"description":"Soft-deactivates or restores an Offer. Disabled Offers remain stored but cannot receive new traffic.","operationId":"updateAffiliationOfferStatus","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The Offer changed, but the Landing Pages cache refresh could not be queued.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-content":{"get":{"description":"Lists custom Landing Content entries and their authoritative language.","operationId":"listLandingContent","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Lists custom Landing Content entries and their authoritative language.","content":{"application/json":{"schema":{"type":"object","properties":{"landingContents":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"integer","exclusiveMinimum":0},"landingDesignCode":{"type":"string","minLength":1,"maxLength":100},"landingDesignId":{"type":"integer","exclusiveMinimum":0},"locales":{"type":"array","items":{"type":"object","properties":{"images":{"type":"object","additionalProperties":{"type":"string","maxLength":2048,"format":"uri"},"default":{}},"languageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"translations":{"type":"object","additionalProperties":{"type":"string","maxLength":20000}}},"required":["languageCode","translations"],"additionalProperties":false}},"publishedAt":{"type":["string","null"],"format":"date-time"},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"sourceLanguageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"status":{"type":"string","enum":["active","disabled"]},"translationPolicy":{"type":"string","enum":["automatic","manual"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","landingDesignCode","landingDesignId","locales","publishedAt","publishedHash","slug","sourceLanguageCode","status","translationPolicy","updatedAt"],"additionalProperties":false}}},"required":["landingContents"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"operationId":"createLandingContent","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"landingDesignCode":{"type":"string","minLength":1,"maxLength":100},"locales":{"type":"array","items":{"type":"object","properties":{"images":{"type":"object","additionalProperties":{"type":"string","maxLength":2048,"format":"uri"},"default":{}},"languageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"translations":{"type":"object","additionalProperties":{"type":"string","maxLength":20000}}},"required":["languageCode","translations"],"additionalProperties":false},"minItems":1,"maxItems":100},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"sourceLanguageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"translationPolicy":{"type":"string","enum":["automatic","manual"]}},"required":["landingDesignCode","locales","slug","sourceLanguageCode","translationPolicy"],"additionalProperties":false}}}},"responses":{"200":{"description":"The resource was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"201":{"description":"The custom Landing Content entry was created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","publishStatus","publishedHash","status"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The requested relation conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The entry was stored, but its first publication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-content/{id}":{"get":{"operationId":"getLandingContent","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Returns Landing Content and all persisted locales.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"integer","exclusiveMinimum":0},"landingDesignCode":{"type":"string","minLength":1,"maxLength":100},"landingDesignId":{"type":"integer","exclusiveMinimum":0},"locales":{"type":"array","items":{"type":"object","properties":{"images":{"type":"object","additionalProperties":{"type":"string","maxLength":2048,"format":"uri"},"default":{}},"languageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"translations":{"type":"object","additionalProperties":{"type":"string","maxLength":20000}}},"required":["languageCode","translations"],"additionalProperties":false}},"publishedAt":{"type":["string","null"],"format":"date-time"},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"sourceLanguageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"status":{"type":"string","enum":["active","disabled"]},"translationPolicy":{"type":"string","enum":["automatic","manual"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","landingDesignCode","landingDesignId","locales","publishedAt","publishedHash","slug","sourceLanguageCode","status","translationPolicy","updatedAt"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Content was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Landing Content data conflicts with its stored contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"500":{"description":"The Landing Content could not be loaded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"patch":{"operationId":"updateLandingContent","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"landingDesignCode":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"sourceLanguageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"status":{"type":"string","enum":["active","disabled"]},"translationPolicy":{"type":"string","enum":["automatic","manual"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Landing Content was updated and published.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","publishStatus","publishedHash","status"],"additionalProperties":false}}}},"400":{"description":"The Landing Content request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Content was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Landing Content conflicts with its design or locale contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The Landing Content mutation was stored but could not be published.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"delete":{"operationId":"deleteLandingContent","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The Landing Content was safely disabled and unpublished.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","publishStatus","publishedHash","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Content was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Landing Content conflicts with its stored contract.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The Landing Content was disabled, but unpublication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-content/{id}/locales/{languageCode}":{"put":{"operationId":"upsertLandingContentLocale","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":true,"name":"languageCode","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"images":{"type":"object","additionalProperties":{"type":"string","maxLength":2048,"format":"uri"},"default":{}},"translations":{"type":"object","additionalProperties":{"type":"string","maxLength":20000}}},"required":["translations"],"additionalProperties":false}}}},"responses":{"200":{"description":"The locale was stored and published.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","publishStatus","publishedHash","status"],"additionalProperties":false}}}},"400":{"description":"The locale is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Content or language was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"A key is not supported by the selected design.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The locale was stored but publication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"delete":{"operationId":"deleteLandingContentLocale","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":true,"name":"languageCode","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The non-source locale was removed and the bundle republished.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","publishStatus","publishedHash","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The locale was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The source locale cannot be removed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The locale was removed but publication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-content/{id}/publish":{"post":{"operationId":"publishLandingContent","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The current version is active, or was already active.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","publishStatus","publishedHash","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Content was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Landing Content is not publishable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The previous active version remains available; publication can be retried.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/products/{id}/homepage-landing-content":{"put":{"operationId":"assignProductLandingContent","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"landingContentId":{"type":["integer","null"],"exclusiveMinimum":0}},"required":["landingContentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The Product default was assigned and published to its runtime cache.","content":{"application/json":{"schema":{"type":"object","properties":{"landingContentId":{"type":["integer","null"],"exclusiveMinimum":0},"productId":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["complete"]}},"required":["landingContentId","productId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Product or Landing Content was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Landing Content is unpublished or uses a different design.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The assignment was stored but its Product cache could not be published.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-content-schema":{"get":{"operationId":"getLandingContentJsonSchema","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":false,"name":"designCode","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"productId","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Exports the versioned manifest and JSON Schema for an agent generator.","content":{"application/json":{"schema":{"type":"object","properties":{"designCode":{"type":"string","minLength":1,"maxLength":100},"jsonSchema":{"type":"object","properties":{"$schema":{"type":"string","enum":["https://json-schema.org/draft/2020-12/schema"]},"additionalProperties":{"type":"boolean","enum":[false]},"properties":{"type":"object","properties":{"images":{"type":"object","additionalProperties":{}},"translations":{"type":"object","additionalProperties":{}}},"required":["images","translations"],"additionalProperties":false},"required":{"type":"array","prefixItems":[{"type":"string","enum":["translations"]},{"type":"string","enum":["images"]}]},"title":{"type":"string","minLength":1},"type":{"type":"string","enum":["object"]}},"required":["$schema","additionalProperties","properties","required","title","type"],"additionalProperties":false},"manifest":{"type":"object","properties":{"allowsLandingContent":{"type":"boolean"},"designCode":{"type":"string","minLength":1,"maxLength":100},"images":{"type":"array","items":{"type":"object","properties":{"aspectRatio":{"type":["string","null"],"pattern":"^\\d+(?:\\.\\d+)?:\\d+(?:\\.\\d+)?$"},"compatibleComponents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20},"compatibleDesigns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":500},"description":{"type":"string","minLength":1,"maxLength":1000},"example":{"type":"string","maxLength":20000},"format":{"type":"string","enum":["plain_text","rich_text","https_url"]},"key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:[._][a-z0-9]+)*$"},"required":{"type":"boolean"},"type":{"type":"string","enum":["string"]}},"required":["aspectRatio","compatibleComponents","compatibleDesigns","description","example","format","key","required","type"],"additionalProperties":false},"maxItems":500},"translations":{"type":"array","items":{"type":"object","properties":{"aspectRatio":{"type":["string","null"],"pattern":"^\\d+(?:\\.\\d+)?:\\d+(?:\\.\\d+)?$"},"compatibleComponents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20},"compatibleDesigns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":500},"description":{"type":"string","minLength":1,"maxLength":1000},"example":{"type":"string","maxLength":20000},"format":{"type":"string","enum":["plain_text","rich_text","https_url"]},"key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:[._][a-z0-9]+)*$"},"required":{"type":"boolean"},"type":{"type":"string","enum":["string"]}},"required":["aspectRatio","compatibleComponents","compatibleDesigns","description","example","format","key","required","type"],"additionalProperties":false},"maxItems":1000},"version":{"type":"number","enum":[1]}},"required":["allowsLandingContent","designCode","images","translations","version"],"additionalProperties":false}},"required":["designCode","jsonSchema","manifest"],"additionalProperties":false}}}},"400":{"description":"Choose exactly one Product or Landing Design.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Product or Landing Design was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Landing Design does not support Landing Content.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"500":{"description":"The Landing Content contract could not be loaded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-content/{id}/locales/{languageCode}/images":{"post":{"operationId":"uploadLandingContentImage","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":true,"name":"languageCode","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"imageKey":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:[._][a-z0-9]+)*$"}},"required":["imageKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"The content-addressed R2 image was stored and the locale bundle activated.","content":{"application/json":{"schema":{"type":"object","properties":{"assetUrl":{"type":"string","maxLength":2048,"format":"uri"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"id":{"type":"integer","exclusiveMinimum":0},"imageKey":{"type":"string","minLength":1,"maxLength":255},"languageCode":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[a-z]{2}$"},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["assetUrl","contentHash","id","imageKey","languageCode","publishStatus","publishedHash"],"additionalProperties":false}}}},"400":{"description":"The image file or image key is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Content locale was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The image slot is not supported by this design.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The asset or content bundle could not be published; the prior version remains active.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-content/{id}/locales/{languageCode}/images/{imageKey}":{"delete":{"operationId":"deleteLandingContentImage","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":true,"name":"languageCode","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9]+(?:[._][a-z0-9]+)*$"},"required":true,"name":"imageKey","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The image override was removed and the bundle republished.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"publishStatus":{"type":"string","enum":["applied","no_op"]},"publishedHash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","publishStatus","publishedHash","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Landing Content locale was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The image slot is not supported by this design.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The image map was stored but publication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/landing-cache/resync":{"post":{"operationId":"resynchronizeLandingPagesCache","security":[{"cookieAuth":[]}],"tags":["Landing Pages administration"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["all","products","plans","merchants","offers","funnels","translations","contents"],"default":"all"}},"additionalProperties":false}}}},"responses":{"202":{"description":"A cache synchronization job was enqueued.","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["all","products","plans","merchants","offers","funnels","translations","contents"]},"status":{"type":"string","enum":["accepted"]}},"required":["jobId","scope","status"],"additionalProperties":false}}}},"400":{"description":"The synchronization scope is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The synchronization Queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/affiliation/offers/{offerId}/affiliate-overrides/{affiliateUserId}":{"put":{"operationId":"upsertAffiliationOfferAffiliateOverride","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"affiliateUserId","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"offerId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payout":{"type":["integer","null"],"minimum":0},"scrubRate":{"type":["number","null"],"minimum":0,"maximum":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"The override was saved.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The override is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Affiliate or Offer was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The override conflicts with the Offer configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"delete":{"operationId":"deleteAffiliationOfferAffiliateOverride","security":[{"cookieAuth":[]}],"tags":["Affiliation administration"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"affiliateUserId","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"offerId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The override was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The override path is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Admin session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Affiliate or Offer was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The override conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/catalog":{"get":{"operationId":"getAffiliateCatalog","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"All active Offers plus Affiliate-specific payout and scrub behavior.","content":{"application/json":{"schema":{"type":"object","properties":{"advertisers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"countries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0},"iso2":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"}},"required":["id","iso2","name"],"additionalProperties":false}},"landingDesigns":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":["string","null"]},"offerTypeId":{"type":"integer","exclusiveMinimum":0}},"required":["code","id","name","offerTypeId"],"additionalProperties":false}},"offerTypes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"}},"required":["code","id","name"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"advertiser":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"allowDirectTraffic":{"type":"boolean"},"checkoutLandingDesignId":{"type":["integer","null"],"exclusiveMinimum":0},"country":{"type":["object","null"],"properties":{"id":{"type":"integer","minimum":0},"iso2":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"}},"required":["id","iso2","name"],"additionalProperties":false},"currency":{"type":"string"},"destinationUrl":{"type":["string","null"]},"id":{"type":"integer","exclusiveMinimum":0},"kind":{"type":"string","enum":["internal","external"]},"name":{"type":"string"},"payout":{"type":"integer"},"payoutType":{"type":"string","enum":["TS","TS5","TC","INS"]},"publicId":{"type":"string","minLength":1,"maxLength":45,"pattern":"^[A-Za-z0-9_-]+$"},"typeId":{"type":"integer","exclusiveMinimum":0}},"required":["advertiser","allowDirectTraffic","checkoutLandingDesignId","country","currency","destinationUrl","id","kind","name","payout","payoutType","publicId","typeId"],"additionalProperties":false}}},"required":["advertisers","countries","landingDesigns","offerTypes","offers"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/funnels":{"get":{"operationId":"listAffiliateFunnels","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The authenticated Affiliate's Funnels.","content":{"application/json":{"schema":{"type":"object","properties":{"funnels":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"integer","exclusiveMinimum":0},"marketingDomainId":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"offerTypeId":{"type":"integer","exclusiveMinimum":0},"postbackUrl":{"type":["string","null"]},"landingDesignId":{"type":"integer","exclusiveMinimum":0},"publicId":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"routes":{"type":"array","items":{"type":"object","properties":{"countryId":{"type":["integer","null"],"minimum":0},"id":{"type":"integer","exclusiveMinimum":0},"offerId":{"type":"integer","exclusiveMinimum":0},"weight":{"type":"integer"}},"required":["countryId","id","offerId","weight"],"additionalProperties":false}},"status":{"type":"string","enum":["active","disabled"]}},"required":["createdAt","id","marketingDomainId","name","offerTypeId","postbackUrl","landingDesignId","publicId","routes","status"],"additionalProperties":false}}},"required":["funnels"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"post":{"operationId":"createAffiliateFunnel","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"marketingDomainId":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string","minLength":1,"maxLength":255},"offerTypeId":{"type":"integer","exclusiveMinimum":0},"postbackUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048,"format":"uri"},{"type":"string","minLength":0,"maxLength":0},{"type":"null"}]},"landingDesignId":{"type":"integer","exclusiveMinimum":0},"routes":{"type":"array","items":{"type":"object","properties":{"countryId":{"type":["integer","null"],"minimum":0},"offerId":{"type":"integer","exclusiveMinimum":0},"weight":{"type":"integer","minimum":1,"maximum":10000,"default":100}},"required":["offerId"],"additionalProperties":false},"maxItems":100,"default":[]}},"required":["marketingDomainId","name","offerTypeId","landingDesignId"],"additionalProperties":false}}}},"responses":{"201":{"description":"The Funnel was created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The Funnel request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Affiliate profile was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The domain, Offer, Offer Type, or Landing Design is not usable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/affiliate/funnels/{id}":{"patch":{"operationId":"updateAffiliateFunnel","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"marketingDomainId":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string","minLength":1,"maxLength":255},"offerTypeId":{"type":"integer","exclusiveMinimum":0},"postbackUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048,"format":"uri"},{"type":"string","minLength":0,"maxLength":0},{"type":"null"}]},"landingDesignId":{"type":"integer","exclusiveMinimum":0},"routes":{"type":"array","items":{"type":"object","properties":{"countryId":{"type":["integer","null"],"minimum":0},"offerId":{"type":"integer","exclusiveMinimum":0},"weight":{"type":"integer","minimum":1,"maximum":10000,"default":100}},"required":["offerId"],"additionalProperties":false},"maxItems":100},"status":{"type":"string","enum":["active","disabled"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The Funnel was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The Funnel request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Funnel was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The domain, Offer, Offer Type, or Landing Design is not usable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}},"delete":{"operationId":"deleteAffiliateFunnel","security":[{"cookieAuth":[]}],"tags":["Affiliation"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The Funnel was disabled without deleting conversion history.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The Funnel path is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid Affiliate session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The Funnel was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Funnel conflicts with active affiliation data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/overview":{"get":{"description":"Returns a PII-free operational summary derived from allowlisted agent telemetry queries.","operationId":"getAdminAiOverview","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":120},"required":false,"name":"model","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"productId","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"AI operations summary.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"outcomes":{"type":"object","properties":{"artifactsDelivered":{"type":"integer","minimum":0},"customerContinued":{"type":"integer","minimum":0},"customerReturned":{"type":"integer","minimum":0},"expertFirstResponses":{"type":"integer","minimum":0},"handoffsCompleted":{"type":"integer","minimum":0},"humanConnected":{"type":"integer","minimum":0},"humanDispatched":{"type":"integer","minimum":0},"humanFailed":{"type":"integer","minimum":0},"humanPaused":{"type":"integer","minimum":0},"humanRequested":{"type":"integer","minimum":0},"humanStarted":{"type":"integer","minimum":0},"signupsCompleted":{"type":"integer","minimum":0},"triageCompleted":{"type":"integer","minimum":0}},"required":["artifactsDelivered","customerContinued","customerReturned","expertFirstResponses","handoffsCompleted","humanConnected","humanDispatched","humanFailed","humanPaused","humanRequested","humanStarted","signupsCompleted","triageCompleted"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"string","enum":["exact_app"]},"safety":{"type":"object","properties":{"blockedTurns":{"type":"integer","minimum":0},"criticalEvents":{"type":"integer","minimum":0},"evaluationFailures":{"type":"integer","minimum":0},"evaluationsRequiringReview":{"type":"integer","minimum":0}},"required":["blockedTurns","criticalEvents","evaluationFailures","evaluationsRequiringReview"],"additionalProperties":false},"usage":{"type":"object","properties":{"activeConversations":{"type":"integer","minimum":0},"coverage":{"type":"string","enum":["all_model_calls","primary_agent_turns_only"]},"estimatedCostMicrousd":{"type":"integer","minimum":0},"estimatedCostProvenance":{"type":"string","enum":["estimated_app"]},"gatewayCostMicrousd":{"type":["integer","null"],"minimum":0},"gatewayCostAsOf":{"type":["string","null"],"format":"date-time"},"gatewayCostProvenance":{"type":"string","enum":["gateway_reported"]},"gatewayCoveragePercent":{"type":"number","minimum":0,"maximum":100},"gatewayPendingCalls":{"type":"integer","minimum":0},"gatewayReconciledCalls":{"type":"integer","minimum":0},"gatewayReconciliationStatus":{"type":"string","enum":["none","partial","complete"]},"modelCalls":{"type":"integer","minimum":0},"totalTokens":{"type":"integer","minimum":0}},"required":["activeConversations","coverage","estimatedCostMicrousd","estimatedCostProvenance","gatewayCostMicrousd","gatewayCostAsOf","gatewayCostProvenance","gatewayCoveragePercent","gatewayPendingCalls","gatewayReconciledCalls","gatewayReconciliationStatus","modelCalls","totalTokens"],"additionalProperties":false}},"required":["generatedAt","outcomes","period","provenance","safety","usage"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"AI operations telemetry is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/conversations":{"get":{"description":"Lists the canonical PostgreSQL conversation inventory enriched with telemetry when available, without titles, messages, attachment names, or other user content.","operationId":"listAdminAiConversations","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","enum":["keyword","triage"]},"required":false,"name":"agentMode","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"conversationId","in":"query"},{"schema":{"type":"string","maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":120},"required":false,"name":"model","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"productId","in":"query"},{"schema":{"type":"string","enum":["low","medium","high","critical"]},"required":false,"name":"riskLevel","in":"query"},{"schema":{"type":"string","enum":["dashboard","landing"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"PII-free canonical conversation inventory and telemetry coverage.","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"activityAt":{"type":"string","format":"date-time"},"agentMode":{"type":"string","enum":["keyword","triage"]},"archivedAt":{"type":["string","null"],"format":"date-time","default":null},"attachmentCount":{"type":["integer","null"],"minimum":0},"blockedTurnCount":{"type":["integer","null"],"minimum":0},"contentAvailable":{"type":"boolean"},"configuredModel":{"type":"string","minLength":1,"maxLength":120},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"estimatedCostMicrousd":{"type":["integer","null"],"minimum":0},"evaluationFailCount":{"type":["integer","null"],"minimum":0},"evaluationReviewCount":{"type":["integer","null"],"minimum":0},"firstTurnAt":{"type":["string","null"],"format":"date-time"},"highestRiskLevel":{"type":["string","null"],"enum":["low","medium","high","critical",null]},"lastTurnAt":{"type":["string","null"],"format":"date-time"},"models":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":120},"minItems":1,"maxItems":20},"productId":{"type":"integer","minimum":0},"source":{"type":"string","enum":["dashboard","landing"]},"subscriberUserId":{"type":"integer","minimum":0},"shareActive":{"type":"boolean","default":false},"telemetry":{"type":"object","properties":{"expectedTurnCount":{"type":"integer","minimum":0},"missingTurnCount":{"type":"integer","minimum":0},"observedTurnCount":{"type":"integer","minimum":0},"status":{"type":"string","enum":["complete","missing","not_expected","partial","unavailable"]},"unexpectedTurnCount":{"type":"integer","minimum":0}},"required":["expectedTurnCount","missingTurnCount","observedTurnCount","status","unexpectedTurnCount"],"additionalProperties":false},"toolCallCount":{"type":["integer","null"],"minimum":0},"totalTokens":{"type":["integer","null"],"minimum":0},"turnCount":{"type":["integer","null"],"minimum":0}},"required":["activityAt","agentMode","attachmentCount","blockedTurnCount","contentAvailable","configuredModel","conversationId","createdAt","estimatedCostMicrousd","evaluationFailCount","evaluationReviewCount","firstTurnAt","highestRiskLevel","lastTurnAt","models","productId","source","subscriberUserId","telemetry","toolCallCount","totalTokens","turnCount"],"additionalProperties":false},"maxItems":100},"generatedAt":{"type":"string","format":"date-time"},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"nextCursor":{"type":["string","null"],"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$","default":null},"offset":{"type":"integer","minimum":0},"total":{"type":["integer","null"],"minimum":0}},"required":["hasMore","limit","offset","total"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"object","properties":{"inventory":{"type":"string","enum":["exact_postgres"]},"telemetry":{"type":"string","enum":["exact_app","unavailable"]}},"required":["inventory","telemetry"],"additionalProperties":false}},"required":["conversations","generatedAt","pagination","period","provenance"],"additionalProperties":false}}}},"400":{"description":"The filters, pagination, or session cookie are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"AI operations telemetry is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/conversations/{conversationId}":{"get":{"description":"Returns canonical PostgreSQL metadata plus independently available turn, guardrail, execution, and evaluation telemetry for one conversation without loading its transcript. Canonical metadata remains available when a telemetry source is unavailable.","operationId":"getAdminAiConversation","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"PII-free conversation execution metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"activityAt":{"type":"string","format":"date-time"},"agentMode":{"type":"string","enum":["keyword","triage"]},"archivedAt":{"type":["string","null"],"format":"date-time","default":null},"attachmentCount":{"type":["integer","null"],"minimum":0},"blockedTurnCount":{"type":["integer","null"],"minimum":0},"contentAvailable":{"type":"boolean"},"configuredModel":{"type":"string","minLength":1,"maxLength":120},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"estimatedCostMicrousd":{"type":["integer","null"],"minimum":0},"evaluationFailCount":{"type":["integer","null"],"minimum":0},"evaluationReviewCount":{"type":["integer","null"],"minimum":0},"firstTurnAt":{"type":["string","null"],"format":"date-time"},"highestRiskLevel":{"type":["string","null"],"enum":["low","medium","high","critical",null]},"lastTurnAt":{"type":["string","null"],"format":"date-time"},"models":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":120},"minItems":1,"maxItems":20},"productId":{"type":"integer","minimum":0},"source":{"type":"string","enum":["dashboard","landing"]},"subscriberUserId":{"type":"integer","minimum":0},"shareActive":{"type":"boolean","default":false},"telemetry":{"type":"object","properties":{"expectedTurnCount":{"type":"integer","minimum":0},"missingTurnCount":{"type":"integer","minimum":0},"observedTurnCount":{"type":"integer","minimum":0},"status":{"type":"string","enum":["complete","missing","not_expected","partial","unavailable"]},"unexpectedTurnCount":{"type":"integer","minimum":0}},"required":["expectedTurnCount","missingTurnCount","observedTurnCount","status","unexpectedTurnCount"],"additionalProperties":false},"toolCallCount":{"type":["integer","null"],"minimum":0},"totalTokens":{"type":["integer","null"],"minimum":0},"turnCount":{"type":["integer","null"],"minimum":0}},"required":["activityAt","agentMode","attachmentCount","blockedTurnCount","contentAvailable","configuredModel","conversationId","createdAt","estimatedCostMicrousd","evaluationFailCount","evaluationReviewCount","firstTurnAt","highestRiskLevel","lastTurnAt","models","productId","source","subscriberUserId","telemetry","toolCallCount","totalTokens","turnCount"],"additionalProperties":false},"evaluations":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["expert_ai","triage"]},"agentTurnEventId":{"type":"string","minLength":1,"maxLength":255},"attachmentUseScore":{"type":["integer","null"],"minimum":0,"maximum":100},"conversationId":{"type":"string","format":"uuid"},"correctnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"evaluationDurationMs":{"type":"integer","minimum":0},"evaluationCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"evaluationTrigger":{"type":"string","enum":["error","sample","security","tool"]},"evaluationVersion":{"type":"string","minLength":1,"maxLength":120},"evaluatorModel":{"type":"string","minLength":1,"maxLength":120},"engineVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"eventId":{"type":"string","minLength":1,"maxLength":255},"groundednessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"handoffScore":{"type":["integer","null"],"minimum":0,"maximum":100},"helpfulnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"instructionFollowingScore":{"type":["integer","null"],"minimum":0,"maximum":100},"occurredAt":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["pass","fail","review"]},"policyVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"promptVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"sampleBucket":{"type":"integer","minimum":0,"maximum":9999},"safetyScore":{"type":["integer","null"],"minimum":0,"maximum":100},"toneScore":{"type":["integer","null"],"minimum":0,"maximum":100},"targetModel":{"type":["string","null"],"minLength":1,"maxLength":120},"telemetryVersion":{"type":["integer","null"],"exclusiveMinimum":0},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"triageScore":{"type":["integer","null"],"minimum":0,"maximum":100},"uncertaintyScore":{"type":["integer","null"],"minimum":0,"maximum":100}},"required":["actor","agentTurnEventId","attachmentUseScore","conversationId","correctnessScore","evaluationDurationMs","evaluationCodes","evaluationTrigger","evaluationVersion","evaluatorModel","engineVersion","eventId","groundednessScore","handoffScore","helpfulnessScore","instructionFollowingScore","occurredAt","outcome","policyVersion","promptVersion","sampleBucket","safetyScore","toneScore","targetModel","telemetryVersion","traceId","triageScore","uncertaintyScore"],"additionalProperties":false},"maxItems":500},"executions":{"type":"array","items":{"type":"object","properties":{"containerStarted":{"type":"boolean"},"durationMs":{"type":"integer","minimum":0},"escalationReason":{"type":["string","null"],"enum":["justbash_file_count_exceeded","justbash_input_format_unsupported","justbash_input_size_exceeded","justbash_operation_unsupported","justbash_output_format_unsupported","worker_output_format_unsupported",null]},"eventId":{"type":"string","minLength":1,"maxLength":255},"executionTier":{"type":"string","enum":["direct_model","worker","justbash","linux"]},"inputBytes":{"type":"integer","minimum":0},"occurredAt":{"type":"string","format":"date-time"},"operation":{"type":"string","enum":["answer","analyze_attachment","web_search","generate_csv","generate_json","generate_markdown","generate_text","generate_xlsx","combine_csv","filter_csv","filter_text","query_json","transform_text","browser_render","convert_document","imagemagick","native_tool","ocr","pandas"]},"outputBytes":{"type":"integer","minimum":0},"result":{"type":"string","enum":["escalated","failed","started","success"]},"sandboxAvoided":{"type":"boolean"},"submissionId":{"type":["string","null"],"minLength":1,"maxLength":160},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["containerStarted","durationMs","escalationReason","eventId","executionTier","inputBytes","occurredAt","operation","outputBytes","result","sandboxAvoided","submissionId","traceId"],"additionalProperties":false},"maxItems":1000},"generatedAt":{"type":"string","format":"date-time"},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"object","properties":{"conversationTelemetry":{"type":"string","enum":["exact_app","unavailable"]},"evaluations":{"type":"string","enum":["model_judgment","unavailable"]},"executions":{"type":"string","enum":["exact_app","unavailable"]},"inventory":{"type":"string","enum":["exact_postgres"]},"securityEvents":{"type":"string","enum":["exact_app","unavailable"]},"turns":{"type":"string","enum":["exact_app","unavailable"]}},"required":["conversationTelemetry","evaluations","executions","inventory","securityEvents","turns"],"additionalProperties":false},"securityEvents":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["expert_ai","triage"]},"agentTurnEventId":{"type":"string","minLength":1,"maxLength":255},"blockedReason":{"type":["string","null"],"minLength":1,"maxLength":120},"buffered":{"type":"boolean"},"conversationId":{"type":"string","format":"uuid"},"eventId":{"type":"string","minLength":1,"maxLength":255},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"granularity":{"type":"string","enum":["guardrail_decision"]},"guardrailDecision":{"type":"string","enum":["allow","rewrite","block"]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":["string","null"],"minLength":1,"maxLength":120},"messageId":{"type":"string","format":"uuid"},"occurredAt":{"type":"string","format":"date-time"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","minLength":1,"maxLength":120},"requiresJudge":{"type":"boolean"},"requiresBufferedResponse":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0},"riskCategories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20},"riskLevel":{"type":"string","enum":["low","medium","high","critical"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"type":["string","null"],"minLength":1,"maxLength":160},"toolName":{"type":["string","null"],"minLength":1,"maxLength":100},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"rewriteCount":{"type":"integer","minimum":0}},"required":["actor","agentTurnEventId","blockedReason","buffered","conversationId","eventId","executionTier","granularity","guardrailDecision","judgeLatencyMs","judgeModel","messageId","occurredAt","policyCodes","policyVersion","requiresJudge","requiresBufferedResponse","reviewCount","riskCategories","riskLevel","stage","submissionId","toolName","traceId","rewriteCount"],"additionalProperties":false},"maxItems":500},"truncation":{"type":"object","properties":{"evaluations":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"number","enum":[500]}},"required":["hasMore","limit"],"additionalProperties":false},"executions":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"number","enum":[1000]}},"required":["hasMore","limit"],"additionalProperties":false},"securityEvents":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"number","enum":[500]}},"required":["hasMore","limit"],"additionalProperties":false},"turns":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"number","enum":[500]}},"required":["hasMore","limit"],"additionalProperties":false}},"required":["evaluations","executions","securityEvents","turns"],"additionalProperties":false},"turns":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["expert_ai","triage"]},"attachmentCount":{"type":"integer","minimum":0},"durationMs":{"type":"integer","minimum":0},"engineVersion":{"type":"string","minLength":1,"maxLength":120},"estimatedCostMicrousd":{"type":"integer","minimum":0},"eventId":{"type":"string","minLength":1,"maxLength":255},"executionTier":{"type":"string","enum":["direct_model","worker","justbash","linux"]},"guardrailDecision":{"type":"string","enum":["allow","rewrite","block"]},"messageId":{"type":"string","format":"uuid"},"model":{"type":"string","minLength":1,"maxLength":120},"occurredAt":{"type":"string","format":"date-time"},"operation":{"type":"string","enum":["answer","analyze_attachment","web_search","generate_csv","generate_json","generate_markdown","generate_text","generate_xlsx","combine_csv","filter_csv","filter_text","query_json","transform_text","browser_render","convert_document","imagemagick","native_tool","ocr","pandas"]},"policyVersion":{"type":"string","minLength":1,"maxLength":120},"promptVersion":{"type":"string","minLength":1,"maxLength":120},"riskLevel":{"type":"string","enum":["low","medium","high","critical"]},"submissionId":{"type":"string","minLength":1,"maxLength":160},"telemetryVersion":{"type":"integer","exclusiveMinimum":0},"toolNames":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"totalTokens":{"type":"integer","minimum":0},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["actor","attachmentCount","durationMs","engineVersion","estimatedCostMicrousd","eventId","executionTier","guardrailDecision","messageId","model","occurredAt","operation","policyVersion","promptVersion","riskLevel","submissionId","telemetryVersion","toolNames","totalTokens","traceId"],"additionalProperties":false},"maxItems":500}},"required":["conversation","evaluations","executions","generatedAt","period","provenance","securityEvents","truncation","turns"],"additionalProperties":false}}}},"400":{"description":"The conversation identifier, query, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The canonical conversation store is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/conversations/{conversationId}/content":{"post":{"description":"Explicitly reveals a conversation transcript for an allowlisted audit purpose. Every request that reaches transcript storage records its success, not-found result, or failure in a durable audit ledger before disclosure, with the administrator, purpose, conversation, trace, outcome, and timestamp but never transcript content.","operationId":"accessAdminAiConversationContent","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["customer_support","incident_investigation","legal_request","quality_review","safety_review"]}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"The explicitly requested text transcript.","content":{"application/json":{"schema":{"type":"object","properties":{"accessedAt":{"type":"string","format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"messages":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["expert_ai","human","system","triage","user"]},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"sequence":{"type":"integer","minimum":0}},"required":["actor","content","createdAt","id","sequence"],"additionalProperties":false},"maxItems":10000},"truncated":{"type":"boolean"}},"required":["accessedAt","conversationId","messages","truncated"],"additionalProperties":false}}}},"400":{"description":"The conversation identifier, audit purpose, or session is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The conversation does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The transcript store is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/safety":{"get":{"description":"Returns granular application-recorded guardrail decisions and clearly labelled model-judged evaluations without user content. Both collections have independent bounded offset pagination while summary metrics remain scoped to the complete filtered period.","operationId":"getAdminAiSafety","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":120},"required":false,"name":"model","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"productId","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"evaluationsOffset","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"securityEventsOffset","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Safety and evaluation data.","content":{"application/json":{"schema":{"type":"object","properties":{"evaluations":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["expert_ai","triage"]},"agentTurnEventId":{"type":"string","minLength":1,"maxLength":255},"attachmentUseScore":{"type":["integer","null"],"minimum":0,"maximum":100},"conversationId":{"type":"string","format":"uuid"},"correctnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"evaluationDurationMs":{"type":"integer","minimum":0},"evaluationCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"evaluationTrigger":{"type":"string","enum":["error","sample","security","tool"]},"evaluationVersion":{"type":"string","minLength":1,"maxLength":120},"evaluatorModel":{"type":"string","minLength":1,"maxLength":120},"engineVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"eventId":{"type":"string","minLength":1,"maxLength":255},"groundednessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"handoffScore":{"type":["integer","null"],"minimum":0,"maximum":100},"helpfulnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"instructionFollowingScore":{"type":["integer","null"],"minimum":0,"maximum":100},"occurredAt":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["pass","fail","review"]},"policyVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"promptVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"sampleBucket":{"type":"integer","minimum":0,"maximum":9999},"safetyScore":{"type":["integer","null"],"minimum":0,"maximum":100},"toneScore":{"type":["integer","null"],"minimum":0,"maximum":100},"targetModel":{"type":["string","null"],"minLength":1,"maxLength":120},"telemetryVersion":{"type":["integer","null"],"exclusiveMinimum":0},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"triageScore":{"type":["integer","null"],"minimum":0,"maximum":100},"uncertaintyScore":{"type":["integer","null"],"minimum":0,"maximum":100}},"required":["actor","agentTurnEventId","attachmentUseScore","conversationId","correctnessScore","evaluationDurationMs","evaluationCodes","evaluationTrigger","evaluationVersion","evaluatorModel","engineVersion","eventId","groundednessScore","handoffScore","helpfulnessScore","instructionFollowingScore","occurredAt","outcome","policyVersion","promptVersion","sampleBucket","safetyScore","toneScore","targetModel","telemetryVersion","traceId","triageScore","uncertaintyScore"],"additionalProperties":false},"maxItems":100},"generatedAt":{"type":"string","format":"date-time"},"pagination":{"type":"object","properties":{"evaluations":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0,"maximum":100000}},"required":["hasMore","limit","offset"],"additionalProperties":false},"securityEvents":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0,"maximum":100000}},"required":["hasMore","limit","offset"],"additionalProperties":false}},"required":["evaluations","securityEvents"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"object","properties":{"evaluations":{"type":"string","enum":["model_judgment"]},"securityEvents":{"type":"string","enum":["exact_app"]}},"required":["evaluations","securityEvents"],"additionalProperties":false},"securityEvents":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string","enum":["expert_ai","triage"]},"agentTurnEventId":{"type":"string","minLength":1,"maxLength":255},"blockedReason":{"type":["string","null"],"minLength":1,"maxLength":120},"buffered":{"type":"boolean"},"conversationId":{"type":"string","format":"uuid"},"eventId":{"type":"string","minLength":1,"maxLength":255},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"granularity":{"type":"string","enum":["guardrail_decision"]},"guardrailDecision":{"type":"string","enum":["allow","rewrite","block"]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":["string","null"],"minLength":1,"maxLength":120},"messageId":{"type":"string","format":"uuid"},"occurredAt":{"type":"string","format":"date-time"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","minLength":1,"maxLength":120},"requiresJudge":{"type":"boolean"},"requiresBufferedResponse":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0},"riskCategories":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20},"riskLevel":{"type":"string","enum":["low","medium","high","critical"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"type":["string","null"],"minLength":1,"maxLength":160},"toolName":{"type":["string","null"],"minLength":1,"maxLength":100},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"rewriteCount":{"type":"integer","minimum":0}},"required":["actor","agentTurnEventId","blockedReason","buffered","conversationId","eventId","executionTier","granularity","guardrailDecision","judgeLatencyMs","judgeModel","messageId","occurredAt","policyCodes","policyVersion","requiresJudge","requiresBufferedResponse","reviewCount","riskCategories","riskLevel","stage","submissionId","toolName","traceId","rewriteCount"],"additionalProperties":false},"maxItems":100},"summary":{"type":"object","properties":{"averageJudgeLatencyMs":{"type":"integer","minimum":0},"averageJudgedTurnCostMicrousd":{"type":["integer","null"],"minimum":0},"averageJudgedTurnDurationMs":{"type":["integer","null"],"minimum":0},"averageUnjudgedTurnCostMicrousd":{"type":["integer","null"],"minimum":0},"averageUnjudgedTurnDurationMs":{"type":["integer","null"],"minimum":0},"blockedTurns":{"type":"integer","minimum":0},"criticalEvents":{"type":"integer","minimum":0},"evaluationFailures":{"type":"integer","minimum":0},"evaluationPasses":{"type":"integer","minimum":0},"evaluationsRequiringReview":{"type":"integer","minimum":0},"judgeCalls":{"type":"integer","minimum":0},"judgeCostMicrousd":{"type":["integer","null"],"minimum":0},"judgedEvents":{"type":"integer","minimum":0},"judgedTurns":{"type":"integer","minimum":0},"rewrites":{"type":"integer","minimum":0},"unjudgedTurns":{"type":"integer","minimum":0}},"required":["averageJudgeLatencyMs","averageJudgedTurnCostMicrousd","averageJudgedTurnDurationMs","averageUnjudgedTurnCostMicrousd","averageUnjudgedTurnDurationMs","blockedTurns","criticalEvents","evaluationFailures","evaluationPasses","evaluationsRequiringReview","judgeCalls","judgeCostMicrousd","judgedEvents","judgedTurns","rewrites","unjudgedTurns"],"additionalProperties":false}},"required":["evaluations","generatedAt","pagination","period","provenance","securityEvents","summary"],"additionalProperties":false}}}},"400":{"description":"The query, pagination, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"AI operations telemetry is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/incidents":{"get":{"description":"Lists the exact PostgreSQL incident queue created from critical guardrail events or explicit administrator flags. Responses contain only structured safety metadata and DLP-validated administrative notes, never transcripts or customer PII.","operationId":"listAdminSafetyIncidents","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations","Safety Incidents"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"assigneeAdminUserId","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"conversationId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["guardrail","manual"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Content-free safety incident queue.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"incidents":{"type":"array","items":{"type":"object","properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":["string","null"],"format":"date-time"},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"resolvedAt":{"type":["string","null"],"format":"date-time"},"securityEventId":{"type":"string","minLength":1,"maxLength":255},"snapshot":{"oneOf":[{"type":"object","properties":{"actor":{"type":["string","null"],"enum":["expert_ai","triage",null]},"blockedReason":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"buffered":{"type":"boolean"},"decision":{"type":"string","enum":["allow","rewrite","block"]},"eventDatetime":{"type":"string","format":"date-time"},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":"string","pattern":"^(?:|[A-Za-z0-9][A-Za-z0-9._/-]{0,119})$"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"requiresBufferedResponse":{"type":"boolean"},"requiresJudge":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0,"maximum":100},"rewriteCount":{"type":"integer","minimum":0,"maximum":100},"riskCategories":{"type":"array","items":{"type":"string","enum":["code_execution","credential_exfiltration","cross_user_data","dangerous_activity","dangerous_artifact","financial_high_risk","legal_high_risk","limit_evasion","malware","medical_emergency","medical_high_risk","minor_safety","network_access","prompt_injection","self_harm","system_prompt_extraction","untrusted_attachment","violence"]},"maxItems":18},"riskLevel":{"type":"string","enum":["critical"]},"source":{"type":"string","enum":["guardrail"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"toolName":{"type":"string","pattern":"^(?:|[A-Za-z][A-Za-z0-9._:-]{0,99})$"},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["actor","blockedReason","buffered","decision","eventDatetime","executionTier","judgeLatencyMs","judgeModel","policyCodes","policyVersion","requiresBufferedResponse","requiresJudge","reviewCount","rewriteCount","riskCategories","riskLevel","source","stage","submissionId","toolName","traceId"],"additionalProperties":false},{"type":"object","properties":{"eventDatetime":{"type":"string","format":"date-time"},"policyCode":{"type":"string","enum":["ADMIN_MANUAL_FLAG"]},"source":{"type":"string","enum":["manual"]},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["eventDatetime","policyCode","source","traceId"],"additionalProperties":false}]},"source":{"type":"string","enum":["guardrail","manual"]},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","decidedAt","lastActorAdminUserId","note","resolvedAt","securityEventId","snapshot","source","status","updatedAt","version"],"additionalProperties":false},"maxItems":100},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["hasMore","limit","offset","total"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"string","enum":["exact_postgres"]}},"required":["generatedAt","incidents","pagination","period","provenance"],"additionalProperties":false}}}},"400":{"description":"The filters, pagination, or session cookie are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The safety incident ledger is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/incidents/{conversationId}/{securityEventId}":{"get":{"description":"Returns one content-free safety incident and its append-only PostgreSQL audit trail without loading conversation messages, attachments, names, emails, or other customer content.","operationId":"getAdminSafetyIncident","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations","Safety Incidents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"securityEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Incident state and content-free audit evidence.","content":{"application/json":{"schema":{"type":"object","properties":{"auditTrail":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["created","flagged","claimed","decided","resolved","escalated","share_revoked","archived","restored"]},"actorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"actorKind":{"type":"string","enum":["system","admin"]},"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"fromStatus":{"type":["string","null"],"enum":["pending","in_review","confirmed_issue","false_positive","resolved",null]},"id":{"type":"integer","exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"securityEventId":{"type":"string","minLength":1,"maxLength":255},"snapshot":{"oneOf":[{"type":"object","properties":{"actor":{"type":["string","null"],"enum":["expert_ai","triage",null]},"blockedReason":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"buffered":{"type":"boolean"},"decision":{"type":"string","enum":["allow","rewrite","block"]},"eventDatetime":{"type":"string","format":"date-time"},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":"string","pattern":"^(?:|[A-Za-z0-9][A-Za-z0-9._/-]{0,119})$"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"requiresBufferedResponse":{"type":"boolean"},"requiresJudge":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0,"maximum":100},"rewriteCount":{"type":"integer","minimum":0,"maximum":100},"riskCategories":{"type":"array","items":{"type":"string","enum":["code_execution","credential_exfiltration","cross_user_data","dangerous_activity","dangerous_artifact","financial_high_risk","legal_high_risk","limit_evasion","malware","medical_emergency","medical_high_risk","minor_safety","network_access","prompt_injection","self_harm","system_prompt_extraction","untrusted_attachment","violence"]},"maxItems":18},"riskLevel":{"type":"string","enum":["critical"]},"source":{"type":"string","enum":["guardrail"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"toolName":{"type":"string","pattern":"^(?:|[A-Za-z][A-Za-z0-9._:-]{0,99})$"},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["actor","blockedReason","buffered","decision","eventDatetime","executionTier","judgeLatencyMs","judgeModel","policyCodes","policyVersion","requiresBufferedResponse","requiresJudge","reviewCount","rewriteCount","riskCategories","riskLevel","source","stage","submissionId","toolName","traceId"],"additionalProperties":false},{"type":"object","properties":{"eventDatetime":{"type":"string","format":"date-time"},"policyCode":{"type":"string","enum":["ADMIN_MANUAL_FLAG"]},"source":{"type":"string","enum":["manual"]},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["eventDatetime","policyCode","source","traceId"],"additionalProperties":false}]},"source":{"type":"string","enum":["guardrail","manual"]},"toStatus":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"version":{"type":"integer","exclusiveMinimum":0}},"required":["action","actorAdminUserId","actorKind","assigneeAdminUserId","conversationId","createdAt","fromStatus","id","note","securityEventId","snapshot","source","toStatus","version"],"additionalProperties":false},"maxItems":1000},"generatedAt":{"type":"string","format":"date-time"},"incident":{"type":"object","properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":["string","null"],"format":"date-time"},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"resolvedAt":{"type":["string","null"],"format":"date-time"},"securityEventId":{"type":"string","minLength":1,"maxLength":255},"snapshot":{"oneOf":[{"type":"object","properties":{"actor":{"type":["string","null"],"enum":["expert_ai","triage",null]},"blockedReason":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"buffered":{"type":"boolean"},"decision":{"type":"string","enum":["allow","rewrite","block"]},"eventDatetime":{"type":"string","format":"date-time"},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":"string","pattern":"^(?:|[A-Za-z0-9][A-Za-z0-9._/-]{0,119})$"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"requiresBufferedResponse":{"type":"boolean"},"requiresJudge":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0,"maximum":100},"rewriteCount":{"type":"integer","minimum":0,"maximum":100},"riskCategories":{"type":"array","items":{"type":"string","enum":["code_execution","credential_exfiltration","cross_user_data","dangerous_activity","dangerous_artifact","financial_high_risk","legal_high_risk","limit_evasion","malware","medical_emergency","medical_high_risk","minor_safety","network_access","prompt_injection","self_harm","system_prompt_extraction","untrusted_attachment","violence"]},"maxItems":18},"riskLevel":{"type":"string","enum":["critical"]},"source":{"type":"string","enum":["guardrail"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"toolName":{"type":"string","pattern":"^(?:|[A-Za-z][A-Za-z0-9._:-]{0,99})$"},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["actor","blockedReason","buffered","decision","eventDatetime","executionTier","judgeLatencyMs","judgeModel","policyCodes","policyVersion","requiresBufferedResponse","requiresJudge","reviewCount","rewriteCount","riskCategories","riskLevel","source","stage","submissionId","toolName","traceId"],"additionalProperties":false},{"type":"object","properties":{"eventDatetime":{"type":"string","format":"date-time"},"policyCode":{"type":"string","enum":["ADMIN_MANUAL_FLAG"]},"source":{"type":"string","enum":["manual"]},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["eventDatetime","policyCode","source","traceId"],"additionalProperties":false}]},"source":{"type":"string","enum":["guardrail","manual"]},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","decidedAt","lastActorAdminUserId","note","resolvedAt","securityEventId","snapshot","source","status","updatedAt","version"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"string","enum":["exact_postgres"]}},"required":["auditTrail","generatedAt","incident","period","provenance"],"additionalProperties":false}}}},"400":{"description":"The incident key, query, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The safety incident does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The safety incident ledger is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/incidents/{conversationId}/{securityEventId}/claim":{"post":{"description":"Claims one pending incident for the authenticated administrator under optimistic concurrency. The required note crosses the content-free DLP boundary before persistence.","operationId":"claimAdminSafetyIncident","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations","Safety Incidents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"securityEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0},"note":{"type":"string","minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."}},"required":["expectedVersion","note"],"additionalProperties":false}}}},"responses":{"200":{"description":"Mutation outcome, including optimistic concurrency conflicts.","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":["object","null"],"properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":["string","null"],"format":"date-time"},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"resolvedAt":{"type":["string","null"],"format":"date-time"},"securityEventId":{"type":"string","minLength":1,"maxLength":255},"snapshot":{"oneOf":[{"type":"object","properties":{"actor":{"type":["string","null"],"enum":["expert_ai","triage",null]},"blockedReason":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"buffered":{"type":"boolean"},"decision":{"type":"string","enum":["allow","rewrite","block"]},"eventDatetime":{"type":"string","format":"date-time"},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":"string","pattern":"^(?:|[A-Za-z0-9][A-Za-z0-9._/-]{0,119})$"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"requiresBufferedResponse":{"type":"boolean"},"requiresJudge":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0,"maximum":100},"rewriteCount":{"type":"integer","minimum":0,"maximum":100},"riskCategories":{"type":"array","items":{"type":"string","enum":["code_execution","credential_exfiltration","cross_user_data","dangerous_activity","dangerous_artifact","financial_high_risk","legal_high_risk","limit_evasion","malware","medical_emergency","medical_high_risk","minor_safety","network_access","prompt_injection","self_harm","system_prompt_extraction","untrusted_attachment","violence"]},"maxItems":18},"riskLevel":{"type":"string","enum":["critical"]},"source":{"type":"string","enum":["guardrail"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"toolName":{"type":"string","pattern":"^(?:|[A-Za-z][A-Za-z0-9._:-]{0,99})$"},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["actor","blockedReason","buffered","decision","eventDatetime","executionTier","judgeLatencyMs","judgeModel","policyCodes","policyVersion","requiresBufferedResponse","requiresJudge","reviewCount","rewriteCount","riskCategories","riskLevel","source","stage","submissionId","toolName","traceId"],"additionalProperties":false},{"type":"object","properties":{"eventDatetime":{"type":"string","format":"date-time"},"policyCode":{"type":"string","enum":["ADMIN_MANUAL_FLAG"]},"source":{"type":"string","enum":["manual"]},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["eventDatetime","policyCode","source","traceId"],"additionalProperties":false}]},"source":{"type":"string","enum":["guardrail","manual"]},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","decidedAt","lastActorAdminUserId","note","resolvedAt","securityEventId","snapshot","source","status","updatedAt","version"],"additionalProperties":false},"outcome":{"type":"string","enum":["created","updated","idempotent","conflict","invalid_transition","missing"]}},"required":["incident","outcome"],"additionalProperties":false}}}},"400":{"description":"The incident key, expected version, note, action, or session cookie is invalid. Notes containing customer content or sensitive data are rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The safety incident ledger is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/incidents/{conversationId}/{securityEventId}/resolve":{"post":{"description":"Records a confirmed issue or false positive, or resolves an already confirmed issue, under optimistic concurrency with an append-only content-free audit record.","operationId":"resolveAdminSafetyIncident","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations","Safety Incidents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"securityEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0},"note":{"type":"string","minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"status":{"type":"string","enum":["confirmed_issue","false_positive","resolved"]}},"required":["expectedVersion","note","status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Mutation outcome, including optimistic concurrency conflicts.","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":["object","null"],"properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":["string","null"],"format":"date-time"},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"resolvedAt":{"type":["string","null"],"format":"date-time"},"securityEventId":{"type":"string","minLength":1,"maxLength":255},"snapshot":{"oneOf":[{"type":"object","properties":{"actor":{"type":["string","null"],"enum":["expert_ai","triage",null]},"blockedReason":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"buffered":{"type":"boolean"},"decision":{"type":"string","enum":["allow","rewrite","block"]},"eventDatetime":{"type":"string","format":"date-time"},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":"string","pattern":"^(?:|[A-Za-z0-9][A-Za-z0-9._/-]{0,119})$"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"requiresBufferedResponse":{"type":"boolean"},"requiresJudge":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0,"maximum":100},"rewriteCount":{"type":"integer","minimum":0,"maximum":100},"riskCategories":{"type":"array","items":{"type":"string","enum":["code_execution","credential_exfiltration","cross_user_data","dangerous_activity","dangerous_artifact","financial_high_risk","legal_high_risk","limit_evasion","malware","medical_emergency","medical_high_risk","minor_safety","network_access","prompt_injection","self_harm","system_prompt_extraction","untrusted_attachment","violence"]},"maxItems":18},"riskLevel":{"type":"string","enum":["critical"]},"source":{"type":"string","enum":["guardrail"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"toolName":{"type":"string","pattern":"^(?:|[A-Za-z][A-Za-z0-9._:-]{0,99})$"},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["actor","blockedReason","buffered","decision","eventDatetime","executionTier","judgeLatencyMs","judgeModel","policyCodes","policyVersion","requiresBufferedResponse","requiresJudge","reviewCount","rewriteCount","riskCategories","riskLevel","source","stage","submissionId","toolName","traceId"],"additionalProperties":false},{"type":"object","properties":{"eventDatetime":{"type":"string","format":"date-time"},"policyCode":{"type":"string","enum":["ADMIN_MANUAL_FLAG"]},"source":{"type":"string","enum":["manual"]},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["eventDatetime","policyCode","source","traceId"],"additionalProperties":false}]},"source":{"type":"string","enum":["guardrail","manual"]},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","decidedAt","lastActorAdminUserId","note","resolvedAt","securityEventId","snapshot","source","status","updatedAt","version"],"additionalProperties":false},"outcome":{"type":"string","enum":["created","updated","idempotent","conflict","invalid_transition","missing"]}},"required":["incident","outcome"],"additionalProperties":false}}}},"400":{"description":"The incident key, expected version, note, action, or session cookie is invalid. Notes containing customer content or sensitive data are rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The safety incident ledger is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/conversations/{conversationId}/actions":{"post":{"description":"Flags or escalates a conversation, revokes its public share, or archives/restores it. The conversation mutation, incident version update, and append-only audit entry commit atomically. Termination is deliberately not part of this contract.","operationId":"applyAdminSafetyConversationAction","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations","Safety Incidents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["flag","escalate","revoke_share","archive","restore"]},"expectedIncidentVersion":{"type":"integer","exclusiveMinimum":0},"incidentSecurityEventId":{"type":"string","minLength":1,"maxLength":255},"note":{"type":"string","minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."}},"required":["action","note"],"additionalProperties":false}}}},"responses":{"200":{"description":"Mutation outcome, including optimistic concurrency conflicts.","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":["object","null"],"properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":["string","null"],"format":"date-time"},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"resolvedAt":{"type":["string","null"],"format":"date-time"},"securityEventId":{"type":"string","minLength":1,"maxLength":255},"snapshot":{"oneOf":[{"type":"object","properties":{"actor":{"type":["string","null"],"enum":["expert_ai","triage",null]},"blockedReason":{"type":"string","pattern":"^(?:|[A-Z_][A-Z0-9_.:-]{0,95})$"},"buffered":{"type":"boolean"},"decision":{"type":"string","enum":["allow","rewrite","block"]},"eventDatetime":{"type":"string","format":"date-time"},"executionTier":{"type":["string","null"],"enum":["direct_model","worker","justbash","linux",null]},"judgeLatencyMs":{"type":"integer","minimum":0},"judgeModel":{"type":"string","pattern":"^(?:|[A-Za-z0-9][A-Za-z0-9._/-]{0,119})$"},"policyCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"policyVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"requiresBufferedResponse":{"type":"boolean"},"requiresJudge":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0,"maximum":100},"rewriteCount":{"type":"integer","minimum":0,"maximum":100},"riskCategories":{"type":"array","items":{"type":"string","enum":["code_execution","credential_exfiltration","cross_user_data","dangerous_activity","dangerous_artifact","financial_high_risk","legal_high_risk","limit_evasion","malware","medical_emergency","medical_high_risk","minor_safety","network_access","prompt_injection","self_harm","system_prompt_extraction","untrusted_attachment","violence"]},"maxItems":18},"riskLevel":{"type":"string","enum":["critical"]},"source":{"type":"string","enum":["guardrail"]},"stage":{"type":"string","enum":["input","pre_tool","tool_result","output","attachment"]},"submissionId":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"}]},"toolName":{"type":"string","pattern":"^(?:|[A-Za-z][A-Za-z0-9._:-]{0,99})$"},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["actor","blockedReason","buffered","decision","eventDatetime","executionTier","judgeLatencyMs","judgeModel","policyCodes","policyVersion","requiresBufferedResponse","requiresJudge","reviewCount","rewriteCount","riskCategories","riskLevel","source","stage","submissionId","toolName","traceId"],"additionalProperties":false},{"type":"object","properties":{"eventDatetime":{"type":"string","format":"date-time"},"policyCode":{"type":"string","enum":["ADMIN_MANUAL_FLAG"]},"source":{"type":"string","enum":["manual"]},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["eventDatetime","policyCode","source","traceId"],"additionalProperties":false}]},"source":{"type":"string","enum":["guardrail","manual"]},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","decidedAt","lastActorAdminUserId","note","resolvedAt","securityEventId","snapshot","source","status","updatedAt","version"],"additionalProperties":false},"outcome":{"type":"string","enum":["created","updated","idempotent","conflict","invalid_transition","missing"]}},"required":["incident","outcome"],"additionalProperties":false}}}},"400":{"description":"The incident key, expected version, note, action, or session cookie is invalid. Notes containing customer content or sensitive data are rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The safety incident ledger is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/usage":{"get":{"description":"Returns every application-recorded model purpose, status, token count, and estimated gateway cost from the model-call ledger. Model-call rows use bounded offset pagination without changing full-period aggregates. Cost values remain estimates, not provider invoices.","operationId":"getAdminAiUsage","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":120},"required":false,"name":"model","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"productId","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"modelCallsOffset","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Model usage and call metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"byModel":{"type":"array","items":{"type":"object","properties":{"blockedCalls":{"type":"integer","minimum":0},"cacheReadTokens":{"type":"integer","minimum":0},"cacheWriteTokens":{"type":"integer","minimum":0},"calls":{"type":"integer","minimum":0},"errorCalls":{"type":"integer","minimum":0},"estimatedCostMicrousd":{"type":"integer","minimum":0},"gatewayCostMicrousd":{"type":["integer","null"],"minimum":0},"inputTokens":{"type":"integer","minimum":0},"model":{"type":"string","minLength":1,"maxLength":120},"outputTokens":{"type":"integer","minimum":0},"successCalls":{"type":"integer","minimum":0},"totalTokens":{"type":"integer","minimum":0}},"required":["blockedCalls","cacheReadTokens","cacheWriteTokens","calls","errorCalls","estimatedCostMicrousd","gatewayCostMicrousd","inputTokens","model","outputTokens","successCalls","totalTokens"],"additionalProperties":false},"maxItems":100},"byPurpose":{"type":"array","items":{"type":"object","properties":{"blockedCalls":{"type":"integer","minimum":0},"cacheReadTokens":{"type":"integer","minimum":0},"cacheWriteTokens":{"type":"integer","minimum":0},"calls":{"type":"integer","minimum":0},"errorCalls":{"type":"integer","minimum":0},"estimatedCostMicrousd":{"type":"integer","minimum":0},"gatewayCostMicrousd":{"type":["integer","null"],"minimum":0},"inputTokens":{"type":"integer","minimum":0},"outputTokens":{"type":"integer","minimum":0},"successCalls":{"type":"integer","minimum":0},"totalTokens":{"type":"integer","minimum":0},"purpose":{"type":"string","enum":["agent","compaction","compaction_prefix","safety","web_search","title","evaluation"]}},"required":["blockedCalls","cacheReadTokens","cacheWriteTokens","calls","errorCalls","estimatedCostMicrousd","gatewayCostMicrousd","inputTokens","outputTokens","successCalls","totalTokens","purpose"],"additionalProperties":false},"maxItems":7},"coverage":{"type":"string","enum":["all_model_calls","primary_agent_turns_only"]},"generatedAt":{"type":"string","format":"date-time"},"modelCalls":{"type":"array","items":{"type":"object","properties":{"cacheReadTokens":{"type":"integer","minimum":0},"cacheWriteTokens":{"type":"integer","minimum":0},"chargeScope":{"type":"string","enum":["customer","platform"]},"conversationId":{"type":"string","format":"uuid"},"durationMs":{"type":"integer","minimum":0},"errorClass":{"type":["string","null"],"minLength":1,"maxLength":120},"estimatedCostMicrousd":{"type":"integer","minimum":0},"eventId":{"type":"string","minLength":1,"maxLength":255},"gatewayCostMicrousd":{"type":["integer","null"],"minimum":0},"gatewayLogId":{"type":["string","null"],"minLength":1,"maxLength":255},"inputTokens":{"type":"integer","minimum":0},"model":{"type":"string","minLength":1,"maxLength":120},"occurredAt":{"type":"string","format":"date-time"},"outputTokens":{"type":"integer","minimum":0},"provider":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","enum":["agent","compaction","compaction_prefix","safety","web_search","title","evaluation"]},"status":{"type":"string","enum":["success","error","blocked"]},"submissionId":{"type":["string","null"],"minLength":1,"maxLength":160},"totalTokens":{"type":"integer","minimum":0},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"turnId":{"type":"string","minLength":1,"maxLength":160}},"required":["cacheReadTokens","cacheWriteTokens","chargeScope","conversationId","durationMs","errorClass","estimatedCostMicrousd","eventId","gatewayCostMicrousd","gatewayLogId","inputTokens","model","occurredAt","outputTokens","provider","purpose","status","submissionId","totalTokens","traceId","turnId"],"additionalProperties":false},"maxItems":100},"pagination":{"type":"object","properties":{"modelCalls":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0,"maximum":100000}},"required":["hasMore","limit","offset"],"additionalProperties":false}},"required":["modelCalls"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"string","enum":["mixed_gateway_estimate"]},"summary":{"type":"object","properties":{"blockedCalls":{"type":"integer","minimum":0},"cacheReadTokens":{"type":"integer","minimum":0},"cacheWriteTokens":{"type":"integer","minimum":0},"calls":{"type":"integer","minimum":0},"errorCalls":{"type":"integer","minimum":0},"estimatedCostMicrousd":{"type":"integer","minimum":0},"estimatedCostProvenance":{"type":"string","enum":["estimated_app"]},"gatewayCostMicrousd":{"type":["integer","null"],"minimum":0},"gatewayCostAsOf":{"type":["string","null"],"format":"date-time"},"gatewayCostProvenance":{"type":"string","enum":["gateway_reported"]},"gatewayCoveragePercent":{"type":"number","minimum":0,"maximum":100},"gatewayPendingCalls":{"type":"integer","minimum":0},"gatewayReconciledCalls":{"type":"integer","minimum":0},"gatewayReconciliationStatus":{"type":"string","enum":["none","partial","complete"]},"inputTokens":{"type":"integer","minimum":0},"outputTokens":{"type":"integer","minimum":0},"successCalls":{"type":"integer","minimum":0},"totalTokens":{"type":"integer","minimum":0}},"required":["blockedCalls","cacheReadTokens","cacheWriteTokens","calls","errorCalls","estimatedCostMicrousd","estimatedCostProvenance","gatewayCostMicrousd","gatewayCostAsOf","gatewayCostProvenance","gatewayCoveragePercent","gatewayPendingCalls","gatewayReconciledCalls","gatewayReconciliationStatus","inputTokens","outputTokens","successCalls","totalTokens"],"additionalProperties":false}},"required":["byModel","byPurpose","coverage","generatedAt","modelCalls","pagination","period","provenance","summary"],"additionalProperties":false}}}},"400":{"description":"The query, pagination, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"AI operations telemetry is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/quotas":{"get":{"description":"Lists weekly AI spend limits and balances by subscriber, entitlement and plan, including explicit fail-closed unconfigured entitlements and pending AI Gateway reconciliation. Email filtering is performed server-side against the account email, while response rows expose only a stable maskedEmail value.","operationId":"listAdminAiQuotas","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":320},"required":false,"name":"email","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false,"name":"exhausted","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"planId","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"productId","in":"query"},{"schema":{"type":"string","enum":["trialing","active","past_due","ended","demo","unconfigured"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"subscriberUserId","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Weekly subscriber quotas.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["hasMore","limit","offset","total"],"additionalProperties":false},"provenance":{"type":"string","enum":["exact_postgres"]},"quotas":{"type":"array","items":{"type":"object","properties":{"gatewayStatus":{"type":"string","enum":["not_applicable","pending","estimated","reconciled","mixed"]},"maskedEmail":{"type":"string","minLength":3,"maxLength":320,"pattern":"^[^@\\s]+@[^@\\s]+$"},"membership":{"type":["object","null"],"properties":{"aiWeeklyLimitMicrousd":{"type":["integer","null"],"minimum":0},"id":{"type":"integer","exclusiveMinimum":0},"planId":{"type":"integer","exclusiveMinimum":0},"planName":{"type":"string","minLength":1,"maxLength":100},"startedAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["trialing","active","past_due","ended"]}},"required":["aiWeeklyLimitMicrousd","id","planId","planName","startedAt","status"],"additionalProperties":false},"periodEnd":{"type":"string","format":"date-time"},"periodStart":{"type":"string","format":"date-time"},"plan":{"type":["object","null"],"properties":{"aiWeeklyLimitMicrousd":{"type":["integer","null"],"minimum":0},"id":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["active","archived"]}},"required":["aiWeeklyLimitMicrousd","id","name","status"],"additionalProperties":false},"productId":{"type":"integer","exclusiveMinimum":0},"reconciled":{"type":"boolean"},"status":{"type":"string","enum":["trialing","active","past_due","ended","demo","unconfigured"]},"subscriberUserId":{"type":"integer","exclusiveMinimum":0},"updatedAt":{"type":"string","format":"date-time"},"costCeilingBreached":{"type":"boolean"},"exhausted":{"type":"boolean"},"limitMicrousd":{"type":["integer","null"],"minimum":0},"nextTurnReservationMicrousd":{"type":["integer","null"],"exclusiveMinimum":0},"remainingMicrousd":{"type":["integer","null"],"minimum":0},"reservedMicrousd":{"type":"integer","minimum":0},"settledMicrousd":{"type":"integer","minimum":0},"usedPercent":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["gatewayStatus","maskedEmail","membership","periodEnd","periodStart","plan","productId","reconciled","status","subscriberUserId","updatedAt","costCeilingBreached","exhausted","limitMicrousd","nextTurnReservationMicrousd","remainingMicrousd","reservedMicrousd","settledMicrousd","usedPercent"],"additionalProperties":false},"maxItems":100},"summaryByPlan":{"type":"array","items":{"type":"object","properties":{"exhaustedUsers":{"type":"integer","minimum":0},"limitMicrousd":{"type":["integer","null"],"minimum":0},"pendingReconciliationUsers":{"type":"integer","minimum":0},"planId":{"type":["integer","null"],"exclusiveMinimum":0},"planName":{"type":["string","null"],"minLength":1,"maxLength":100},"planStatus":{"type":["string","null"],"enum":["active","archived",null]},"reconciledUsers":{"type":"integer","minimum":0},"remainingMicrousd":{"type":["integer","null"],"minimum":0},"reservedMicrousd":{"type":"integer","minimum":0},"settledMicrousd":{"type":"integer","minimum":0},"usedPercent":{"type":["number","null"],"minimum":0,"maximum":100},"users":{"type":"integer","minimum":0}},"required":["exhaustedUsers","limitMicrousd","pendingReconciliationUsers","planId","planName","planStatus","reconciledUsers","remainingMicrousd","reservedMicrousd","settledMicrousd","usedPercent","users"],"additionalProperties":false},"maxItems":500}},"required":["generatedAt","pagination","provenance","quotas","summaryByPlan"],"additionalProperties":false}}}},"400":{"description":"The filters, pagination, or session cookie are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The quota ledger is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/quotas/{subscriberUserId}/override":{"post":{"description":"Overrides one subscriber's current weekly AI allowance under optimistic concurrency. The mutation is serialized with turn admission and writes an append-only audit record containing the administrator, previous and next limits, reason, trace and timestamp without customer content.","operationId":"overrideAdminAiQuota","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"subscriberUserId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedLimitMicrousd":{"type":"integer","minimum":0},"limitMicrousd":{"type":"integer","exclusiveMinimum":0},"periodStart":{"type":"string","format":"date-time"},"reason":{"type":"string","minLength":10,"maxLength":500}},"required":["expectedLimitMicrousd","limitMicrousd","periodStart","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"Updated weekly quota and immutable audit identifier.","content":{"application/json":{"schema":{"type":"object","properties":{"adminUserId":{"type":"integer","exclusiveMinimum":0},"auditId":{"type":"string","format":"uuid"},"costCeilingBreached":{"type":"boolean"},"exhausted":{"type":"boolean"},"limitMicrousd":{"type":"integer","exclusiveMinimum":0},"membershipId":{"type":["integer","null"],"exclusiveMinimum":0},"nextTurnReservationMicrousd":{"type":"integer","exclusiveMinimum":0},"occurredAt":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"periodStart":{"type":"string","format":"date-time"},"previousLimitMicrousd":{"type":"integer","minimum":0},"remainingMicrousd":{"type":"integer","minimum":0},"reservedMicrousd":{"type":"integer","minimum":0},"settledMicrousd":{"type":"integer","minimum":0},"status":{"type":"string","enum":["updated"]},"subscriberUserId":{"type":"integer","exclusiveMinimum":0}},"required":["adminUserId","auditId","costCeilingBreached","exhausted","limitMicrousd","membershipId","nextTurnReservationMicrousd","occurredAt","periodEnd","periodStart","previousLimitMicrousd","remainingMicrousd","reservedMicrousd","settledMicrousd","status","subscriberUserId"],"additionalProperties":false}}}},"400":{"description":"The subscriber, request, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The current subscriber quota does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The expected quota limit is stale, or the paid AI entitlement is unconfigured and cannot be overridden.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The requested allowance is below already consumed or reserved spend, cannot support one safe model turn, or its reason contains prohibited sensitive data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The quota ledger is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/reviews":{"get":{"description":"Lists the content-free human review queue for failed or uncertain automated evaluations.","operationId":"listAdminAiEvaluationReviews","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":false,"name":"assigneeAdminUserId","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"conversationId","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"datasetCandidate","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Human evaluation review queue.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"offset":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["hasMore","limit","offset","total"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"string","enum":["exact_postgres"]},"reviews":{"type":"array","items":{"type":"object","properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"datasetCandidate":{"type":"boolean"},"datasetVersion":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"decidedAt":{"type":["string","null"],"format":"date-time"},"evaluationEventId":{"type":"string","minLength":1,"maxLength":255},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"promotedAt":{"type":["string","null"],"format":"date-time"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","datasetCandidate","datasetVersion","decidedAt","evaluationEventId","lastActorAdminUserId","note","promotedAt","resolvedAt","status","updatedAt","version"],"additionalProperties":false},"maxItems":100}},"required":["generatedAt","pagination","period","provenance","reviews"],"additionalProperties":false}}}},"400":{"description":"The filters, pagination, or session cookie are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The review queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/reviews/{conversationId}/{evaluationEventId}":{"get":{"description":"Returns one review, its correlated automated finding and append-only audit trail without conversation content or customer PII. Conversation content remains available only through the separately audited access endpoint.","operationId":"getAdminAiEvaluationReview","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"evaluationEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Automated finding metadata, review state and audit trail.","content":{"application/json":{"schema":{"type":"object","properties":{"auditTrail":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["created","claimed","decided","resolved","promoted"]},"actorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"actorKind":{"type":"string","enum":["system","admin"]},"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"datasetCandidate":{"type":"boolean"},"datasetVersion":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"evaluationEventId":{"type":"string","minLength":1,"maxLength":255},"fromStatus":{"type":["string","null"],"enum":["pending","in_review","confirmed_issue","false_positive","resolved",null]},"id":{"type":"integer","exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"toStatus":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"version":{"type":"integer","exclusiveMinimum":0}},"required":["action","actorAdminUserId","actorKind","assigneeAdminUserId","conversationId","createdAt","datasetCandidate","datasetVersion","evaluationEventId","fromStatus","id","note","toStatus","version"],"additionalProperties":false},"maxItems":1000},"automatedFinding":{"type":["object","null"],"properties":{"actor":{"type":"string","enum":["expert_ai","triage"]},"agentTurnEventId":{"type":"string","minLength":1,"maxLength":255},"attachmentUseScore":{"type":["integer","null"],"minimum":0,"maximum":100},"conversationId":{"type":"string","format":"uuid"},"correctnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"evaluationDurationMs":{"type":"integer","minimum":0},"evaluationCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"evaluationTrigger":{"type":"string","enum":["error","sample","security","tool"]},"evaluationVersion":{"type":"string","minLength":1,"maxLength":120},"evaluatorModel":{"type":"string","minLength":1,"maxLength":120},"engineVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"eventId":{"type":"string","minLength":1,"maxLength":255},"groundednessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"handoffScore":{"type":["integer","null"],"minimum":0,"maximum":100},"helpfulnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"instructionFollowingScore":{"type":["integer","null"],"minimum":0,"maximum":100},"occurredAt":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["pass","fail","review"]},"policyVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"promptVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"sampleBucket":{"type":"integer","minimum":0,"maximum":9999},"safetyScore":{"type":["integer","null"],"minimum":0,"maximum":100},"toneScore":{"type":["integer","null"],"minimum":0,"maximum":100},"targetModel":{"type":["string","null"],"minLength":1,"maxLength":120},"telemetryVersion":{"type":["integer","null"],"exclusiveMinimum":0},"traceId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"triageScore":{"type":["integer","null"],"minimum":0,"maximum":100},"uncertaintyScore":{"type":["integer","null"],"minimum":0,"maximum":100}},"required":["actor","agentTurnEventId","attachmentUseScore","conversationId","correctnessScore","evaluationDurationMs","evaluationCodes","evaluationTrigger","evaluationVersion","evaluatorModel","engineVersion","eventId","groundednessScore","handoffScore","helpfulnessScore","instructionFollowingScore","occurredAt","outcome","policyVersion","promptVersion","sampleBucket","safetyScore","toneScore","targetModel","telemetryVersion","traceId","triageScore","uncertaintyScore"],"additionalProperties":false},"automatedFindingStatus":{"type":"string","enum":["available","missing","unavailable"]},"generatedAt":{"type":"string","format":"date-time"},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"provenance":{"type":"object","properties":{"auditTrail":{"type":"string","enum":["exact_postgres"]},"automatedFinding":{"type":"string","enum":["model_judgment"]},"review":{"type":"string","enum":["exact_postgres"]}},"required":["auditTrail","automatedFinding","review"],"additionalProperties":false},"review":{"type":"object","properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"datasetCandidate":{"type":"boolean"},"datasetVersion":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"decidedAt":{"type":["string","null"],"format":"date-time"},"evaluationEventId":{"type":"string","minLength":1,"maxLength":255},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"promotedAt":{"type":["string","null"],"format":"date-time"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","datasetCandidate","datasetVersion","decidedAt","evaluationEventId","lastActorAdminUserId","note","promotedAt","resolvedAt","status","updatedAt","version"],"additionalProperties":false}},"required":["auditTrail","automatedFinding","automatedFindingStatus","generatedAt","period","provenance","review"],"additionalProperties":false}}}},"400":{"description":"The review key or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The evaluation review does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The review queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/reviews/{conversationId}/{evaluationEventId}/claim":{"post":{"description":"Claims a pending evaluation review for the authenticated administrator. Optional notes pass a server-side content-free DLP boundary before persistence.","operationId":"claimAdminAiEvaluationReview","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"evaluationEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0},"note":{"type":"string","minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."}},"required":["expectedVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Review mutation outcome, including optimistic concurrency conflicts.","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["updated","idempotent","conflict","invalid_transition","missing"]},"review":{"type":["object","null"],"properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"datasetCandidate":{"type":"boolean"},"datasetVersion":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"decidedAt":{"type":["string","null"],"format":"date-time"},"evaluationEventId":{"type":"string","minLength":1,"maxLength":255},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"promotedAt":{"type":["string","null"],"format":"date-time"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","datasetCandidate","datasetVersion","decidedAt","evaluationEventId","lastActorAdminUserId","note","promotedAt","resolvedAt","status","updatedAt","version"],"additionalProperties":false}},"required":["outcome","review"],"additionalProperties":false}}}},"400":{"description":"The review key, mutation, or session cookie is invalid, or the note contains customer content or sensitive data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The review queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/reviews/{conversationId}/{evaluationEventId}/resolve":{"post":{"description":"Records a human decision or resolves a confirmed evaluation issue. Notes containing customer content, personal or payment data, credentials, links, or transcript excerpts are rejected before persistence.","operationId":"resolveAdminAiEvaluationReview","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"evaluationEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0},"note":{"type":"string","minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"status":{"type":"string","enum":["confirmed_issue","false_positive","resolved"]}},"required":["expectedVersion","note","status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Review mutation outcome, including optimistic concurrency conflicts.","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["updated","idempotent","conflict","invalid_transition","missing"]},"review":{"type":["object","null"],"properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"datasetCandidate":{"type":"boolean"},"datasetVersion":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"decidedAt":{"type":["string","null"],"format":"date-time"},"evaluationEventId":{"type":"string","minLength":1,"maxLength":255},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"promotedAt":{"type":["string","null"],"format":"date-time"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","datasetCandidate","datasetVersion","decidedAt","evaluationEventId","lastActorAdminUserId","note","promotedAt","resolvedAt","status","updatedAt","version"],"additionalProperties":false}},"required":["outcome","review"],"additionalProperties":false}}}},"400":{"description":"The review key, mutation, or session cookie is invalid, or the note contains customer content or sensitive data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The review queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/reviews/{conversationId}/{evaluationEventId}/promote":{"post":{"description":"Marks a confirmed or resolved issue as an approved, content-free candidate for a versioned evaluation dataset. Optional notes pass the same server-side DLP boundary as review decisions.","operationId":"promoteAdminAiEvaluationReview","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"evaluationEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"datasetVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"expectedVersion":{"type":"integer","exclusiveMinimum":0},"note":{"type":"string","minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."}},"required":["expectedVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Review mutation outcome, including optimistic concurrency conflicts.","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["updated","idempotent","conflict","invalid_transition","missing"]},"review":{"type":["object","null"],"properties":{"assigneeAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"claimedAt":{"type":["string","null"],"format":"date-time"},"conversationId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"datasetCandidate":{"type":"boolean"},"datasetVersion":{"type":["string","null"],"pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"decidedAt":{"type":["string","null"],"format":"date-time"},"evaluationEventId":{"type":"string","minLength":1,"maxLength":255},"lastActorAdminUserId":{"type":["integer","null"],"exclusiveMinimum":0},"note":{"type":["string","null"],"minLength":1,"maxLength":2000,"description":"Content-free review rationale. Customer content, personal or payment data, credentials, links, and transcript excerpts are rejected."},"promotedAt":{"type":["string","null"],"format":"date-time"},"resolvedAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","in_review","confirmed_issue","false_positive","resolved"]},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["assigneeAdminUserId","claimedAt","conversationId","createdAt","datasetCandidate","datasetVersion","decidedAt","evaluationEventId","lastActorAdminUserId","note","promotedAt","resolvedAt","status","updatedAt","version"],"additionalProperties":false}},"required":["outcome","review"],"additionalProperties":false}}}},"400":{"description":"The review key, mutation, or session cookie is invalid, or the note contains customer content or sensitive data.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The review queue is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/reviews/{conversationId}/{evaluationEventId}/export":{"post":{"description":"Exports one replayable evaluation case from explicitly synthetic, DLP-validated input and expected behavior. The response excludes transcripts, review notes, customer identifiers, and internal conversation identifiers; runtime never writes dataset source files.","operationId":"exportAdminAiEvaluationDatasetCandidate","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"conversationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"evaluationEventId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentDeclaration":{"type":"string","enum":["synthetic_no_customer_content"]},"expectedBehavior":{"type":"object","properties":{"criteria":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"minItems":1,"maxItems":20},"expectedHandoff":{"type":"string","enum":["must","must_not","optional"]},"falseAlarmProbe":{"type":"boolean"},"promptInjectionProbe":{"type":"boolean"},"weights":{"type":"object","properties":{"handoff":{"type":"number","minimum":0,"maximum":1},"quality":{"type":"number","minimum":0,"maximum":1},"safety":{"type":"number","minimum":0,"maximum":1},"tone":{"type":"number","minimum":0,"maximum":1},"triage":{"type":"number","minimum":0,"maximum":1}},"required":["handoff","quality","safety","tone","triage"],"additionalProperties":false}},"required":["criteria","expectedHandoff","falseAlarmProbe","promptInjectionProbe","weights"],"additionalProperties":false},"syntheticInput":{"type":"string","minLength":1,"maxLength":4000}},"required":["contentDeclaration","expectedBehavior","syntheticInput"],"additionalProperties":false}}}},"responses":{"200":{"description":"Replayable, versioned evaluation case plus its content-free evidence.","content":{"application/json":{"schema":{"type":"object","properties":{"case":{"type":"object","properties":{"criteria":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"minItems":1,"maxItems":20},"expectedHandoff":{"type":"string","enum":["must","must_not","optional"]},"falseAlarmProbe":{"type":"boolean"},"id":{"type":"string","pattern":"^review-[a-f0-9]{32}$"},"promptInjectionProbe":{"type":"boolean"},"turns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":4000}},"weights":{"type":"object","properties":{"handoff":{"type":"number","minimum":0,"maximum":1},"quality":{"type":"number","minimum":0,"maximum":1},"safety":{"type":"number","minimum":0,"maximum":1},"tone":{"type":"number","minimum":0,"maximum":1},"triage":{"type":"number","minimum":0,"maximum":1}},"required":["handoff","quality","safety","tone","triage"],"additionalProperties":false}},"required":["criteria","expectedHandoff","falseAlarmProbe","id","promptInjectionProbe","turns","weights"],"additionalProperties":false},"datasetVersion":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._@/-]{0,119}$"},"evidence":{"type":"object","properties":{"evaluation":{"type":"object","properties":{"actor":{"type":"string","enum":["expert_ai","triage"]},"attachmentUseScore":{"type":["integer","null"],"minimum":0,"maximum":100},"correctnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"evaluationDurationMs":{"type":"integer","minimum":0},"evaluationCodes":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,63}$"},"maxItems":12},"evaluationTrigger":{"type":"string","enum":["error","sample","security","tool"]},"evaluationVersion":{"type":"string","minLength":1,"maxLength":120},"evaluatorModel":{"type":"string","minLength":1,"maxLength":120},"engineVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"groundednessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"handoffScore":{"type":["integer","null"],"minimum":0,"maximum":100},"helpfulnessScore":{"type":["integer","null"],"minimum":0,"maximum":100},"instructionFollowingScore":{"type":["integer","null"],"minimum":0,"maximum":100},"occurredAt":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["pass","fail","review"]},"policyVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"promptVersion":{"type":["string","null"],"minLength":1,"maxLength":120},"sampleBucket":{"type":"integer","minimum":0,"maximum":9999},"safetyScore":{"type":["integer","null"],"minimum":0,"maximum":100},"toneScore":{"type":["integer","null"],"minimum":0,"maximum":100},"targetModel":{"type":["string","null"],"minLength":1,"maxLength":120},"telemetryVersion":{"type":["integer","null"],"exclusiveMinimum":0},"triageScore":{"type":["integer","null"],"minimum":0,"maximum":100},"uncertaintyScore":{"type":["integer","null"],"minimum":0,"maximum":100}},"required":["actor","attachmentUseScore","correctnessScore","evaluationDurationMs","evaluationCodes","evaluationTrigger","evaluationVersion","evaluatorModel","engineVersion","groundednessScore","handoffScore","helpfulnessScore","instructionFollowingScore","occurredAt","outcome","policyVersion","promptVersion","sampleBucket","safetyScore","toneScore","targetModel","telemetryVersion","triageScore","uncertaintyScore"],"additionalProperties":false},"promotedAt":{"type":"string","format":"date-time"},"provenance":{"type":"string","enum":["human_reviewed_evaluation"]},"reviewStatus":{"type":"string","enum":["confirmed_issue","resolved"]}},"required":["evaluation","promotedAt","provenance","reviewStatus"],"additionalProperties":false},"export":{"type":"object","properties":{"exportedAt":{"type":"string","format":"date-time"},"integritySha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["exportedAt","integritySha256"],"additionalProperties":false},"schemaVersion":{"type":"number","enum":[1]}},"required":["case","datasetVersion","evidence","export","schemaVersion"],"additionalProperties":false}}}},"400":{"description":"The review key, synthetic case, or session is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from the administration portal.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The evaluation review does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The review has not been confirmed and marked as an export candidate.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The synthetic input failed the dataset DLP boundary.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The evaluation evidence required for export is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/infrastructure":{"get":{"description":"Combines application health with official Cloudflare GraphQL Analytics for Workers, R2, Durable Objects and labelled Sandbox Containers. Every source degrades independently and unavailable platform data is never inferred from application activity.","operationId":"getAdminAiInfrastructure","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Observable resource configuration and availability.","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"],"additionalProperties":false},"resources":{"type":"array","items":{"type":"object","properties":{"completeness":{"type":"string","enum":["complete","partial","unavailable"]},"detail":{"type":"string","minLength":1,"maxLength":500},"freshness":{"type":"string","enum":["fresh","stale","unknown","unavailable"]},"metrics":{"type":["object","null"],"additionalProperties":{"type":"number","minimum":0}},"name":{"type":"string","enum":["ai_gateway","clickhouse","durable_objects","queues","queue_health","r2","sandbox","workers"]},"observedAt":{"type":["string","null"],"format":"date-time"},"provenance":{"type":"string","enum":["exact_app","exact_postgres","model_judgment","estimated_app","gateway_reported","estimated_gateway","mixed_gateway_estimate","aggregated_platform","estimated_infra_cost"]},"sampleFrom":{"type":["string","null"],"format":"date-time"},"sampleTo":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["available","configured","unavailable"]}},"required":["completeness","detail","freshness","metrics","name","observedAt","provenance","sampleFrom","sampleTo","status"],"additionalProperties":false}}},"required":["generatedAt","period","resources"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/ai/configuration":{"get":{"description":"Returns the effective read-only AI configuration reported by the deployed Consulting Worker. Repository configuration is authoritative; secrets, credentials, provider URLs and gateway identifiers are excluded.","operationId":"getAdminAiConfiguration","security":[{"cookieAuth":[]}],"tags":["Administration","AI Operations"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Effective repository-owned AI runtime configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"capabilities":{"type":"object","properties":{"fileToolsEnabled":{"type":"boolean"},"webSearchEnabled":{"type":"boolean"}},"required":["fileToolsEnabled","webSearchEnabled"],"additionalProperties":false},"deploymentVersion":{"type":"string","minLength":1,"maxLength":128},"environment":{"type":"string","enum":["local","production","review","staging"]},"evaluation":{"type":"object","properties":{"sampleRate":{"type":"number","minimum":0,"maximum":1}},"required":["sampleRate"],"additionalProperties":false},"models":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"reasoningEffort":{"type":"string","enum":["max","low","none","provider_default"]}},"required":["id","reasoningEffort"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"reasoningEffort":{"type":"string","enum":["max","low","none","provider_default"]}},"required":["id","reasoningEffort"],"additionalProperties":false},"safety":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"reasoningEffort":{"type":"string","enum":["max","low","none","provider_default"]}},"required":["id","reasoningEffort"],"additionalProperties":false},"search":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"reasoningEffort":{"type":"string","enum":["max","low","none","provider_default"]}},"required":["id","reasoningEffort"],"additionalProperties":false},"title":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"reasoningEffort":{"type":"string","enum":["max","low","none","provider_default"]}},"required":["id","reasoningEffort"],"additionalProperties":false}},"required":["chat","evaluation","safety","search","title"],"additionalProperties":false},"protections":{"type":"object","properties":{"customerBudget":{"type":"string","enum":["fail_closed"]},"gatewayPayloadLogging":{"type":"boolean","enum":[false]},"modelResponseStorage":{"type":"boolean","enum":[false]},"safetyReview":{"type":"string","enum":["fail_closed"]},"toolAdmission":{"type":"string","enum":["fail_closed"]},"zeroDataRetention":{"type":"boolean","enum":[true]}},"required":["customerBudget","gatewayPayloadLogging","modelResponseStorage","safetyReview","toolAdmission","zeroDataRetention"],"additionalProperties":false},"readOnly":{"type":"boolean","enum":[true]},"runtime":{"type":"object","properties":{"engine":{"type":"string","enum":["flue"]},"version":{"type":"string","minLength":1,"maxLength":160}},"required":["engine","version"],"additionalProperties":false},"schemaVersion":{"type":"number","enum":[1]},"source":{"type":"string","enum":["repository"]},"versions":{"type":"object","properties":{"evaluation":{"type":"string","minLength":1,"maxLength":160},"prompts":{"type":"object","properties":{"keywordExpert":{"type":"string","minLength":1,"maxLength":160},"landingTriage":{"type":"string","minLength":1,"maxLength":160},"paidTriage":{"type":"string","minLength":1,"maxLength":160}},"required":["keywordExpert","landingTriage","paidTriage"],"additionalProperties":false},"safetyPolicy":{"type":"string","minLength":1,"maxLength":160},"toolPolicy":{"type":"string","minLength":1,"maxLength":160}},"required":["evaluation","prompts","safetyPolicy","toolPolicy"],"additionalProperties":false}},"required":["capabilities","deploymentVersion","environment","evaluation","models","protections","readOnly","runtime","schemaVersion","source","versions"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The effective AI configuration is unavailable or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/payments":{"get":{"description":"Lists recent successful payments using any combination of normalized email, card first six, card last four, and payment date. Each row includes the latest Membership status and whether cancellation is pending at period end. A payment date searches the selected UTC day plus the adjacent day on each side.","operationId":"listAdminPayments","security":[{"cookieAuth":[]}],"tags":["Administration","Billing"],"parameters":[{"schema":{"type":"string","maxLength":320,"format":"email"},"required":false,"name":"email","in":"query"},{"schema":{"type":"string","pattern":"^[0-9]{6}$"},"required":false,"name":"firstSix","in":"query"},{"schema":{"type":"string","pattern":"^[0-9]{4}$"},"required":false,"name":"lastFour","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"paymentDate","in":"query"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Successful payments matching every supplied filter, across all Products.","content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":100},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0}},"required":["page","pageSize","total","totalPages"],"additionalProperties":false},"payments":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"email":{"type":"string","maxLength":320,"format":"email"},"firstSix":{"type":["string","null"],"pattern":"^[0-9]{6}$"},"id":{"type":"integer","exclusiveMinimum":0},"lastFour":{"type":"string","pattern":"^[0-9]{4}$"},"membershipCancelAtPeriodEnd":{"type":["boolean","null"]},"membershipStatus":{"type":["string","null"],"enum":["trialing","active","past_due","ended",null]},"processedAt":{"type":["string","null"],"format":"date-time"},"refundStatus":{"type":["string","null"],"enum":["pending","succeeded","failed",null]},"subscriberUserId":{"type":"integer","exclusiveMinimum":0}},"required":["amount","createdAt","currency","email","firstSix","id","lastFour","membershipCancelAtPeriodEnd","membershipStatus","processedAt","refundStatus","subscriberUserId"],"additionalProperties":false}}},"required":["pagination","payments"],"additionalProperties":false}}}},"400":{"description":"The query or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/subscribers/{subscriberUserId}":{"get":{"description":"Loads one Product-scoped subscriber with the latest Membership, masked payment method, normalized signup user-agent, and newest-first billing history.","operationId":"getAdminSubscriber","security":[{"cookieAuth":[]}],"tags":["Administration","Billing"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"subscriberUserId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The subscriber management view.","content":{"application/json":{"schema":{"type":"object","properties":{"membership":{"type":["object","null"],"properties":{"billingPeriodMonths":{"type":"integer","exclusiveMinimum":0},"cancelAtPeriodEnd":{"type":"boolean"},"canceledAt":{"type":["string","null"],"format":"date-time"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"currentPeriodEnd":{"type":"string","format":"date-time"},"currentPeriodStart":{"type":"string","format":"date-time"},"endReason":{"type":["string","null"],"enum":["canceled","payment_failed","replaced","admin","refunded","disputed",null]},"endedAt":{"type":["string","null"],"format":"date-time"},"failedChargeCount":{"type":"integer","minimum":0,"maximum":2},"id":{"type":"integer","exclusiveMinimum":0},"nextChargeAt":{"type":["string","null"],"format":"date-time"},"nextRetryAt":{"type":["string","null"],"format":"date-time"},"planName":{"type":"string","minLength":1,"maxLength":100},"price":{"type":"integer","minimum":0},"startedAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["trialing","active","past_due","ended"]},"trialDurationDays":{"type":"integer","minimum":0},"trialEndsAt":{"type":["string","null"],"format":"date-time"},"trialPrice":{"type":["integer","null"],"minimum":0}},"required":["billingPeriodMonths","cancelAtPeriodEnd","canceledAt","currency","currentPeriodEnd","currentPeriodStart","endReason","endedAt","failedChargeCount","id","nextChargeAt","nextRetryAt","planName","price","startedAt","status","trialDurationDays","trialEndsAt","trialPrice"],"additionalProperties":false},"paymentMethod":{"type":["object","null"],"properties":{"acquirerName":{"type":["string","null"],"minLength":1,"maxLength":100},"brand":{"type":"string","minLength":1,"maxLength":32},"cardholderName":{"type":["string","null"],"minLength":1,"maxLength":100},"firstSix":{"type":["string","null"],"pattern":"^[0-9]{6}$"},"gatewayName":{"type":["string","null"],"minLength":1,"maxLength":100},"id":{"type":"integer","exclusiveMinimum":0},"lastFour":{"type":"string","pattern":"^[0-9]{4}$"},"merchantName":{"type":["string","null"],"minLength":1,"maxLength":100},"threeds":{"type":["boolean","null"]},"threedsProtocolVersion":{"type":["string","null"],"minLength":1,"maxLength":32}},"required":["acquirerName","brand","cardholderName","firstSix","gatewayName","id","lastFour","merchantName","threeds","threedsProtocolVersion"],"additionalProperties":false},"subscriber":{"type":"object","properties":{"clickId":{"type":["string","null"],"maxLength":255},"companyName":{"type":"string","minLength":1,"maxLength":100},"createdAt":{"type":"string","format":"date-time"},"email":{"type":"string","maxLength":320,"format":"email"},"id":{"type":"integer","exclusiveMinimum":0},"isDemo":{"type":"boolean"},"language":{"type":"object","properties":{"iso2":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string","minLength":1,"maxLength":80}},"required":["iso2","name"],"additionalProperties":false},"name":{"type":"string","minLength":1,"maxLength":100},"product":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["domain","name"],"additionalProperties":false},"signupUserAgent":{"type":["object","null"],"properties":{"browser":{"type":["string","null"],"maxLength":100},"browserVersion":{"type":["string","null"],"maxLength":64},"device":{"type":["string","null"],"maxLength":340},"isBot":{"type":"boolean"},"isMobile":{"type":"boolean"},"os":{"type":["string","null"],"maxLength":100},"osVersion":{"type":["string","null"],"maxLength":64},"value":{"type":"string","minLength":1,"maxLength":500}},"required":["browser","browserVersion","device","isBot","isMobile","os","osVersion","value"],"additionalProperties":false},"status":{"type":"string","enum":["pending","active","disabled"]}},"required":["clickId","companyName","createdAt","email","id","isDemo","language","name","product","signupUserAgent","status"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"integer","minimum":0},"canRefund":{"type":"boolean"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"description":{"type":["string","null"],"maxLength":255},"externalReference":{"type":["string","null"],"maxLength":255},"fee":{"type":"integer","minimum":0},"id":{"type":"integer","exclusiveMinimum":0},"occurredAt":{"type":"string","format":"date-time"},"paymentId":{"type":"integer","exclusiveMinimum":0},"purpose":{"type":["string","null"],"enum":["signup","renewal","credit_purchase",null]},"secure":{"type":["boolean","null"]},"status":{"type":"string","minLength":1,"maxLength":32},"type":{"type":"string","enum":["payment","refund","rdr","chargeback","chargeback_alert"]}},"required":["amount","canRefund","currency","description","externalReference","fee","id","occurredAt","paymentId","purpose","secure","status","type"],"additionalProperties":false}}},"required":["membership","paymentMethod","subscriber","transactions"],"additionalProperties":false}}}},"400":{"description":"The path, query, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The subscriber does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/subscribers/{subscriberUserId}/membership/cancel":{"post":{"description":"Immediately ends the subscriber's current Membership with the administrative reason. Dashboard access remains available and a cancellation email is queued.","operationId":"cancelAdminMembership","security":[{"cookieAuth":[]}],"tags":["Administration","Billing"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"subscriberUserId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"The current Membership ended immediately.","content":{"application/json":{"schema":{"type":"object","properties":{"endedAt":{"type":"string","format":"date-time"},"membershipId":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["complete"]}},"required":["endedAt","membershipId","status"],"additionalProperties":false}}}},"400":{"description":"The path, query, session cookie, or request body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this host.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The subscriber has no active Membership.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/subscribers/{subscriberUserId}/membership/renew":{"post":{"description":"Makes the current non-cancelled trialing or active Membership due immediately and publishes the standard renewal Queue message. The regular renewal consumer charges the stored method, converts trials to active Memberships, advances successful billing periods, and applies the normal retry policy. Memberships with a pending cancellation cannot be renewed by this action.","operationId":"forceAdminMembershipRenewal","security":[{"cookieAuth":[]}],"tags":["Administration","Billing"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"subscriberUserId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"202":{"description":"The Membership is due and its standard renewal message was queued.","content":{"application/json":{"schema":{"type":"object","properties":{"membershipId":{"type":"integer","exclusiveMinimum":0},"scheduledAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["queued"]}},"required":["membershipId","scheduledAt","status"],"additionalProperties":false}}}},"400":{"description":"The path, query, session cookie, or request body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this host.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The Membership is cancelled, cannot renew, is already processing, or has an unresolved renewal payment.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"The Membership remains due for Cron recovery, but its immediate Queue publication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/payments/{paymentId}/refund":{"post":{"description":"Requests the single full refund identified by paymentId. A completed refund is replayed without calling the gateway. Refunds do not affect Memberships unless cancelMembership is true, which ends the associated Membership immediately through the shared cancellation flow and removes premium access while retaining dashboard access.","operationId":"refundAdminPayment","security":[{"cookieAuth":[]}],"tags":["Administration","Billing"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"paymentId","in":"path"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cancelMembership":{"type":"boolean","default":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"The refund succeeded or an existing successful refund was replayed.","content":{"application/json":{"schema":{"type":"object","properties":{"adjustmentId":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["succeeded"]}},"required":["adjustmentId","status"],"additionalProperties":false}}}},"400":{"description":"The path, body, query, or session cookie is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this host.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The payment is not refundable or its refund is already in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"502":{"description":"The gateway or refund finalization failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"Refund processing is temporarily unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/membership/cancel":{"post":{"description":"Schedules non-renewal. Premium access remains active until the current period ends.","operationId":"cancelCurrentMembership","security":[{"cookieAuth":[]}],"tags":["Billing"],"parameters":[{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Cancellation at period end was scheduled.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["complete"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"The query, cookie, or body is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid session exists for this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request did not originate from this Product.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The subscriber has no current Membership.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/support/mailbox-routes":{"get":{"description":"Lists the PostgreSQL-owned default and secondary mailbox routes visible to the global Admin or Product-scoped Support credential. Only secondary numeric identifiers are mutable.","operationId":"listAdminSupportMailboxRoutes","security":[{"cookieAuth":[]},{"supportBearerAuth":[]}],"tags":["Administration","Support"],"x-required-scopes":["mailboxes:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"required":false,"name":"authorization","in":"header"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Authoritative mailbox routes.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":320,"format":"email"},"id":{"type":["integer","null"],"exclusiveMinimum":0},"kind":{"type":"string","enum":["default","secondary"]},"mutable":{"type":"boolean"},"productId":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","id","kind","mutable","productId","status","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"The query, cookie or authorization contract is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session or Support credential exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request is cross-origin or lacks mailboxes:admin.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The Support credential rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"PostgreSQL or credential introspection is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/support/mailboxes/reconcile":{"post":{"description":"Reconciles the PostgreSQL-owned Product and support-mailbox catalog into its complete D1 operating projection. The operation is explicit, idempotent and never changes Product authority.","operationId":"reconcileAdminSupportMailboxes","security":[{"cookieAuth":[]},{"supportBearerAuth":[]}],"tags":["Administration","Support"],"x-required-scopes":["mailboxes:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"required":false,"name":"authorization","in":"header"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$/u"},"required":true,"name":"idempotency-key","in":"header"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"responses":{"200":{"description":"Current mailbox projection applied.","content":{"application/json":{"schema":{"type":"object","properties":{"mailboxCount":{"type":"integer","minimum":0},"productCount":{"type":"integer","minimum":0},"projectionVersion":{"type":"integer","exclusiveMinimum":0},"replayed":{"type":"boolean"}},"required":["mailboxCount","productCount","projectionVersion","replayed"],"additionalProperties":false}}}},"400":{"description":"The idempotency key, query, cookie or empty-body contract is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session or Support credential exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request is cross-origin, lacks mailboxes:admin, or uses Product scope.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The idempotency key was reused after the source projection changed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The authoritative catalog cannot be projected safely.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The Support credential rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"PostgreSQL or the Support service is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/support/mailboxes":{"post":{"description":"Creates one secondary support mailbox in PostgreSQL and then reconciles the derived D1 projection. Idempotency and the audit snapshot commit atomically with the authoritative row.","operationId":"createAdminSupportMailbox","security":[{"cookieAuth":[]},{"supportBearerAuth":[]}],"tags":["Administration","Support"],"x-required-scopes":["mailboxes:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"required":false,"name":"authorization","in":"header"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$/u"},"required":true,"name":"idempotency-key","in":"header"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"productId":{"type":"integer","exclusiveMinimum":0}},"required":["address","productId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Mailbox created and projected.","content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"address":{"type":"string","maxLength":320,"format":"email"},"id":{"type":"integer","exclusiveMinimum":0},"productId":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","id","productId","status","updatedAt"],"additionalProperties":false},"projection":{"type":"object","properties":{"mailboxCount":{"type":"integer","minimum":0},"productCount":{"type":"integer","minimum":0},"projectionVersion":{"type":"integer","exclusiveMinimum":0},"replayed":{"type":"boolean"}},"required":["mailboxCount","productCount","projectionVersion","replayed"],"additionalProperties":false},"replayed":{"type":"boolean"}},"required":["mailbox","projection","replayed"],"additionalProperties":false}}}},"400":{"description":"The request or idempotency key is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session or Support credential exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request is cross-origin, lacks mailboxes:admin, or violates Product scope.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The active Product does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The address already belongs to a Product or mailbox, or the idempotency key was reused for a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The mailbox domain does not match its Product or projection was rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The Support credential rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"PostgreSQL or the Support service is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}},"/api/v1/admin/support/mailboxes/{mailboxId}":{"patch":{"description":"Changes one PostgreSQL-owned secondary mailbox status and reconciles the complete D1 projection. Replays return the original audited response.","operationId":"updateAdminSupportMailbox","security":[{"cookieAuth":[]},{"supportBearerAuth":[]}],"tags":["Administration","Support"],"x-required-scopes":["mailboxes:admin"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"mailboxId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":256},"required":false,"name":"authorization","in":"header"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$/u"},"required":true,"name":"idempotency-key","in":"header"},{"schema":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"required":false,"name":"billing_session","in":"cookie"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Mailbox status applied.","content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"address":{"type":"string","maxLength":320,"format":"email"},"id":{"type":"integer","exclusiveMinimum":0},"productId":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string","enum":["active","disabled"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","id","productId","status","updatedAt"],"additionalProperties":false},"projection":{"type":"object","properties":{"mailboxCount":{"type":"integer","minimum":0},"productCount":{"type":"integer","minimum":0},"projectionVersion":{"type":"integer","exclusiveMinimum":0},"replayed":{"type":"boolean"}},"required":["mailboxCount","productCount","projectionVersion","replayed"],"additionalProperties":false},"replayed":{"type":"boolean"}},"required":["mailbox","projection","replayed"],"additionalProperties":false}}}},"400":{"description":"The request, mailbox identifier or idempotency key is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"401":{"description":"No valid global administrator session or Support credential exists.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"403":{"description":"The request is cross-origin or lacks mailboxes:admin.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"404":{"description":"The mailbox does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"409":{"description":"The idempotency key was reused for a different request.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"422":{"description":"The authoritative mailbox projection was rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"429":{"description":"The Support credential rate limit was exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}},"503":{"description":"PostgreSQL or the Support service is unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"diagnostic":{"type":"string","minLength":1,"maxLength":100},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"path":{"type":"string","maxLength":500}},"required":["code","path"],"additionalProperties":false},"maxItems":100},"requestId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["error"]}},"required":["code","requestId","status"],"additionalProperties":false}}}}}}}},"webhooks":{}}