{"openapi":"3.1.0","info":{"title":"MapsScraper.dev workspace API","version":"0.31.0","description":"Engineering preview. All data routes are workspace scoped. HTTP MCP is available at /mcp on the origin. Session-only administrative routes are explicitly marked. Live data source validation and commercial billing are separate launch gates."},"servers":[{"url":"https://mapsscraper.dev/api"}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token"}},"schemas":{"Task":{"type":"object","required":["kind"],"properties":{"kind":{"enum":["search","details","reviews","photos","enrichment","rank","website_audit","map_tiles","search_visibility","photo_audit"],"type":"string"},"query":{"type":"string","maxLength":400,"default":""},"business_id":{"type":"string","maxLength":250,"default":""},"limit":{"type":"integer","minimum":1,"maximum":500,"description":"Records to return. When omitted: 1 for details, enrichment, website_audit, map_tiles, search_visibility and photo_audit, which accept only 1; 20 for other kinds."},"region":{"type":"string","pattern":"^[a-zA-Z]{2}$","default":"us"},"language":{"type":"string","minLength":2,"maxLength":8,"default":"en"},"enrich":{"type":"boolean","default":false},"min_rating":{"type":"number","minimum":0,"maximum":5},"website":{"type":"string","enum":["all","present","missing"]},"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"url":{"type":"string","maxLength":2048,"default":"","description":"website_audit only: public HTTP(S) homepage. Requires limit=1; excludes query, enrichment, rating, website and geographic filters. No credentials, custom ports, IPs, local domains, workers.dev hosts, path, query or fragment."},"area":{"$ref":"#/components/schemas/SearchArea"},"review_options":{"$ref":"#/components/schemas/ReviewOptions"},"is_video":{"type":"boolean"},"continue_from":{"type":"string","format":"uuid","description":"Server-issued source job ID from continuation preview. Reviews/photos only; all task options must match the source. No caller-supplied source cursor."},"tile_set":{"type":"array","items":{"$ref":"#/components/schemas/MapTile"},"minItems":1,"maxItems":16,"description":"map_tiles only. Unique XYZ at one zoom, x/y < 2^z. limit=1; en/fr/es; no business-search options. One workspace unit reserved per tile. Requires a configured map data source and workspace opt-in. No monitors, saved presets or batch admission."},"visibility":{"$ref":"#/components/schemas/VisibilityOptions","description":"search_visibility only. limit=1, query 2–400 characters and two-letter region/language. No other search options. One explicit workspace unit budget; configured data source and workspace opt-in required. Single-task admission only. A missing overview is a completed observation. Never automatically replay an uncertain dispatch."},"photo_audit":{"$ref":"#/components/schemas/PhotoAuditOptions"}},"additionalProperties":false,"description":"Bounded research task. Reviews/photos limit <=100; details, enrichment and single-record tasks limit=1; other tasks <=500. One business ID only (no comma, whitespace or control characters). Area only on search, mutually exclusive with point bias. Review options only for reviews; is_video only for photos. Reviews/photos reject enrichment, point bias and website filters. Continuation cannot be scheduled, batched or saved as a preset.","allOf":[{"if":{"properties":{"kind":{"enum":["details","enrichment"]}},"required":["kind"]},"then":{"properties":{"limit":{"const":1}}}},{"if":{"properties":{"kind":{"enum":["reviews","photos"]}},"required":["kind"]},"then":{"properties":{"limit":{"maximum":100},"enrich":{"const":false}},"not":{"anyOf":[{"required":["lat"]},{"required":["lng"]},{"required":["website"]}]}}},{"if":{"properties":{"kind":{"const":"photo_audit"}},"required":["kind"]},"then":{"required":["photo_audit","limit"],"properties":{"limit":{"const":1},"region":{"const":"us"},"language":{"const":"en"}},"description":"One current private asset and preview hash, explicit generation consent and X-Max-Units: 1. No search/URL/media/geographic/filter/continuation options. Cannot be used in presets, batches or monitors."},"else":{"not":{"required":["photo_audit"]}}}]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"details":{"description":"Endpoint-specific JSON details; validation issue arrays and structured conflict metadata are both supported."}},"required":["code"],"additionalProperties":true}},"required":["error"],"additionalProperties":true},"BusinessRecord":{"type":"object","additionalProperties":true},"Usage":{"type":"object","properties":{"balance":{"type":"integer"},"available":{"type":"integer"},"reserved":{"type":"integer"},"spent":{"type":"integer"},"research_available":{"type":"boolean","description":"Whether this workspace can start live business research now."},"research_refusal":{"anyOf":[{"$ref":"#/components/schemas/ResearchRefusal"},{"type":"null"}],"description":"Why it cannot: PROVIDER_NOT_CONFIGURED (research is not open to this workspace) or RESEARCH_DAILY_LIMIT_REACHED (today's total is used up until the next UTC day); null when it can."}},"required":["balance","available","reserved","spent"],"additionalProperties":false},"Estimate":{"type":"object","properties":{"units":{"type":"integer"},"max_records":{"type":"integer"},"currency":{"const":"workspace_units"},"expires_in_seconds":{"type":"integer"},"provider_configured":{"type":"boolean"},"refusal":{"anyOf":[{"$ref":"#/components/schemas/ResearchRefusal"},{"type":"null"}]}},"required":["units","max_records","currency","expires_in_seconds","provider_configured","refusal"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"$ref":"#/components/schemas/JobStatus"},"reserved":{"type":"integer"},"charged":{"type":"integer"},"created_at":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_count":{"type":"integer"},"result_expired":{"type":"integer"},"continuation_parent_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagination_root_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"page_number":{"type":"integer","minimum":1,"maximum":100},"workspace_id":{"type":"string"},"idempotency_key":{"type":"string"},"request_json":{"type":"string"},"result_json":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_bytes":{"type":"integer"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"expired_now":{"type":"integer"},"error_code":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},{"type":"null"}]}},"required":["id","workspace_id","idempotency_key","request_json","kind","status","reserved","charged","result_json","error","created_at","updated_at","result_key","result_count","result_bytes","expires_at","continuation_parent_id","pagination_root_id","page_number","result_expired"],"additionalProperties":false},"AcceptedJob":{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"queued"},"reserved":{"type":"integer"}},"required":["id","status","reserved"],"additionalProperties":false},"JobResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BusinessRecord"}},"count":{"type":"integer"},"offset":{"type":"integer"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}]},"provider":{"enum":["live_maps","map_tiles","ai_overview","public_http","ai_image_analysis","user_import"],"description":"Neutral data source label: live_maps, map_tiles, ai_overview, public_http, ai_image_analysis or user_import."},"coverage":{"type":"string","minLength":1,"description":"Task-specific coverage; does not establish complete source or listing coverage."},"fetched_at":{"type":"string"},"next_cursor":{"type":"null","description":"Always null on retained results; use next_offset. A continuation page is a new task."},"requested_area":{"anyOf":[{"$ref":"#/components/schemas/SearchArea"},{"type":"null"}]},"received_count":{"type":"integer"},"outside_area":{"type":"integer"},"unlocated":{"type":"integer"},"continuation_stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"type":"string"},"requested_tiles":{"type":"integer"},"attempted_tiles":{"type":"integer"},"completed_tiles":{"type":"integer"},"charged_units":{"type":"integer"},"partial":{"type":"boolean"},"attribution":{"type":"string"},"model":{"const":"image-analysis-v1"},"prompt_version":{"type":"string"},"_expires_at":{"type":"string"}},"required":["items","count","offset","next_offset","provider","coverage"],"additionalProperties":false},"JobPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/JobPageItem"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false},"List":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"count":{"type":"integer"}},"required":["id","name","count"],"additionalProperties":false},"ListItem":{"type":"object","properties":{"business_id":{"type":"string"},"data_json":{"type":"string"},"stage":{"type":"string"},"note":{"type":"string"},"tags_json":{"type":"string"},"fields_json":{"type":"string"},"assignee_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"list_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"version":{"type":"integer"}},"required":["list_id","business_id","data_json","note","stage","created_at","tags_json","fields_json","assignee_id","updated_at","version"],"additionalProperties":false},"ListPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ListItem"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false},"Qualification":{"type":"object","properties":{"stage":{"type":"string","minLength":1},"note":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"maxItems":20},"fields":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"]},"propertyNames":{"type":"string"}},"assignee_id":{"type":["string","null"]},"expected_record":{"type":"object","properties":{"list_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"business_id":{"type":"string","minLength":1,"maxLength":50000},"data_json":{"type":"string"},"note":{"type":"string"},"stage":{"type":"string"},"created_at":{"type":"string"},"tags_json":{"type":"string"},"fields_json":{"type":"string"},"assignee_id":{"type":["string","null"]},"updated_at":{"type":"string"},"version":{"type":"integer","minimum":1,"maximum":9007199254740990}},"required":["list_id","business_id","data_json","note","stage","created_at","tags_json","fields_json","assignee_id","updated_at","version"],"additionalProperties":false}},"required":["expected_record"],"additionalProperties":false},"BatchInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"kind":{"enum":["bulk","grid"],"default":"bulk"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"},"minItems":1,"maxItems":50}},"required":["name","tasks"],"additionalProperties":true},"Batch":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"reserved":{"type":"integer"},"polygon_plan_json":{"anyOf":[{"type":"string","description":"Frozen reviewed plan, cell bounds and configuration version on batch detail. Absent/null for ordinary batches."},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","name","kind","reserved","created_at","polygon_plan_json"],"additionalProperties":false},"BatchReceipt":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"reserved":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":1,"maximum":50},"status":{"const":"queued"},"replayed":{"const":false}},"required":["id","reserved","total","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"replayed":{"const":true},"reserved":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":1,"maximum":50},"status":{"const":"queued"}},"required":["id","reserved","total","status","replayed"],"additionalProperties":false}]},"BatchDetail":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Batch"},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/BatchJob"},"minItems":1,"maxItems":50}},"required":["batch","jobs"],"additionalProperties":false},"ImportInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"list_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"records":{"type":"array","items":{},"minItems":1,"maxItems":200}},"required":["list_id","records"],"additionalProperties":false},"ImportReceipt":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receipt":{"type":"object","properties":{"submitted":{"type":"integer","minimum":1,"maximum":200},"accepted":{"type":"integer","minimum":0,"maximum":200},"duplicates_in_file":{"type":"integer","minimum":0,"maximum":200},"unresolved_identities":{"type":"integer","minimum":0,"maximum":200},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":1,"maximum":200},"code":{"type":"string","minLength":1,"maxLength":100}},"required":["row","code"],"additionalProperties":false},"maxItems":200},"existing_policy":{"const":"keep_existing","type":"string"},"identity_policy":{"const":"exact_provider_id_only; input IDs require manual matching","type":"string"},"inserted":{"type":"integer","minimum":0,"maximum":200},"already_in_list":{"type":"integer","minimum":0,"maximum":200}},"required":["submitted","accepted","inserted","already_in_list","duplicates_in_file","unresolved_identities","errors","existing_policy","identity_policy"],"additionalProperties":false},"replayed":{"const":true,"type":"boolean"}},"required":["id","receipt"],"additionalProperties":false},"ReportInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"kind":{"enum":["comparison","reviews","grid","websites","photos"]},"job_ids":{"type":"array","items":{"type":"string"},"maxItems":5},"batch_id":{"type":"string"},"target_business_id":{"type":"string"}},"required":["name","kind"],"additionalProperties":true},"Report":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["comparison","reviews","grid","websites","photos"]},"source_json":{"type":"string"},"result_json":{"type":"string"},"created_at":{"type":"string"},"workspace_id":{"type":"string"},"presentation_json":{"anyOf":[{"type":"string"},{"type":"null"}]},"presentation_version":{"type":"integer"}},"required":["id","workspace_id","name","kind","source_json","result_json","created_at","presentation_json","presentation_version"],"additionalProperties":false},"Config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"defaults":{"type":"object","properties":{"region":{"type":"string","pattern":"^[a-z]{2}$"},"language":{"type":"string","minLength":2,"maxLength":8},"records":{"type":"integer","minimum":1,"maximum":500},"max_units":{"type":"integer","minimum":1,"maximum":10000}},"required":["region","language","records","max_units"],"additionalProperties":false},"limits":{"type":"object","properties":{"max_records":{"type":"integer","minimum":1,"maximum":500},"max_batch_tasks":{"type":"integer","minimum":1,"maximum":50},"max_pending_jobs":{"type":"integer","minimum":1,"maximum":200},"daily_units":{"type":"integer","minimum":1,"maximum":10000}},"required":["max_records","max_batch_tasks","max_pending_jobs","daily_units"],"additionalProperties":false},"retention_days":{"type":"integer","minimum":7,"maximum":365},"batch_merge":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"max_records":{"type":"integer","minimum":1,"maximum":50,"default":25}},"required":["enabled","max_records"],"additionalProperties":false},"sharing":{"type":"object","properties":{"enabled":{"type":"boolean"},"max_active":{"type":"integer","minimum":1,"maximum":100},"max_hours":{"type":"integer","minimum":1,"maximum":720},"require_password":{"type":"boolean","default":false,"description":"Blocks new unprotected publication and all existing unprotected recipient links while enabled."}},"required":["enabled","max_active","max_hours","require_password"],"additionalProperties":false,"default":{"enabled":true,"max_active":25,"max_hours":168,"require_password":false}},"webhooks":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"max_endpoints":{"type":"integer","minimum":1,"maximum":5,"default":3},"max_pending":{"type":"integer","minimum":1,"maximum":1000,"default":250},"daily_attempts":{"type":"integer","minimum":1,"maximum":1000,"default":500},"max_attempts":{"type":"integer","minimum":1,"maximum":8,"default":8},"retention_days":{"type":"integer","minimum":7,"maximum":90,"default":30}},"required":["enabled","max_endpoints","max_pending","daily_attempts","max_attempts","retention_days"],"additionalProperties":false},"governance":{"type":"object","properties":{"export_retention_days":{"type":"integer","minimum":1,"maximum":30},"invitation_hours":{"type":"integer","minimum":1,"maximum":168},"deletion_grace_days":{"type":"integer","minimum":7,"maximum":30}},"required":["export_retention_days","invitation_hours","deletion_grace_days"],"additionalProperties":false,"default":{"export_retention_days":7,"invitation_hours":168,"deletion_grace_days":7}},"modules":{"type":"object","properties":{"bulk":{"type":"boolean"},"grid":{"type":"boolean"},"imports":{"type":"boolean"},"reports":{"type":"boolean"},"monitors":{"type":"boolean"},"websites":{"type":"boolean","default":true},"photo-audits":{"type":"boolean","default":true},"agents":{"default":true,"type":"boolean"}},"required":["agents","bulk","grid","imports","reports","monitors","websites","photo-audits"],"additionalProperties":false},"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,29}$"},"label":{"type":"string","minLength":1,"maxLength":40}},"required":["id","label"],"additionalProperties":false},"minItems":1,"maxItems":12},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":60},"type":{"enum":["text","number","boolean","date"],"type":"string"},"required":{"type":"boolean","default":false}},"required":["key","label","type","required"],"additionalProperties":false},"maxItems":20},"notifications":{"type":"object","properties":{"jobs":{"type":"boolean"},"monitors":{"type":"boolean"}},"required":["jobs","monitors"],"additionalProperties":false},"report_brand":{"type":"object","properties":{"name":{"default":"MapsScraper.dev","type":"string","minLength":1,"maxLength":80},"accent":{"default":"#49613b","type":"string","pattern":"^#[a-fA-F0-9]{6}$"},"website":{"default":"","type":"string","maxLength":300},"logo":{"default":"","type":"string","maxLength":120000},"footer":{"default":"Prepared from observed research samples. See methodology and source coverage.","type":"string","maxLength":500}},"required":["name","accent","website","logo","footer"],"additionalProperties":false},"report_pdf":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"daily_limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"max_pending":{"default":3,"type":"integer","minimum":1,"maximum":10},"retention_days":{"default":7,"type":"integer","minimum":1,"maximum":30}},"required":["enabled","daily_limit","max_pending","retention_days"],"additionalProperties":false},"review_ai":{"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"daily_limit":{"default":5,"type":"integer","minimum":1,"maximum":20},"max_pending":{"default":2,"type":"integer","minimum":1,"maximum":5},"max_reviews":{"default":30,"type":"integer","minimum":2,"maximum":40},"queue_retention_hours":{"default":1,"type":"integer","minimum":1,"maximum":24}},"required":["enabled","daily_limit","max_pending","max_reviews","queue_retention_hours"],"additionalProperties":false},"provider_search":{"type":"object","properties":{"area_enabled":{"default":true,"type":"boolean"},"polygon_enabled":{"default":true,"type":"boolean"},"max_polygon_positions":{"default":128,"type":"integer","minimum":4,"maximum":256},"max_polygon_cells":{"default":25,"type":"integer","minimum":1,"maximum":50},"max_polygon_span_degrees":{"default":5,"type":"number","minimum":0.001,"maximum":30},"max_radius_m":{"default":50000,"type":"integer","minimum":1,"maximum":50000},"max_box_span_degrees":{"default":5,"type":"number","minimum":0.001,"maximum":180},"continuation_enabled":{"default":true,"type":"boolean"},"max_pages":{"default":20,"type":"integer","minimum":1,"maximum":100}},"required":["area_enabled","polygon_enabled","max_polygon_positions","max_polygon_cells","max_polygon_span_degrees","max_radius_m","max_box_span_degrees","continuation_enabled","max_pages"],"additionalProperties":false},"chain_export":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"daily_requests":{"default":5,"type":"integer","minimum":1,"maximum":20},"max_pending":{"default":2,"type":"integer","minimum":1,"maximum":5},"max_pages":{"default":100,"type":"integer","minimum":1,"maximum":100},"max_source_bytes":{"default":50000000,"type":"integer","minimum":1000000,"maximum":100000000},"retention_days":{"default":7,"type":"integer","minimum":1,"maximum":30}},"required":["enabled","daily_requests","max_pending","max_pages","max_source_bytes","retention_days"],"additionalProperties":false},"result_map":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"max_tiles":{"type":"integer","minimum":1,"maximum":16,"default":16},"max_zoom":{"type":"integer","minimum":0,"maximum":19,"default":19},"language":{"enum":["en","fr","es"],"default":"en","type":"string"},"retention_hours":{"type":"integer","minimum":1,"maximum":168,"default":24}},"required":["enabled","max_tiles","max_zoom","language","retention_hours"],"additionalProperties":false},"search_visibility":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"max_targets":{"type":"integer","minimum":1,"maximum":5,"default":5},"daily_checks":{"type":"integer","minimum":1,"maximum":100,"default":20},"retention_days":{"type":"integer","minimum":1,"maximum":90,"default":30}},"required":["enabled","max_targets","daily_checks","retention_days"],"additionalProperties":false},"locations":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"max_locations":{"default":250,"type":"integer","minimum":1,"maximum":5000},"daily_mutations":{"default":2000,"type":"integer","minimum":1,"maximum":10000},"max_open_operations":{"default":500,"type":"integer","minimum":1,"maximum":10000}},"required":["enabled","max_locations","daily_mutations","max_open_operations"],"additionalProperties":false},"photo_audit":{"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"daily_limit":{"default":10,"type":"integer","minimum":1,"maximum":100},"max_assets":{"default":25,"type":"integer","minimum":1,"maximum":100},"retention_hours":{"default":24,"type":"integer","minimum":1,"maximum":168}},"required":["enabled","daily_limit","max_assets","retention_hours"],"additionalProperties":false}},"required":["name","defaults","limits","locations","retention_days","webhooks","report_brand","review_ai","photo_audit","provider_search","result_map","search_visibility","chain_export","report_pdf","batch_merge","sharing","governance","modules","stages","fields","notifications"],"additionalProperties":false,"description":"Workspace configuration derived from runtime validation. Cross-field constraints (default records <= max records and unique stage/field IDs), normalized strings and custom URL/image checks remain enforced by the server."},"ConfigEnvelope":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/Config"},"version":{"type":"integer","minimum":0}},"required":["config","version"],"additionalProperties":false},"MonitorInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"task":{"type":"object","properties":{"kind":{"type":"string","enum":["search","details","reviews","photos","enrichment","rank","website_audit","map_tiles","search_visibility","photo_audit"]},"url":{"default":"","type":"string","maxLength":2048},"tile_set":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"z":{"type":"integer","minimum":0,"maximum":19},"x":{"type":"integer","minimum":0,"maximum":9007199254740991},"y":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["z","x","y"],"additionalProperties":false}},"visibility":{"type":"object","properties":{"engine":{"type":"string","const":"google_ai_overview"},"location":{"default":"","type":"string","maxLength":120},"targets":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"domain":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])$"}},"required":["name","domain"],"additionalProperties":false}}},"required":["engine","targets"],"additionalProperties":false},"photo_audit":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_generation":{"type":"boolean","const":true}},"required":["asset_id","preview_hash","confirmed_generation"],"additionalProperties":false},"query":{"default":"","type":"string","maxLength":400},"business_id":{"default":"","type":"string","maxLength":250},"limit":{"type":"integer","minimum":1,"maximum":500},"region":{"default":"us","type":"string","pattern":"^[a-zA-Z]{2}$"},"language":{"default":"en","type":"string","minLength":2,"maxLength":8},"enrich":{"default":false,"type":"boolean"},"min_rating":{"type":"number","minimum":0,"maximum":5},"website":{"type":"string","enum":["all","present","missing"]},"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"area":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"polygon"},"geometry":{"type":"object","properties":{"type":{"type":"string","const":"Polygon"},"coordinates":{"minItems":1,"maxItems":5,"type":"array","items":{"minItems":4,"maxItems":256,"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-85,"maximum":85}],"items":false,"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"cell":{"type":"object","properties":{"south":{"type":"number","minimum":-85,"maximum":85},"west":{"type":"number","minimum":-180,"maximum":180},"north":{"type":"number","minimum":-85,"maximum":85},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","west","north","east"],"additionalProperties":false}},"required":["type","geometry"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"radius"},"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"radius_m":{"type":"integer","minimum":1,"maximum":50000}},"required":["type","lat","lng","radius_m"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"box"},"south":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"north":{"type":"number","minimum":-90,"maximum":90},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["type","south","west","north","east"],"additionalProperties":false}]},"review_options":{"type":"object","properties":{"sort_by":{"default":"most_relevant","type":"string","enum":["most_relevant","newest","highest_ranking","lowest_ranking"]},"query":{"default":"","type":"string","maxLength":400},"translate":{"default":false,"type":"boolean"}},"additionalProperties":false},"is_video":{"type":"boolean"},"continue_from":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind"],"additionalProperties":false},"interval_hours":{"type":"integer","minimum":24,"maximum":8760},"budget":{"type":"integer","minimum":1,"maximum":10000}},"required":["name","task","interval_hours","budget"],"additionalProperties":false},"Monitor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"request_json":{"type":"string"},"interval_hours":{"type":"integer"},"budget":{"type":"integer"},"active":{"type":"integer"},"next_run":{"type":"string"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspace_id":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","request_json","interval_hours","budget","active","next_run","created_at","last_error"],"additionalProperties":false},"AuditEvent":{"type":"object","properties":{"id":{"type":"integer"},"actor_id":{"type":"string"},"action":{"type":"string"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"workspace_id":{"type":"string"}},"required":["id","workspace_id","actor_id","action","resource_id","created_at"],"additionalProperties":false},"Success":{"type":"object","properties":{"updated":{"const":true},"deleted":{"const":true},"saved":{"const":true}},"required":[],"additionalProperties":false},"ReportBrand":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"default":"MapsScraper.dev"},"accent":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#49613b"},"website":{"type":"string","maxLength":300,"description":"Empty or public HTTPS link without credentials, custom port, query or fragment."},"logo":{"type":"string","maxLength":120000,"description":"Empty or base64 PNG data URL, at most 512 × 512 pixels. Remote and SVG images are rejected."},"footer":{"type":"string","maxLength":500}},"required":["name","accent","website","logo","footer"],"additionalProperties":false},"ReportPresentation":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"subtitle":{"type":"string","maxLength":300,"default":""},"brand":{"$ref":"#/components/schemas/ReportBrand"},"density":{"enum":["comfortable","compact"],"default":"comfortable"},"font":{"enum":["sans","serif"],"default":"sans"},"sections":{"type":"array","items":{"enum":["summary","analysis","evidence","sources"]},"minItems":1,"maxItems":4,"uniqueItems":true},"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"minItems":1,"maxItems":20,"uniqueItems":true,"description":"Ordered columns from the closed field catalog for the report kind. See docs/REPORT_DELIVERY.md."},"include_source_queries":{"type":"boolean","default":false}},"required":["title","brand","sections","fields"],"additionalProperties":false},"ReportSnapshot":{"type":"object","properties":{"schema":{"const":"localos.report.v1"},"report_id":{"type":"string","format":"uuid"},"kind":{"enum":["comparison","reviews","grid","websites","photos"]},"created_at":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"brand":{"$ref":"#/components/schemas/ReportBrand"},"density":{"type":"string"},"font":{"type":"string"},"sections":{"type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"string"}},"methodology":{"type":"string"},"entries_truncated":{"type":"boolean"},"summary":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"records_analyzed":{"anyOf":[{"type":"number"},{"type":"null"}]},"rated_records":{"anyOf":[{"type":"number"},{"type":"null"}]},"average_rating":{"anyOf":[{"type":"number"},{"type":"null"}]},"website_not_provided":{"anyOf":[{"type":"number"},{"type":"null"}]},"rating_distribution":{"anyOf":[{"type":"array","maxItems":5,"items":{"type":"number"}},{"type":"null"}]},"terms":{"anyOf":[{"type":"array","maxItems":30,"items":{"type":"array","prefixItems":[{"type":"string"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2}},{"type":"null"}]},"metadata_records":{"anyOf":[{"type":"number"},{"type":"null"}]},"audited_images":{"anyOf":[{"type":"number"},{"type":"null"}]},"dated_records":{"anyOf":[{"type":"number"},{"type":"null"}]},"undated_records":{"anyOf":[{"type":"number"},{"type":"null"}]},"points_observed":{"anyOf":[{"type":"number"},{"type":"null"}]},"points_missing":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["records_analyzed","rated_records","average_rating","website_not_provided"]},{"type":"null"}]},"entries":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"maxProperties":20,"propertyNames":{"enum":["address","asset_id","category","excerpt","height","html.canonical","html.description","html.h1_count","html.images","html.images_without_alt","html.json_ld_blocks","html.language","html.title","html.viewport","http_status","https","id","image_sha256","job_id","lat","lighting","lng","name","observation","observed_at","obstruction","photo_date","photo_id","rank","rating","review_count","rights_basis","sample_complete","sample_size","scene","sharpness","source_kind","status","suggestion","website","width"]}}},"sources":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"anyOf":[{"enum":["live_maps","map_tiles","ai_overview","public_http","ai_image_analysis","user_import"],"description":"Neutral data source label: live_maps, map_tiles, ai_overview, public_http, ai_image_analysis or user_import."},{"type":"null"}]},"fetched_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"records":{"anyOf":[{"type":"number"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["job_id","provider","fetched_at","records"]}},"ai_analysis":{"$ref":"#/components/schemas/ReportAiAnalysis"}},"required":["schema","report_id","kind","created_at","title","subtitle","brand","density","font","sections","fields","methodology","entries_truncated","summary","entries","sources"],"additionalProperties":false},"ReportPresentationPreview":{"type":"object","properties":{"presentation":{"$ref":"#/components/schemas/ReportPresentation"},"version":{"type":"integer"},"snapshot":{"$ref":"#/components/schemas/ReportSnapshot"},"snapshot_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["presentation","version","snapshot","snapshot_hash"],"additionalProperties":false},"ReportShareMetadata":{"type":"object","properties":{"id":{"type":"string"},"pdf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_by":{"type":"string"},"report_id":{"type":"string"},"report_version":{"type":"integer"},"title":{"type":"string"},"snapshot_hash":{"type":"string"},"access":{"enum":["link","verified_emails"]},"recipients_json":{"type":"string","description":"JSON array of lowercased allowlisted emails, workspace-authenticated metadata only."},"status":{"enum":["preparing","active","revoked","expired"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"password_protected":{"type":"boolean"},"available":{"type":"boolean"},"acceptance_count":{"type":"integer","minimum":0,"description":"Recipients who confirmed this share's print layout."},"portal_count":{"type":"integer","minimum":0,"description":"Active, unexpired client portals that list this share."}},"required":["id","pdf_id","created_by","report_id","report_version","title","snapshot_hash","access","recipients_json","status","created_at","expires_at","password_protected","available","acceptance_count","portal_count"],"additionalProperties":false},"CreateReportShare":{"type":"object","properties":{"pdf_id":{"type":"string","format":"uuid","description":"Optional completed PDF matching this exact report version and snapshot hash; share expiry is also bounded by PDF retention."},"report_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":0},"snapshot_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"hours":{"type":"integer","minimum":1,"maximum":720},"token":{"type":"string","pattern":"^rs_[a-f0-9]{64}$","description":"32 cryptographically random bytes as hex, retained by caller for identical retries; server stores only SHA-256."},"access":{"enum":["link","verified_emails"]},"recipients":{"type":"array","items":{"type":"string","format":"email","maxLength":254},"maxItems":25,"default":[]},"confirmed_share":{"const":true},"password":{"type":"string","minLength":16,"maxLength":128,"writeOnly":true,"description":"Optional share password; required by workspace sharing.require_password. Exact characters are preserved. Never place passwords in URLs. Lost passwords cannot be recovered; revoke and create a new link."}},"required":["report_id","version","snapshot_hash","hours","token","access","confirmed_share"],"additionalProperties":false,"description":"verified_emails requires 1–25 recipients; link requires an empty recipient list. Explicit user authorization covers the exact preview and audience."},"ReportPdfOptions":{"type":"object","properties":{"paper":{"enum":["a4","letter"],"default":"a4"},"orientation":{"enum":["portrait","landscape"],"default":"portrait"}},"required":[],"additionalProperties":false},"ReportPdfConfig":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"daily_limit":{"type":"integer","minimum":1,"maximum":50,"default":10},"max_pending":{"type":"integer","minimum":1,"maximum":10,"default":3},"retention_days":{"type":"integer","minimum":1,"maximum":30,"default":7}},"required":["enabled","daily_limit","max_pending","retention_days"],"additionalProperties":false},"ReportPdf":{"type":"object","properties":{"id":{"type":"string"},"created_by":{"type":"string"},"report_id":{"type":"string"},"report_version":{"type":"integer"},"title":{"type":"string"},"snapshot_hash":{"type":"string"},"options_json":{"type":"string","description":"Serialized ReportPdfOptions."},"status":{"enum":["queued","rendering","completed","failed","uncertain","cancelled","expired"]},"expires_at":{"type":"string"},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","created_by","report_id","report_version","title","snapshot_hash","options_json","status","expires_at","created_at","started_at","finished_at","error","bytes","sha256"],"additionalProperties":false},"ReportPdfWithAvailability":{"type":"object","properties":{"id":{"type":"string"},"created_by":{"type":"string"},"report_id":{"type":"string"},"report_version":{"type":"integer"},"title":{"type":"string"},"snapshot_hash":{"type":"string"},"options_json":{"type":"string","description":"Serialized ReportPdfOptions."},"status":{"enum":["queued","rendering","completed","failed","uncertain","cancelled","expired"]},"expires_at":{"type":"string"},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"available":{"type":"boolean"}},"required":["id","created_by","report_id","report_version","title","snapshot_hash","options_json","status","expires_at","created_at","started_at","finished_at","error","bytes","sha256","available"],"additionalProperties":false},"CreateReportPdf":{"type":"object","properties":{"report_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":0},"snapshot_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"options":{"$ref":"#/components/schemas/ReportPdfOptions"},"confirmed_render":{"const":true}},"required":["report_id","version","snapshot_hash","options","confirmed_render"],"additionalProperties":false},"ReviewAiConfig":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"daily_limit":{"type":"integer","minimum":1,"maximum":20,"default":5},"max_pending":{"type":"integer","minimum":1,"maximum":5,"default":2},"max_reviews":{"type":"integer","minimum":2,"maximum":40,"default":30},"queue_retention_hours":{"type":"integer","minimum":1,"maximum":24,"default":1}},"required":["enabled","daily_limit","max_pending","max_reviews","queue_retention_hours"],"additionalProperties":false},"ReportAiAnalysis":{"type":"object","properties":{"model":{"const":"review-analysis-v1"},"prompt_version":{"const":"review-themes.v3"},"generated_at":{"type":"string"},"sampled_reviews":{"type":"integer","minimum":2,"maximum":40},"eligible_reviews":{"type":"integer","minimum":2,"maximum":100},"coverage_note":{"type":"string"},"topics":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"interpretation":{"type":"string","maxLength":300},"sentiment":{"enum":["positive","negative","mixed","neutral"]},"matched_reviews":{"type":"integer","minimum":1,"maximum":40},"citations":{"type":"array","minItems":1,"maxItems":40,"items":{"type":"object","properties":{"ref":{"type":"string","pattern":"^r([1-9]|[1-3][0-9]|40)$"},"quote":{"type":"string","minLength":8,"maxLength":300},"id":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}]},"job_id":{"type":"string","format":"uuid"}},"required":["ref"],"additionalProperties":false}}},"required":["label","interpretation","sentiment","matched_reviews","citations"],"additionalProperties":false}}},"required":["model","prompt_version","generated_at","sampled_reviews","eligible_reviews","coverage_note","topics"],"additionalProperties":false},"ReviewAiReceipt":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_by":{"type":"string"},"report_id":{"type":"string","format":"uuid"},"report_version":{"type":"integer"},"result_report_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"title":{"type":"string"},"preview_hash":{"type":"string"},"model":{"type":"string"},"prompt_version":{"type":"string"},"sampled_reviews":{"type":"integer"},"status":{"enum":["queued","running","completed","failed","uncertain","cancelled","expired"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"}},"required":["prompt_tokens","completion_tokens"],"additionalProperties":false},{"type":"null"}]}},"required":["id","created_by","report_id","report_version","result_report_id","title","preview_hash","model","prompt_version","sampled_reviews","status","created_at","expires_at","started_at","finished_at","error","usage"],"additionalProperties":false},"CreateReviewAi":{"type":"object","properties":{"report_id":{"type":"string","format":"uuid"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_generation":{"const":true}},"required":["report_id","preview_hash","confirmed_generation"],"additionalProperties":false},"SearchArea":{"oneOf":[{"type":"object","properties":{"type":{"const":"radius"},"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"radius_m":{"type":"integer","minimum":1,"maximum":50000}},"required":["type","lat","lng","radius_m"],"additionalProperties":false},{"type":"object","properties":{"type":{"const":"box"},"south":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"north":{"type":"number","minimum":-90,"maximum":90},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["type","south","west","north","east"],"additionalProperties":false,"description":"south < north; west < east. Split antimeridian crossings. Workspace side-length caps apply."},{"type":"object","properties":{"type":{"const":"polygon"},"geometry":{"$ref":"#/components/schemas/GeoJSONPolygon"},"cell":{"$ref":"#/components/schemas/PolygonCellBounds"}},"required":["type","geometry"],"additionalProperties":false}]},"ReviewOptions":{"type":"object","properties":{"sort_by":{"enum":["most_relevant","newest","highest_ranking","lowest_ranking"],"default":"most_relevant"},"query":{"type":"string","maxLength":400,"default":""},"translate":{"type":"boolean","default":false}},"required":[],"additionalProperties":false},"ProviderSearchConfig":{"type":"object","properties":{"area_enabled":{"type":"boolean","default":true},"max_radius_m":{"type":"integer","minimum":1,"maximum":50000,"default":50000},"max_box_span_degrees":{"type":"number","minimum":0.001,"maximum":180,"default":5},"continuation_enabled":{"type":"boolean","default":true},"max_pages":{"type":"integer","minimum":1,"maximum":100,"default":20},"polygon_enabled":{"type":"boolean","default":true},"max_polygon_positions":{"type":"integer","minimum":4,"maximum":256,"default":128},"max_polygon_cells":{"type":"integer","minimum":1,"maximum":50,"default":25},"max_polygon_span_degrees":{"type":"number","minimum":0.001,"maximum":30,"default":5}},"required":["area_enabled","max_radius_m","max_box_span_degrees","continuation_enabled","max_pages","polygon_enabled","max_polygon_positions","max_polygon_cells","max_polygon_span_degrees"],"additionalProperties":false},"ProviderPageReceipt":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"page_number":{"type":"integer"},"continuation_parent_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_count":{"type":"integer"},"result_expired":{"type":"integer"},"charged":{"type":"integer"},"reserved":{"type":"integer"},"created_at":{"type":"string"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","page_number","continuation_parent_id","result_count","result_expired","charged","reserved","created_at","expires_at"],"additionalProperties":false},"ContinuationPreview":{"type":"object","properties":{"source_id":{"type":"string"},"root_id":{"type":"string"},"page_number":{"type":"integer"},"max_pages":{"type":"integer"},"available":{"type":"boolean"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"existing_child":{"anyOf":[{"$ref":"#/components/schemas/ProviderPageReceipt"},{"type":"null"}]},"task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"units":{"type":"integer"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/ProviderPageReceipt"}}},"required":["source_id","root_id","page_number","max_pages","available","reason","existing_child","task","units","pages"],"additionalProperties":false},"ChainExportConfig":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"daily_requests":{"type":"integer","minimum":1,"maximum":20,"default":5},"max_pending":{"type":"integer","minimum":1,"maximum":5,"default":2},"max_pages":{"type":"integer","minimum":1,"maximum":100,"default":100},"max_source_bytes":{"type":"integer","minimum":1000000,"maximum":100000000,"default":50000000},"retention_days":{"type":"integer","minimum":1,"maximum":30,"default":7}},"required":["enabled","daily_requests","max_pending","max_pages","max_source_bytes","retention_days"],"additionalProperties":false,"description":"Deployment hard ceilings: 10 pending and 100 admitted attempts per UTC day, shared across workspaces. Files stop at the earliest source expiry. Configurable workspace limits cannot override hard ceilings."},"ChainExportPreviewInput":{"type":"object","properties":{"through_job_id":{"type":"string","format":"uuid"},"deduplication":{"enum":["first_by_id","keep_all"],"default":"first_by_id"}},"required":["through_job_id"],"additionalProperties":false},"ChainExportPreview":{"type":"object","properties":{"through_job_id":{"type":"string"},"root_id":{"type":"string"},"kind":{"enum":["reviews","photos"]},"deduplication":{"enum":["first_by_id","keep_all"]},"page_count":{"type":"integer"},"input_records":{"type":"integer"},"source_bytes":{"type":"integer"},"expires_at":{"type":"string"},"preview_hash":{"type":"string"},"config_version":{"type":"integer"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"page_number":{"type":"integer"},"result_count":{"type":"integer"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","page_number","result_count","expires_at"],"additionalProperties":false}},"methodology":{"type":"string"}},"required":["through_job_id","root_id","kind","deduplication","page_count","input_records","source_bytes","expires_at","preview_hash","config_version","pages","methodology"],"additionalProperties":false},"CreateChainExport":{"type":"object","properties":{"through_job_id":{"type":"string","format":"uuid"},"deduplication":{"enum":["first_by_id","keep_all"],"default":"first_by_id"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_export":{"const":true}},"required":["through_job_id","preview_hash","confirmed_export"],"additionalProperties":false},"ChainExportReceipt":{"type":"object","properties":{"id":{"type":"string"},"created_by":{"type":"string"},"through_job_id":{"type":"string"},"root_id":{"type":"string"},"kind":{"type":"string"},"deduplication":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled","expired"]},"page_count":{"type":"integer"},"part_count":{"type":"integer"},"input_count":{"type":"integer"},"record_count":{"type":"integer"},"duplicate_count":{"type":"integer"},"conflict_count":{"type":"integer"},"unidentified_count":{"type":"integer"},"bytes":{"type":"integer"},"failures":{"type":"integer"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"available":{"type":"boolean"}},"required":["id","created_by","through_job_id","root_id","kind","deduplication","status","page_count","part_count","input_count","record_count","duplicate_count","conflict_count","unidentified_count","bytes","failures","created_at","expires_at","error","available"],"additionalProperties":false},"ChainExportPart":{"type":"object","properties":{"part_index":{"type":"integer"},"source_job_id":{"type":"string"},"sha256":{"type":"string"},"bytes":{"type":"integer"},"record_count":{"type":"integer"}},"required":["part_index","source_job_id","sha256","bytes","record_count"],"additionalProperties":false},"GeoJSONPolygon":{"type":"object","properties":{"type":{"const":"Polygon"},"coordinates":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"array","minItems":4,"maxItems":256,"items":{"type":"array","prefixItems":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-85,"maximum":85}],"minItems":2,"maxItems":2,"items":false}}}},"required":["type","coordinates"],"additionalProperties":false,"description":"Bounded 2D GeoJSON Polygon subset. [longitude,latitude], exactly closed rings, <=256 total positions. First ring is exterior; at most four interior holes. No self-intersection, self-touch, overlapping/nested/touching holes or antimeridian crossing. Either winding accepted. No Feature/MultiPolygon/altitude. Workspace position/span limits also apply."},"PolygonCellBounds":{"type":"object","properties":{"south":{"type":"number","minimum":-85,"maximum":85},"west":{"type":"number","minimum":-180,"maximum":180},"north":{"type":"number","minimum":-85,"maximum":85},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","west","north","east"],"additionalProperties":false,"description":"Finite ordered box inside polygon bounds and conservatively intersecting the polygon. Cell mask is additional to the polygon, never a replacement."},"PolygonPlanInput":{"type":"object","properties":{"task":{"$ref":"#/components/schemas/Task"},"rows":{"type":"integer","minimum":1,"maximum":10},"columns":{"type":"integer","minimum":1,"maximum":10}},"required":["task","rows","columns"],"additionalProperties":false,"description":"Search task with polygon area and no cell override. rows*columns <=50. Only intersecting cells are retained; retained count must satisfy workspace polygon and batch caps. Each cell must satisfy the box-side cap, while the full polygon satisfies its own side cap."},"PolygonPlanPreview":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/PolygonPlanInput"},"preview_hash":{"type":"string"},"config_version":{"type":"integer"},"bounds":{"$ref":"#/components/schemas/PolygonCellBounds"},"cells":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"column":{"type":"integer"},"bounds":{"$ref":"#/components/schemas/PolygonCellBounds"}},"required":["row","column","bounds"],"additionalProperties":false}},"skipped_cells":{"type":"integer"},"estimated_max_units":{"type":"integer"},"max_records":{"type":"integer"},"provider_configured":{"type":"boolean"},"methodology":{"type":"string"},"refusal":{"anyOf":[{"$ref":"#/components/schemas/ResearchRefusal"},{"type":"null"}]}},"required":["plan","preview_hash","config_version","bounds","cells","skipped_cells","estimated_max_units","max_records","provider_configured","refusal","methodology"],"additionalProperties":false},"CreatePolygonBatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"plan":{"$ref":"#/components/schemas/PolygonPlanInput"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_plan":{"const":true}},"required":["name","plan","preview_hash","confirmed_plan"],"additionalProperties":false},"BillingQuote":{"type":"object","properties":{"plan_id":{"type":"string"},"name":{"type":"string"},"units_per_cycle":{"type":"integer"},"currency":{"type":"string"},"unit_amount":{"type":"integer"},"interval":{"enum":["month","year"]},"tax_behavior":{"enum":["inclusive","exclusive"]},"quote_hash":{"type":"string"}},"required":["plan_id","name","units_per_cycle","currency","unit_amount","interval","tax_behavior","quote_hash"],"additionalProperties":false},"BillingSummary":{"type":"object","properties":{"mode":{"enum":["disabled","test","live"]},"checkout_ready":{"type":"boolean"},"portal_ready":{"type":"boolean"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"period_end":{"anyOf":[{"type":"integer"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"unit_debt":{"type":"integer"},"test_balance":{"type":"integer"},"hold":{"anyOf":[{"type":"string"},{"type":"null"}]},"synced_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_manage":{"type":"boolean"},"wallet":{"$ref":"#/components/schemas/Usage"},"can_confirm":{"type":"boolean"}},"required":["mode","checkout_ready","portal_ready","reason","status","plan_name","period_end","cancel_at_period_end","unit_debt","test_balance","hold","synced_at","can_manage","can_confirm","wallet"],"additionalProperties":false},"BillingCheckout":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","open","completed","expired","failed","uncertain"]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"quote":{"$ref":"#/components/schemas/BillingQuote"}},"required":["id","status"],"additionalProperties":false},"BillingInvoice":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"amount_paid":{"type":"integer"},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"period_start":{"anyOf":[{"type":"integer"},{"type":"null"}]},"period_end":{"anyOf":[{"type":"integer"},{"type":"null"}]},"base_units":{"type":"integer"},"applied_units":{"type":"integer"},"review_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"type":"string"},"updated_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","status","currency","amount_paid","number","period_start","period_end","base_units","applied_units","review_reason","mode","updated_at","created_at"],"additionalProperties":false},"BillingUnitEntry":{"type":"object","properties":{"id":{"type":"integer"},"invoice_id":{"type":"string"},"mode":{"type":"string"},"delta":{"type":"integer"},"target_units":{"type":"integer"},"reason":{"type":"string"},"created_at":{"type":"string"}},"required":["id","invoice_id","mode","delta","target_units","reason","created_at"],"additionalProperties":false},"BillingEvent":{"type":"object","properties":{"id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string"},"attempts":{"type":"integer"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","event_type","status","attempts","error","created_at","completed_at"],"additionalProperties":false},"MapTile":{"type":"object","properties":{"z":{"type":"integer","minimum":0,"maximum":19},"x":{"type":"integer","minimum":0,"maximum":524287},"y":{"type":"integer","minimum":0,"maximum":524287}},"required":["z","x","y"],"additionalProperties":true},"MapSnapshot":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"expires_at":{"type":"string"},"provider":{"const":"map_tiles"},"fetched_at":{"type":"string"},"language":{"enum":["en","fr","es"]},"items":{"type":"array","maxItems":16,"items":{"type":"object","properties":{"z":{"type":"integer","minimum":0,"maximum":19},"x":{"type":"integer","minimum":0,"maximum":524287},"y":{"type":"integer","minimum":0,"maximum":524287},"status":{"enum":["completed","failed","uncertain","not_attempted"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"type":"string","maxLength":349528,"description":"Base64 bounded 256px PNG, completed tiles only."}},"required":["z","x","y","status","reason"],"additionalProperties":false}},"count":{"type":"integer"},"requested_tiles":{"type":"integer"},"attempted_tiles":{"type":"integer"},"completed_tiles":{"type":"integer"},"charged_units":{"type":"integer"},"partial":{"type":"boolean"},"attribution":{"type":"string"},"coverage":{"const":"requested_tiles_only"}},"required":["job_id","expires_at","provider","fetched_at","language","items","count","requested_tiles","attempted_tiles","completed_tiles","charged_units","partial","attribution","coverage"],"additionalProperties":false},"VisibilityOptions":{"type":"object","properties":{"engine":{"const":"google_ai_overview"},"location":{"type":"string","maxLength":120,"default":""},"targets":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"domain":{"type":"string","maxLength":253,"description":"Unique lowercase public DNS hostname; no protocol, path or port."}},"required":["name","domain"],"additionalProperties":true}}},"required":["engine","targets"],"additionalProperties":true},"VisibilityObservation":{"type":"object","properties":{"engine":{"const":"google_ai_overview"},"query":{"type":"string"},"region":{"type":"string"},"language":{"type":"string"},"location":{"type":"string"},"observed_at":{"type":"string"},"overview":{"enum":["present","not_observed"]},"text_complete":{"type":"boolean"},"citations_complete":{"type":"boolean"},"text_parts":{"type":"array","maxItems":200,"items":{"type":"object","properties":{"type":{"enum":["paragraph","heading","list_item"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":true}},"citations":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"index":{"type":"integer"},"url":{"type":"string"},"domain":{"type":"string"},"title":{"type":"string"}},"required":["index","url","domain","title"],"additionalProperties":true}},"targets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"brand_mentioned":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"domain_cited":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"citation_indices":{"type":"array","items":{"type":"integer"}}},"required":["name","domain","brand_mentioned","domain_cited","citation_indices"],"additionalProperties":true}},"warnings":{"type":"array","items":{"type":"string"}},"match_method":{"const":"literal_case_insensitive_text_and_exact_or_subdomain_host"}},"required":["engine","query","region","language","location","observed_at","overview","text_complete","citations_complete","text_parts","citations","targets","warnings","match_method"],"additionalProperties":true},"LocationProfile":{"type":"object","additionalProperties":false,"required":["code","name","country"],"properties":{"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9_-]{0,39}$"},"name":{"type":"string","maxLength":160,"description":"Trimmed single-line text; no ASCII control characters.","minLength":1},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"portfolio":{"type":"string","maxLength":80,"description":"Trimmed single-line text; no ASCII control characters."},"category":{"type":"string","maxLength":120,"description":"Trimmed single-line text; no ASCII control characters."},"status":{"enum":["active","paused","archived"],"default":"active"},"address":{"type":"string","maxLength":300,"description":"Trimmed single-line text; no ASCII control characters."},"locality":{"type":"string","maxLength":100,"description":"Trimmed single-line text; no ASCII control characters."},"region":{"type":"string","maxLength":100,"description":"Trimmed single-line text; no ASCII control characters."},"postal_code":{"type":"string","maxLength":30,"description":"Trimmed single-line text; no ASCII control characters."},"phone":{"type":"string","maxLength":40,"description":"Trimmed single-line text; no ASCII control characters."},"website":{"type":"string","maxLength":2048,"description":"Empty or HTTPS URL without user credentials. Stored as data; never fetched automatically."},"business_id":{"type":"string","maxLength":250,"description":"Trimmed single-line text; no ASCII control characters."},"manager_id":{"type":"string","maxLength":200,"description":"Trimmed single-line text; no ASCII control characters."},"notes":{"type":"string","maxLength":4000},"business_type":{"enum":["storefront","service_area","hybrid"],"default":"storefront"},"hours":{"$ref":"#/components/schemas/BusinessHours"},"service_areas":{"type":"array","maxItems":20,"default":[],"items":{"$ref":"#/components/schemas/ServiceArea"},"description":"Named areas, not geographic boundaries or verified coverage. At least one required for service_area/hybrid. Exact case-insensitive duplicates rejected."}},"description":"Complete profile limited to 60,000 UTF-8 JSON bytes after defaults. Omitted optional fields default to unknown hours, storefront and no service areas. Full replacement requires preserving all desired fields."},"OperationDraft":{"type":"object","additionalProperties":false,"required":["location_id","kind","title","body"],"properties":{"location_id":{"type":"string","format":"uuid"},"kind":{"enum":["profile_update","post","review_reply","listing_issue","general"]},"title":{"type":"string","maxLength":160,"description":"Trimmed single-line text; no ASCII control characters.","minLength":1},"body":{"type":"string","minLength":1,"maxLength":6000},"reference_url":{"type":"string","maxLength":2048,"description":"Empty or HTTPS URL without user credentials. Stored as data; never fetched automatically."},"priority":{"enum":["low","normal","high"],"default":"normal"},"assignee_id":{"type":"string","maxLength":200,"description":"Trimmed single-line text; no ASCII control characters."},"due_date":{"type":"string","description":"Empty or a valid Gregorian YYYY-MM-DD calendar date. Overdue is evaluated against the current UTC day."}}},"LocationRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"profile":{"$ref":"#/components/schemas/LocationProfile"},"version":{"type":"integer","minimum":1,"maximum":2147483646},"actor_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"open_operations":{"type":"integer"},"replayed":{"type":"boolean"},"manager_name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","profile","manager_name","version","actor_id","created_at","updated_at","open_operations"],"additionalProperties":false},"OperationRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"draft":{"$ref":"#/components/schemas/OperationDraft"},"status":{"enum":["draft","submitted","approved","in_progress","completed","cancelled"]},"version":{"type":"integer","minimum":1,"maximum":2147483646},"location_version":{"type":"integer","minimum":1,"maximum":2147483646},"current_location_version":{"type":"integer","minimum":1,"maximum":2147483646},"location_name":{"type":"string"},"location_status":{"enum":["active","paused","archived"]},"approved_by":{"type":"string"},"actor_id":{"type":"string"},"note":{"type":"string"},"evidence_url":{"type":"string","maxLength":2048,"description":"Empty or HTTPS URL without user credentials. Stored as data; never fetched automatically."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"execution_mode":{"const":"manual"},"replayed":{"type":"boolean"},"assignee_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_id":{"type":"string","format":"uuid"}},"required":["id","location_id","draft","status","version","location_version","current_location_version","location_name","location_status","approved_by","assignee_name","approved_name","actor_id","note","evidence_url","created_at","updated_at","execution_mode"],"additionalProperties":false},"LocationEvent":{"type":"object","properties":{"id":{"type":"integer"},"resource_type":{"enum":["location","operation"]},"resource_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1,"maximum":2147483646},"actor_id":{"type":"string"},"action":{"type":"string"},"snapshot_json":{"type":"string","description":"JSON-encoded immutable profile or operation snapshot. Treat all text as untrusted data."},"created_at":{"type":"string"}},"required":["id","resource_type","resource_id","version","actor_id","action","snapshot_json","created_at"],"additionalProperties":false},"LocationConfig":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":true},"max_locations":{"type":"integer","minimum":1,"maximum":5000,"default":250},"max_open_operations":{"type":"integer","minimum":1,"maximum":10000,"default":500},"daily_mutations":{"type":"integer","minimum":1,"maximum":10000,"default":2000}}},"BusinessPeriod":{"type":"object","additionalProperties":false,"required":["open","close"],"properties":{"open":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"close":{"type":"string","pattern":"^(?:(?:[01]\\d|2[0-3]):[0-5]\\d|24:00)$"}}},"BusinessHours":{"type":"object","additionalProperties":false,"description":"Local wall-clock hours in a supported IANA zone. Monday=0 through Sunday=6; missing day means unknown, closed=true means explicitly closed. Open days require 1–4 ascending, nonoverlapping same-day periods; close-only 24:00 is allowed. Split overnight work across adjacent days. Special dates override an entire local calendar day. Duplicate days/dates are rejected. Hours require a time zone. No open-now calculation or business listing synchronization.","properties":{"time_zone":{"type":"string","enum":["","Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","UTC"],"default":""},"weekly":{"type":"array","maxItems":7,"default":[],"items":{"type":"object","additionalProperties":false,"required":["day","closed","periods"],"properties":{"day":{"type":"integer","minimum":0,"maximum":6},"closed":{"type":"boolean"},"periods":{"type":"array","maxItems":4,"items":{"$ref":"#/components/schemas/BusinessPeriod"}}}}},"special":{"type":"array","maxItems":100,"default":[],"items":{"type":"object","additionalProperties":false,"required":["date","closed","periods"],"properties":{"date":{"type":"string","format":"date","description":"Valid Gregorian date, year 0001–9999; unique within this profile"},"note":{"type":"string","maxLength":80,"description":"Trimmed single-line text; no ASCII control characters.","default":""},"closed":{"type":"boolean"},"periods":{"type":"array","maxItems":4,"items":{"$ref":"#/components/schemas/BusinessPeriod"}}}}}}},"ServiceArea":{"type":"object","additionalProperties":false,"required":["name","country"],"properties":{"name":{"type":"string","maxLength":120,"description":"Trimmed single-line text; no ASCII control characters.","minLength":1},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"region":{"type":"string","maxLength":100,"description":"Trimmed single-line text; no ASCII control characters."},"postal_code":{"type":"string","maxLength":30,"description":"Trimmed single-line text; no ASCII control characters."}}},"PhotoAuditConfig":{"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"daily_limit":{"default":10,"type":"integer","minimum":1,"maximum":100},"max_assets":{"default":25,"type":"integer","minimum":1,"maximum":100},"retention_hours":{"default":24,"type":"integer","minimum":1,"maximum":168}},"additionalProperties":false},"PhotoAuditOptions":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_generation":{"type":"boolean","const":true}},"required":["asset_id","preview_hash","confirmed_generation"],"additionalProperties":false},"PhotoUpload":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"mime":{"type":"string","enum":["image/jpeg","image/png"]},"image_base64":{"type":"string","minLength":24,"maxLength":533336},"rights_basis":{"type":"string","enum":["owned","licensed"]},"rights_note":{"type":"string","minLength":10,"maxLength":1000},"confirmed_model_processing":{"type":"boolean","const":true},"allow_report_sharing":{"default":false,"type":"boolean"},"source_job_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"photo_id":{"type":"string","minLength":1,"maxLength":250}},"required":["name","mime","image_base64","rights_basis","rights_note","confirmed_model_processing"],"additionalProperties":false,"dependentRequired":{"source_job_id":["photo_id"],"photo_id":["source_job_id"]}},"PhotoVisionOutput":{"type":"object","properties":{"image_ref":{"type":"string","const":"p1"},"category":{"type":"string","enum":["exterior","interior","product_service","team","document","other","uncertain"]},"scene":{"type":"string","minLength":1,"maxLength":500},"sharpness":{"type":"string","enum":["clear","blurry","unknown"]},"lighting":{"type":"string","enum":["usable","dark","overexposed","unknown"]},"obstruction":{"type":"string","enum":["none_observed","observed","unknown"]},"findings":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"area":{"type":"string","enum":["composition","lighting","sharpness","subject","readability"]},"observation":{"type":"string","minLength":1,"maxLength":240},"suggestion":{"type":"string","minLength":1,"maxLength":240}},"required":["area","observation","suggestion"],"additionalProperties":false}}},"required":["image_ref","category","scene","sharpness","lighting","obstruction","findings"],"additionalProperties":false},"PhotoAsset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_by":{"type":"string"},"name":{"type":"string"},"mime":{"enum":["image/png","image/jpeg"],"type":"string"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"bytes":{"type":"integer","maximum":400000,"minimum":24},"width":{"type":"integer","minimum":16,"maximum":2048},"height":{"type":"integer","minimum":16,"maximum":2048},"metadata_removed":{"type":"boolean"},"rights_basis":{"enum":["owned","licensed"],"type":"string"},"rights_note":{"type":"string"},"allow_report_sharing":{"type":"boolean"},"source_job_id":{"type":["string","null"]},"photo_id":{"type":["string","null"]},"status":{"enum":["preparing","ready","failed","deleted","expired"],"type":"string"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"available":{"type":"boolean"},"replayed":{"type":"boolean"}},"required":["id","created_by","name","mime","sha256","bytes","width","height","metadata_removed","rights_basis","rights_note","allow_report_sharing","source_job_id","photo_id","status","created_at","expires_at"],"additionalProperties":false},"PhotoAuditPreview":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"name":{"type":"string"},"mime":{"type":"string","enum":["image/png","image/jpeg"]},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":400000},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rights_basis":{"type":"string","enum":["owned","licensed"]},"rights_note":{"type":"string"},"allow_report_sharing":{"type":"boolean"},"source_job_id":{"type":["string","null"]},"photo_id":{"type":["string","null"]},"expires_at":{"type":"string"},"model":{"const":"image-analysis-v1","type":"string"},"prompt_version":{"const":"listing-photo.v1","type":"string"},"units":{"const":1,"type":"number"},"max_output_tokens":{"const":1200,"type":"number"},"ready":{"type":"boolean"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"dispatches":{"type":"array","items":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["running","completed","failed","uncertain"]},"created_at":{"type":"string"},"finished_at":{"type":["string","null"]},"error":{"type":["string","null"]},"status":{"type":"string"},"reserved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["job_id","state","created_at","finished_at","error","status","reserved","charged"],"additionalProperties":false},"maxItems":10},"limitations":{"type":"string"}},"required":["asset_id","sha256","name","mime","bytes","width","height","rights_basis","rights_note","allow_report_sharing","source_job_id","photo_id","expires_at","model","prompt_version","units","max_output_tokens","ready","preview_hash","limitations","dispatches"],"additionalProperties":false},"JobReviewInput":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":0,"maximum":99},"provider_outcome":{"type":"string","enum":["unknown","not_dispatched","rejected","completed"]},"billing_outcome":{"type":"string","enum":["unknown","not_billed","billed"]},"reference":{"type":"string","maxLength":200},"note":{"type":"string","minLength":20,"maxLength":4000},"confirmed_human_review":{"type":"boolean","const":true}},"required":["expected_revision","provider_outcome","billing_outcome","reference","note","confirmed_human_review"],"additionalProperties":false},"JobReview":{"type":"object","properties":{"revision":{"type":"integer"},"actor_id":{"type":"string"},"provider_outcome":{"enum":["unknown","not_dispatched","rejected","completed"]},"billing_outcome":{"enum":["unknown","not_billed","billed"]},"reference":{"type":"string"},"note":{"type":"string"},"created_at":{"type":"string"}},"required":["revision","actor_id","provider_outcome","billing_outcome","reference","note","created_at"],"additionalProperties":false},"RestoreStoredResult":{"type":"object","properties":{"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_unit_charge":{"type":"boolean","const":true}},"required":["preview_hash","confirmed_unit_charge"],"additionalProperties":false},"StoredResultPreview":{"type":"object","properties":{"job_id":{"type":"string"},"sha256":{"type":"string"},"bytes":{"type":"integer"},"result_count":{"type":"integer"},"units":{"type":"integer"},"expires_at":{"type":"string"},"recovery_until":{"type":"string"},"settings_version":{"type":"integer"},"review_revision":{"type":"integer"},"preview_hash":{"type":"string"},"provider_calls":{"const":0}},"required":["job_id","sha256","bytes","result_count","units","expires_at","recovery_until","settings_version","review_revision","preview_hash","provider_calls"],"additionalProperties":false},"VisibilitySeriesPlan":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"prompts":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":400}},"region":{"default":"us","type":"string","pattern":"^[a-z]{2}$"},"language":{"default":"en","type":"string","pattern":"^[a-z]{2}$"},"visibility":{"type":"object","properties":{"engine":{"type":"string","const":"google_ai_overview"},"location":{"default":"","type":"string","maxLength":120},"targets":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"domain":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])$"}},"required":["name","domain"],"additionalProperties":false}}},"required":["engine","targets"],"additionalProperties":false},"interval_hours":{"type":"integer","minimum":24,"maximum":720},"cycles":{"type":"integer","minimum":1,"maximum":30}},"required":["name","prompts","visibility","interval_hours","cycles"],"additionalProperties":false},"CreateVisibilitySeries":{"type":"object","properties":{"plan":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"prompts":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":400}},"region":{"default":"us","type":"string","pattern":"^[a-z]{2}$"},"language":{"default":"en","type":"string","pattern":"^[a-z]{2}$"},"visibility":{"type":"object","properties":{"engine":{"type":"string","const":"google_ai_overview"},"location":{"default":"","type":"string","maxLength":120},"targets":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"domain":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])$"}},"required":["name","domain"],"additionalProperties":false}}},"required":["engine","targets"],"additionalProperties":false},"interval_hours":{"type":"integer","minimum":24,"maximum":720},"cycles":{"type":"integer","minimum":1,"maximum":30}},"required":["name","prompts","visibility","interval_hours","cycles"],"additionalProperties":false},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_recurring":{"type":"boolean","const":true}},"required":["plan","preview_hash","confirmed_recurring"],"additionalProperties":false},"VisibilitySeriesAction":{"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","cancel"]},"expected_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_recurring":{"type":"boolean","const":true}},"required":["action","expected_revision"],"additionalProperties":false},"VisibilitySourceReview":{"type":"object","properties":{"job_id":{"type":"string"},"version":{"const":"visibility-source-review.v1"},"engine":{"const":"google_ai_overview"},"query":{"type":"string"},"observed_at":{"type":"string"},"overview":{"enum":["present","not_observed"]},"citations_complete":{"type":"boolean"},"guidance_url":{"type":"string","format":"uri"},"methodology":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"url":{"type":"string","format":"uri"},"domain":{"type":"string"},"title":{"type":"string"}},"required":["index","url","domain","title"],"additionalProperties":false}},"targets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"citation_state":{"enum":["cited","not_in_sample","unknown"]},"citation_indices":{"type":"array","items":{"type":"integer"}},"other_target_citation_indices":{"type":"array","items":{"type":"integer"}},"checks":{"type":"array","items":{"type":"object","properties":{"code":{"enum":["inspect_citation","compare_sources","verify_site_eligibility","verify_name_match","insufficient_evidence"]},"title":{"type":"string"},"explanation":{"type":"string"},"citation_indices":{"type":"array","items":{"type":"integer"}}},"required":["code","title","explanation","citation_indices"],"additionalProperties":false}}},"required":["name","domain","citation_state","citation_indices","other_target_citation_indices","checks"],"additionalProperties":false}}},"required":["job_id","version","engine","query","observed_at","overview","citations_complete","guidance_url","methodology","sources","targets"],"additionalProperties":false},"JobStatus":{"enum":["queued","running","completed","partial","failed","cancelled","uncertain"]},"BatchJob":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"$ref":"#/components/schemas/JobStatus"},"reserved":{"type":"integer","minimum":0},"charged":{"type":"integer","minimum":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"request_json":{"type":"string"},"result_count":{"type":"integer","minimum":0},"position":{"type":"integer","minimum":0,"maximum":49},"error_code":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},{"type":"null"}]}},"required":["id","kind","status","reserved","charged","error","error_code","request_json","result_count","position"],"additionalProperties":false},"ConfigInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"defaults":{"type":"object","properties":{"region":{"type":"string","pattern":"^[a-z]{2}$"},"language":{"type":"string","minLength":2,"maxLength":8},"records":{"type":"integer","minimum":1,"maximum":500},"max_units":{"type":"integer","minimum":1,"maximum":10000}},"required":["region","language","records","max_units"],"additionalProperties":false},"limits":{"type":"object","properties":{"max_records":{"type":"integer","minimum":1,"maximum":500},"max_batch_tasks":{"type":"integer","minimum":1,"maximum":50},"max_pending_jobs":{"type":"integer","minimum":1,"maximum":200},"daily_units":{"type":"integer","minimum":1,"maximum":10000}},"required":["max_records","max_batch_tasks","max_pending_jobs","daily_units"],"additionalProperties":false},"locations":{"default":{},"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"max_locations":{"default":250,"type":"integer","minimum":1,"maximum":5000},"daily_mutations":{"default":2000,"type":"integer","minimum":1,"maximum":10000},"max_open_operations":{"default":500,"type":"integer","minimum":1,"maximum":10000}},"additionalProperties":false},"retention_days":{"type":"integer","minimum":7,"maximum":365},"webhooks":{"default":{},"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"max_endpoints":{"default":3,"type":"integer","minimum":1,"maximum":5},"max_pending":{"default":250,"type":"integer","minimum":1,"maximum":1000},"daily_attempts":{"default":500,"type":"integer","minimum":1,"maximum":1000},"max_attempts":{"default":8,"type":"integer","minimum":1,"maximum":8},"retention_days":{"default":30,"type":"integer","minimum":7,"maximum":90}},"additionalProperties":false},"report_brand":{"default":{},"type":"object","properties":{"name":{"default":"MapsScraper.dev","type":"string","minLength":1,"maxLength":80},"accent":{"default":"#49613b","type":"string","pattern":"^#[a-fA-F0-9]{6}$"},"website":{"default":"","type":"string","maxLength":300},"logo":{"default":"","type":"string","maxLength":120000},"footer":{"default":"Prepared from observed research samples. See methodology and source coverage.","type":"string","maxLength":500}},"additionalProperties":false},"review_ai":{"default":{},"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"daily_limit":{"default":5,"type":"integer","minimum":1,"maximum":20},"max_pending":{"default":2,"type":"integer","minimum":1,"maximum":5},"max_reviews":{"default":30,"type":"integer","minimum":2,"maximum":40},"queue_retention_hours":{"default":1,"type":"integer","minimum":1,"maximum":24}},"additionalProperties":false},"photo_audit":{"default":{},"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"daily_limit":{"default":10,"type":"integer","minimum":1,"maximum":100},"max_assets":{"default":25,"type":"integer","minimum":1,"maximum":100},"retention_hours":{"default":24,"type":"integer","minimum":1,"maximum":168}},"additionalProperties":false},"provider_search":{"default":{},"type":"object","properties":{"area_enabled":{"default":true,"type":"boolean"},"polygon_enabled":{"default":true,"type":"boolean"},"max_polygon_positions":{"default":128,"type":"integer","minimum":4,"maximum":256},"max_polygon_cells":{"default":25,"type":"integer","minimum":1,"maximum":50},"max_polygon_span_degrees":{"default":5,"type":"number","minimum":0.001,"maximum":30},"max_radius_m":{"default":50000,"type":"integer","minimum":1,"maximum":50000},"max_box_span_degrees":{"default":5,"type":"number","minimum":0.001,"maximum":180},"continuation_enabled":{"default":true,"type":"boolean"},"max_pages":{"default":20,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"result_map":{"default":{},"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"max_tiles":{"default":16,"type":"integer","minimum":1,"maximum":16},"max_zoom":{"default":19,"type":"integer","minimum":0,"maximum":19},"language":{"default":"en","type":"string","enum":["en","fr","es"]},"retention_hours":{"default":24,"type":"integer","minimum":1,"maximum":168}},"additionalProperties":false},"search_visibility":{"default":{},"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"max_targets":{"default":5,"type":"integer","minimum":1,"maximum":5},"daily_checks":{"default":20,"type":"integer","minimum":1,"maximum":100},"retention_days":{"default":30,"type":"integer","minimum":1,"maximum":90}},"additionalProperties":false},"chain_export":{"default":{},"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"daily_requests":{"default":5,"type":"integer","minimum":1,"maximum":20},"max_pending":{"default":2,"type":"integer","minimum":1,"maximum":5},"max_pages":{"default":100,"type":"integer","minimum":1,"maximum":100},"max_source_bytes":{"default":50000000,"type":"integer","minimum":1000000,"maximum":100000000},"retention_days":{"default":7,"type":"integer","minimum":1,"maximum":30}},"additionalProperties":false},"report_pdf":{"default":{},"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"daily_limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"max_pending":{"default":3,"type":"integer","minimum":1,"maximum":10},"retention_days":{"default":7,"type":"integer","minimum":1,"maximum":30}},"additionalProperties":false},"batch_merge":{"default":{},"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"max_records":{"default":25,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false},"sharing":{"default":{"enabled":true,"max_active":25,"max_hours":168,"require_password":false},"type":"object","properties":{"enabled":{"type":"boolean"},"max_active":{"type":"integer","minimum":1,"maximum":100},"max_hours":{"type":"integer","minimum":1,"maximum":720},"require_password":{"default":false,"type":"boolean","description":"Blocks new unprotected publication and all existing unprotected recipient links while enabled."}},"required":["enabled","max_active","max_hours"],"additionalProperties":false},"governance":{"default":{"export_retention_days":7,"invitation_hours":168,"deletion_grace_days":7},"type":"object","properties":{"export_retention_days":{"type":"integer","minimum":1,"maximum":30},"invitation_hours":{"type":"integer","minimum":1,"maximum":168},"deletion_grace_days":{"type":"integer","minimum":7,"maximum":30}},"required":["export_retention_days","invitation_hours","deletion_grace_days"],"additionalProperties":false},"modules":{"type":"object","properties":{"bulk":{"type":"boolean"},"grid":{"type":"boolean"},"imports":{"type":"boolean"},"reports":{"type":"boolean"},"monitors":{"type":"boolean"},"websites":{"default":true,"type":"boolean"},"photo-audits":{"default":true,"type":"boolean"},"agents":{"default":true,"type":"boolean"}},"required":["bulk","grid","imports","reports","monitors"],"additionalProperties":false},"stages":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,29}$"},"label":{"type":"string","minLength":1,"maxLength":40}},"required":["id","label"],"additionalProperties":false}},"fields":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":60},"type":{"type":"string","enum":["text","number","boolean","date"]},"required":{"default":false,"type":"boolean"}},"required":["key","label","type"],"additionalProperties":false}},"notifications":{"type":"object","properties":{"jobs":{"type":"boolean"},"monitors":{"type":"boolean"}},"required":["jobs","monitors"],"additionalProperties":false}},"required":["name","defaults","limits","retention_days","modules","stages","fields","notifications"],"additionalProperties":false,"description":"Workspace configuration derived from runtime validation. Cross-field constraints (default records <= max records and unique stage/field IDs), normalized strings and custom URL/image checks remain enforced by the server."},"ConfigInputEnvelope":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/ConfigInput"},"version":{"type":"integer","minimum":0}},"required":["config","version"],"additionalProperties":false},"ConfigReadEnvelope":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/Config"},"version":{"type":"integer","minimum":0},"modules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"group":{"type":"string"},"description":{"type":"string"}},"required":["id","title","group","description"],"additionalProperties":false}}},"required":["config","version","modules"],"additionalProperties":false},"LocationAccessGrant":{"type":"object","properties":{"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permission":{"type":"string","enum":["read","write"]}},"required":["location_id","permission"],"additionalProperties":false},"LocationAccessUpdate":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"maximum":2147483646},"mode":{"type":"string","enum":["workspace","selected"]},"grants":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permission":{"type":"string","enum":["read","write"]}},"required":["location_id","permission"],"additionalProperties":false}}},"required":["expected_version","mode","grants"],"additionalProperties":false,"description":"Complete policy replacement using the exact observed version (0 for an unset policy). Workspace mode requires empty grants; duplicate branch IDs are rejected by runtime and database validation. Grants never promote outer workspace/key scopes. Maximum 600000 UTF-8 request bytes."},"LocationAccessPolicy":{"type":"object","properties":{"principal_id":{"type":"string"},"mode":{"enum":["workspace","selected"]},"grants":{"type":"array","items":{"$ref":"#/components/schemas/LocationAccessGrant"},"maxItems":5000},"version":{"type":"integer","minimum":0,"maximum":2147483647},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["principal_id","mode","grants","version","actor_id","created_at","updated_at"],"additionalProperties":false},"LocationAccessEnvelope":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/LocationAccessPolicy"},"administrator":{"type":"boolean"}},"required":["policy","administrator"],"additionalProperties":false},"LocationAccessEvent":{"type":"object","properties":{"id":{"type":"integer"},"principal_id":{"type":"string"},"mode":{"enum":["workspace","selected"]},"grants":{"type":"array","items":{"$ref":"#/components/schemas/LocationAccessGrant"},"maxItems":5000},"version":{"type":"integer","minimum":1,"maximum":2147483647},"actor_id":{"type":"string"},"created_at":{"type":"string"}},"required":["id","principal_id","mode","grants","version","actor_id","created_at"],"additionalProperties":false},"LocationAssignee":{"type":"object","properties":{"user_id":{"type":"string"},"name":{"type":"string"},"role":{"enum":["owner","admin","editor"]}},"required":["user_id","name","role"],"additionalProperties":false},"LocationAccessOverview":{"type":"object","properties":{"mode":{"type":"string","enum":["workspace","selected"]},"policy_version":{"type":"integer","minimum":0,"maximum":9007199254740991},"can_create":{"type":"boolean"}},"required":["mode","policy_version","can_create"],"additionalProperties":false},"EffectiveLocationAccess":{"type":"object","properties":{"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"can_read":{"type":"boolean","const":true},"can_write":{"type":"boolean"},"can_approve":{"type":"boolean"}},"required":["location_id","can_read","can_write","can_approve"],"additionalProperties":false},"AccountExport":{"type":"object","properties":{"schema":{"const":"localos.account.v1"},"exported_at":{"type":"string","format":"date-time"},"profile":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"integer","enum":[0,1]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"}},"required":["id","name","email","emailVerified","image","createdAt","updatedAt"],"additionalProperties":false},"memberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"enum":["owner","admin","editor","viewer"]},"owner_id":{"type":"string"}},"required":["id","name","role","owner_id"],"additionalProperties":false}},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"integer"},"updatedAt":{"type":"integer"},"expiresAt":{"type":"integer"},"ipAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","createdAt","updatedAt","expiresAt","ipAddress","userAgent"],"additionalProperties":false}},"workspace_data":{"type":"string"},"report_layout_acceptances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"share_id":{"type":"string"},"paper":{"enum":["a4","letter"]},"orientation":{"enum":["portrait","landscape"]},"redistribution":{"const":0},"delivery":{"const":"not_sent"},"created_ms":{"type":"integer"}},"required":["id","workspace_id","share_id","paper","orientation","redistribution","delivery","created_ms"],"additionalProperties":false}}},"required":["schema","exported_at","profile","memberships","sessions","report_layout_acceptances","workspace_data"],"additionalProperties":false,"description":"Account-owned metadata only. Timestamps inside profile and session rows are stored epoch milliseconds; exported_at is an ISO timestamp. Session tokens, passwords and password hashes, agent-connection OAuth tokens and API keys are never included. Workspace records require a separate owner-authorized workspace export."},"PortalAdminRecord":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"status":{"enum":["active","revoked","expired"],"description":"expired is derived for an active portal past expires_at; stored state stays active, and revoke is still accepted."},"version":{"type":"integer","minimum":1},"actor_id":{"type":"string"},"expires_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"recipients":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":100},"resources":{"type":"array","items":{"type":"object","properties":{"share_id":{"type":"string","format":"uuid"},"snapshot_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["share_id","snapshot_hash"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["id","title","brand","status","version","actor_id","expires_at","created_at","updated_at","recipients","resources"],"additionalProperties":false},"PortalAdminEvent":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"status":{"enum":["active","revoked","expired"],"description":"expired is derived for an active portal past expires_at; stored state stays active, and revoke is still accepted."},"version":{"type":"integer","minimum":1},"actor_id":{"type":"string"},"expires_at":{"type":"string"},"created_at":{"type":"string"},"portal_id":{"type":"string"},"recipients":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":100},"resources":{"type":"array","items":{"type":"object","properties":{"share_id":{"type":"string","format":"uuid"},"snapshot_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["share_id","snapshot_hash"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["id","title","brand","status","version","actor_id","expires_at","created_at","portal_id","recipients","resources"],"additionalProperties":false},"ChainExportReplay":{"type":"object","properties":{"id":{"type":"string"},"created_by":{"type":"string"},"through_job_id":{"type":"string"},"root_id":{"type":"string"},"kind":{"type":"string"},"deduplication":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled","expired"]},"page_count":{"type":"integer"},"part_count":{"type":"integer"},"input_count":{"type":"integer"},"record_count":{"type":"integer"},"duplicate_count":{"type":"integer"},"conflict_count":{"type":"integer"},"unidentified_count":{"type":"integer"},"bytes":{"type":"integer"},"failures":{"type":"integer"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"available":{"type":"boolean"},"replayed":{"type":"boolean"}},"required":["id","created_by","through_job_id","root_id","kind","deduplication","status","page_count","part_count","input_count","record_count","duplicate_count","conflict_count","unidentified_count","bytes","failures","created_at","expires_at","error","available","replayed"],"additionalProperties":false},"ChainExportDetail":{"type":"object","properties":{"id":{"type":"string"},"created_by":{"type":"string"},"through_job_id":{"type":"string"},"root_id":{"type":"string"},"kind":{"type":"string"},"deduplication":{"type":"string"},"status":{"enum":["queued","running","completed","failed","cancelled","expired"]},"page_count":{"type":"integer"},"part_count":{"type":"integer"},"input_count":{"type":"integer"},"record_count":{"type":"integer"},"duplicate_count":{"type":"integer"},"conflict_count":{"type":"integer"},"unidentified_count":{"type":"integer"},"bytes":{"type":"integer"},"failures":{"type":"integer"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"available":{"type":"boolean"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ChainExportPart"}},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"page_number":{"type":"integer"},"result_count":{"type":"integer"}},"required":["id","page_number","result_count"],"additionalProperties":false}},"methodology":{"type":"string"}},"required":["id","created_by","through_job_id","root_id","kind","deduplication","status","page_count","part_count","input_count","record_count","duplicate_count","conflict_count","unidentified_count","bytes","failures","created_at","expires_at","error","available","parts","pages","methodology"],"additionalProperties":false},"ReportPdfReplay":{"type":"object","properties":{"id":{"type":"string"},"created_by":{"type":"string"},"report_id":{"type":"string"},"report_version":{"type":"integer"},"title":{"type":"string"},"snapshot_hash":{"type":"string"},"options_json":{"type":"string","description":"Serialized ReportPdfOptions."},"status":{"enum":["queued","rendering","completed","failed","uncertain","cancelled","expired"]},"expires_at":{"type":"string"},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayed":{"type":"boolean"}},"required":["id","created_by","report_id","report_version","title","snapshot_hash","options_json","status","expires_at","created_at","started_at","finished_at","error","bytes","sha256","replayed"],"additionalProperties":false},"ReviewAiReplay":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_by":{"type":"string"},"report_id":{"type":"string","format":"uuid"},"report_version":{"type":"integer"},"result_report_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"title":{"type":"string"},"preview_hash":{"type":"string"},"model":{"type":"string"},"prompt_version":{"type":"string"},"sampled_reviews":{"type":"integer"},"status":{"enum":["queued","running","completed","failed","uncertain","cancelled","expired"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"}},"required":["prompt_tokens","completion_tokens"],"additionalProperties":false},{"type":"null"}]},"replayed":{"type":"boolean"}},"required":["id","created_by","report_id","report_version","result_report_id","title","preview_hash","model","prompt_version","sampled_reviews","status","created_at","expires_at","started_at","finished_at","error","usage","replayed"],"additionalProperties":false},"ReviewAiPreview":{"type":"object","properties":{"report_id":{"type":"string","format":"uuid"},"report_version":{"type":"integer"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"model":{"const":"review-analysis-v1"},"prompt_version":{"const":"review-themes.v3"},"reviews":{"type":"array","minItems":2,"maxItems":40,"items":{"type":"object","properties":{"ref":{"type":"string","pattern":"^r([1-9]|[1-3][0-9]|40)$"},"excerpt":{"type":"string","minLength":8,"maxLength":300},"rating":{"anyOf":[{"type":"number","minimum":0,"maximum":5},{"type":"null"}]},"id":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}]},"job_id":{"type":"string","format":"uuid"}},"required":["ref","excerpt","rating","id","job_id"],"additionalProperties":false}},"sampled_reviews":{"type":"integer","minimum":2,"maximum":40},"eligible_reviews":{"type":"integer","minimum":2,"maximum":100},"config":{"$ref":"#/components/schemas/ReviewAiConfig"},"coverage_note":{"type":"string"},"budget":{"type":"object","properties":{"attempts":{"const":1},"max_output_tokens":{"const":2500},"unit":{"const":"generation attempt"},"note":{"type":"string"}},"required":["attempts","max_output_tokens","unit","note"],"additionalProperties":false}},"required":["report_id","report_version","preview_hash","model","prompt_version","reviews","sampled_reviews","eligible_reviews","config","coverage_note","budget"],"additionalProperties":false},"VisibilitySeriesItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_by":{"type":"string"},"plan":{"$ref":"#/components/schemas/VisibilitySeriesPlan"},"status":{"enum":["active","paused","cancelled","exhausted"]},"revision":{"type":"integer"},"next_cycle":{"type":"integer"},"cycles":{"type":"integer"},"interval_hours":{"type":"integer"},"maximum_units":{"type":"integer"},"next_run":{"type":"string"},"expires_at":{"type":"string"},"pause_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","name","created_by","plan","status","revision","next_cycle","cycles","interval_hours","maximum_units","next_run","expires_at","pause_reason","created_at"],"additionalProperties":false},"VisibilitySeriesPreview":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/VisibilitySeriesPlan"},"units_per_cycle":{"type":"integer"},"maximum_units":{"type":"integer"},"remaining_cycles":{"type":"integer"},"settings_version":{"type":"integer"},"preview_hash":{"type":"string"},"ready":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"series_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}]},"methodology":{"type":"string"}},"required":["plan","units_per_cycle","maximum_units","remaining_cycles","settings_version","preview_hash","ready","reasons","series_id","revision","methodology"],"additionalProperties":false},"VisibilitySeriesObservation":{"type":"object","properties":{"cursor":{"type":"integer"},"id":{"type":"string"},"cycle":{"type":"integer"},"prompt_index":{"type":"integer"},"admission_status":{"enum":["pending","accepted","blocked"]},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"job_status":{"anyOf":[{"enum":["queued","running","completed","partial","failed","cancelled","uncertain"]},{"type":"null"}]},"charged":{"anyOf":[{"type":"integer"},{"type":"null"}]},"result_expired":{"anyOf":[{"type":"integer"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cursor","id","cycle","prompt_index","admission_status","job_id","error","created_at","job_status","charged","result_expired","expires_at"],"additionalProperties":false},"JobPageItem":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"$ref":"#/components/schemas/JobStatus"},"reserved":{"type":"integer"},"charged":{"type":"integer"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"request_json":{"type":"string"},"result_count":{"type":"integer"},"result_bytes":{"type":"integer"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"result_expired":{"type":"integer"},"cursor":{"type":"string"},"error_code":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},{"type":"null"}]}},"required":["id","kind","status","reserved","charged","error","error_code","created_at","request_json","result_count","result_bytes","expires_at","result_expired","cursor"],"additionalProperties":false},"BatchPageItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"reserved":{"type":"integer"},"created_at":{"type":"string"},"total":{"type":"integer"},"completed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"stopped":{"anyOf":[{"type":"integer"},{"type":"null"}]},"pending":{"anyOf":[{"type":"integer"},{"type":"null"}]},"charged":{"type":"integer"},"cursor":{"type":"string"}},"required":["id","name","kind","reserved","created_at","total","completed","stopped","pending","charged","cursor"],"additionalProperties":false},"BatchPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BatchPageItem"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false},"SavedListPageItem":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"count":{"type":"integer"},"cursor":{"type":"string"}},"required":["id","workspace_id","name","created_at","count","cursor"],"additionalProperties":false},"SavedListPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SavedListPageItem"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false},"ImportPageItem":{"type":"object","properties":{"id":{"type":"string"},"list_id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"cursor":{"type":"string"},"receipt":{"type":"object","description":"Parsed row receipt of this chunk (accepted, rejected, inserted, already_in_list and row outcomes). Empty for a receipt that could not be read."},"group":{"type":"string","description":"Import session: the idempotency key without its trailing :<chunk> number. Chunks of one file share it."},"chunk":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["id","list_id","name","created_at","receipt","group","chunk","cursor"],"additionalProperties":false},"ReportPageItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["comparison","reviews","grid","websites","photos"]},"source_json":{"type":"string"},"created_at":{"type":"string"},"cursor":{"type":"string"}},"required":["id","name","kind","source_json","created_at","cursor"],"additionalProperties":false},"SavedViewPageItem":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"task_json":{"type":"string"},"created_at":{"type":"string"},"cursor":{"type":"string"}},"required":["id","workspace_id","name","task_json","created_at","cursor"],"additionalProperties":false},"MonitorPageItem":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"request_json":{"type":"string"},"interval_hours":{"type":"integer"},"budget":{"type":"integer"},"active":{"type":"integer"},"next_run":{"type":"string"},"created_at":{"type":"string"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursor":{"type":"string"}},"required":["id","workspace_id","name","request_json","interval_hours","budget","active","next_run","created_at","last_error","cursor"],"additionalProperties":false},"MonitorRunPageItem":{"type":"object","properties":{"monitor_id":{"type":"string"},"job_id":{"type":"string"},"delta_json":{"anyOf":[{"type":"string"},{"type":"null"}]},"compared_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/JobStatus"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"result_count":{"type":"integer"},"cursor":{"type":"string"}},"required":["monitor_id","job_id","delta_json","compared_at","status","error","created_at","result_count","cursor"],"additionalProperties":false},"NotificationPageItem":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"kind":{"type":"string","description":"Specific notice kind such as job.completed, job.failed, batch.finished, monitor.changes, monitor.blocked, series.paused, webhook.endpoint_disabled, webhook.delivery_exhausted, review_ai.failed, operation.submitted or export.ready. Treat unknown kinds as generic notices."},"title":{"type":"string"},"body":{"type":"string"},"href":{"type":"string","description":"In-app deep link path for the notice."},"dedupe_key":{"type":"string"},"read_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"cursor":{"type":"string"},"params":{"type":"object","description":"Stable identifiers and counts for the kind (for example job_id, task_kind, result_count, monitor_id, monitor_name, code). Values are data, never markup. May be empty."}},"required":["id","workspace_id","kind","title","body","href","dedupe_key","read_at","created_at","params","cursor"],"additionalProperties":false},"RetainedJobResult":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BusinessRecord"}},"count":{"type":"integer"},"offset":{"type":"integer"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}]},"provider":{"enum":["live_maps","map_tiles","ai_overview","public_http","ai_image_analysis","user_import"],"description":"Neutral data source label: live_maps, map_tiles, ai_overview, public_http, ai_image_analysis or user_import."},"coverage":{"type":"string","minLength":1,"description":"Task-specific coverage; does not establish complete source or listing coverage."},"fetched_at":{"type":"string"},"next_cursor":{"type":"null","description":"Always null on retained results; use next_offset. A continuation page is a new task."},"requested_area":{"anyOf":[{"$ref":"#/components/schemas/SearchArea"},{"type":"null"}]},"received_count":{"type":"integer"},"outside_area":{"type":"integer"},"unlocated":{"type":"integer"},"continuation_stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"type":"string"},"requested_tiles":{"type":"integer"},"attempted_tiles":{"type":"integer"},"completed_tiles":{"type":"integer"},"charged_units":{"type":"integer"},"partial":{"type":"boolean"},"attribution":{"type":"string"},"model":{"const":"image-analysis-v1"},"prompt_version":{"type":"string"},"_expires_at":{"type":"string"}},"required":["items","count","provider","coverage","fetched_at"]},"MonitorAdmission":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"replayed":{"type":"boolean"},"status":{"type":"string","enum":["active","paused","unavailable"]}},"required":["id","replayed","status"],"additionalProperties":false},"QualificationReceipt":{"type":"object","properties":{"updated":{"type":"boolean","const":true}},"required":["updated"],"additionalProperties":false},"JobReplay":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/JobStatus"},"reserved":{"type":"integer","minimum":0},"replayed":{"const":true}},"required":["id","status","reserved","replayed"],"additionalProperties":false,"description":"The first admission's fields with the task's current status. Nothing new is reserved or dispatched."},"ResearchRefusal":{"type":"string","enum":["PROVIDER_NOT_CONFIGURED","RESEARCH_DAILY_LIMIT_REACHED"]}}},"paths":{"/health":{"get":{"operationId":"get__health","summary":"Inspect service configuration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"service":{"const":"localos-gateway"},"auth_configured":{"type":"boolean"},"api":{"type":"object","properties":{"service":{"const":"localos-rust-api"},"status":{"const":"ok"},"provider_configured":{"type":"boolean"},"map_tiles_configured":{"type":"boolean"},"search_visibility_configured":{"type":"boolean"},"photo_audit_configured":{"type":"boolean"},"provider_dispatch_enabled":{"type":"boolean"}},"required":["service","status","provider_configured","provider_dispatch_enabled","map_tiles_configured","search_visibility_configured","photo_audit_configured"],"additionalProperties":false}},"required":["service","auth_configured","api"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/openapi.json":{"get":{"operationId":"get__openapi_json","summary":"Download this contract","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/me":{"get":{"operationId":"get__me","summary":"Read current membership and accessible workspaces","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string"},"workspace":{"type":"string"},"role":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"key":{"type":"boolean"},"workspaces":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"owner_id":{"type":"string"},"created_at":{"type":"string"},"lifecycle":{"enum":["active","deletion_pending","purging"]},"role":{"enum":["owner","admin","editor","viewer"]},"name_seeded":{"type":"boolean","description":"true while the workspace still has its generated default name."}},"required":["id","name","owner_id","created_at","lifecycle","role","name_seeded"]}},"operator":{"type":"boolean"}},"required":["user","workspace","role","scopes","key","operator","workspaces"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/config":{"get":{"operationId":"get__config","summary":"Read workspace configuration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigReadEnvelope"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"put__config","summary":"Save versioned workspace configuration (session admin)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigEnvelope"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigInputEnvelope"}}}},"security":[{"sessionCookie":[]}]}},"/capabilities":{"get":{"operationId":"get__capabilities","summary":"Read enabled modules and integration readiness","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"modules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"group":{"type":"string"},"description":{"type":"string"}},"required":["id","title","group","description"],"additionalProperties":false}},"enabled":{"type":"object","properties":{"bulk":{"type":"boolean"},"grid":{"type":"boolean"},"imports":{"type":"boolean"},"reports":{"type":"boolean"},"monitors":{"type":"boolean"},"websites":{"type":"boolean"},"photo-audits":{"type":"boolean"},"agents":{"type":"boolean"}},"required":["bulk","grid","imports","reports","monitors","websites","agents","photo-audits"],"additionalProperties":false},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable integration identifier. Render localized names and details from id, state and params; name and detail stay English for API clients."},"name":{"type":"string"},"configured":{"type":"boolean"},"detail":{"type":"string"},"state":{"enum":["configured","not_configured"]},"params":{"type":"object","properties":{"mode":{"enum":["test","live","closed","daily_limit"]}},"required":[],"additionalProperties":false,"description":"Empty except two cases. Configured billing reports its payment mode (test or live). Unavailable live_maps says why: closed (research is not open to this workspace) or daily_limit (today's total is used up until the next UTC day)."}},"required":["id","name","configured","detail","state","params"],"additionalProperties":false}},"version":{"const":"0.2.0"}},"required":["modules","enabled","integrations","version"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/overview":{"get":{"operationId":"get__overview","summary":"Read activity aggregates","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"jobs":{"type":"object","properties":{"total":{"type":"integer"},"active":{"anyOf":[{"type":"integer"},{"type":"null"}]},"completed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"records":{"type":"integer"}},"required":["total","active","completed","records"],"additionalProperties":false},"lists":{"type":"object","properties":{"total":{"type":"integer"}},"required":["total"],"additionalProperties":false},"reports":{"type":"object","properties":{"total":{"type":"integer"}},"required":["total"],"additionalProperties":false},"monitors":{"type":"object","properties":{"total":{"type":"integer"}},"required":["total"],"additionalProperties":false},"activity":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"jobs":{"type":"integer"},"units":{"type":"integer"}},"required":["day","jobs","units"],"additionalProperties":false}}},"required":["jobs","lists","reports","monitors","activity"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces":{"post":{"operationId":"post__workspaces","summary":"Create a workspace with zero initial units (session)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/v1/usage":{"get":{"operationId":"get__v1_usage","summary":"Read available units and reservations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/estimate":{"post":{"operationId":"post__v1_estimate","summary":"Estimate without dispatching or reserving","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estimate"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"description":"Read scope is sufficient, including read-only API keys. Nothing is stored, reserved or dispatched. 400 INVALID_TASK when the body is not a task, or the same field refusals as job creation (INVALID_QUERY, INVALID_LIMIT, INVALID_BUSINESS_ID, INVALID_LOCALE, INVALID_MIN_RATING, INVALID_COORDINATES, INVALID_WEBSITE_FILTER, INVALID_WEBSITE_AUDIT_OPTIONS, URL_ONLY_FOR_WEBSITE_AUDIT, UNSUPPORTED_TASK_KIND).","x-read-only":true}},"/v1/jobs":{"get":{"operationId":"get__v1_jobs","summary":"List jobs in cursor pages","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPage"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"kind","in":"query","schema":{"type":"string"},"description":"Return only tasks of this kind. An unknown kind returns no rows."}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__v1_jobs","summary":"Create an idempotent bounded research task","responses":{"200":{"description":"Identical retry of an earlier admission (same key and body). Nothing new is reserved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobReplay"}}},"headers":{"Idempotent-Replayed":{"description":"true when this response repeats an earlier admission.","schema":{"const":"true"}}}},"202":{"description":"Reserved and queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedJob"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Today's live research total is used up (RESEARCH_DAILY_LIMIT_REACHED). Nothing is reserved; Retry-After is the seconds until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}},{"name":"X-Max-Units","in":"header","required":true,"schema":{"type":"integer","minimum":1,"maximum":10000}}],"description":"Write scope, a stable Idempotency-Key and an explicit X-Max-Units budget are required. The first admission returns 202; an identical retry returns 200 with the first response's fields and the current status. A changed body with the same key returns 409 IDEMPOTENCY_CONFLICT. Refusals before admission charge nothing: 400 TASK_BUDGET_REQUIRED (X-Max-Units missing or not a whole number from 1 to 10000), 400 INVALID_JSON, VALIDATION_ERROR (the task does not match the schema; error.details lists the issues) or a field refusal (INVALID_QUERY, INVALID_LIMIT, INVALID_BUSINESS_ID, INVALID_LOCALE, INVALID_MIN_RATING, INVALID_COORDINATES, INVALID_WEBSITE_FILTER, INVALID_WEBSITE_AUDIT_OPTIONS, URL_ONLY_FOR_WEBSITE_AUDIT, UNSUPPORTED_TASK_KIND), 403 MODULE_DISABLED (the workspace switched this module off), 422 a workspace setting or limit (WORKSPACE_RECORD_LIMIT, SEARCH_VISIBILITY_DISABLED, RESULT_MAP_DISABLED, AREA_SEARCH_DISABLED, POLYGON_SEARCH_DISABLED, PHOTO_AUDIT_DISABLED or a WORKSPACE_*_LIMIT for the area, map or visibility targets), 422 TASK_BUDGET_TOO_LOW {needed, max_units}, INSUFFICIENT_BALANCE {needed, available}, DAILY_BUDGET_EXCEEDED {needed, daily_limit, used_today}, PENDING_LIMIT_REACHED {pending, max_pending} or BILLING_RECONCILIATION_REQUIRED, 423 WORKSPACE_DELETION_PENDING (read-only grace; 409 WORKSPACE_NOT_ACTIVE or WORKSPACE_DELETION_PENDING only if deletion starts during admission), 410 WORKSPACE_UNAVAILABLE, 429 RESEARCH_DAILY_LIMIT_REACHED (the platform's live research total for the UTC day is used up; Retry-After is the seconds until the next UTC day), 503 PROVIDER_NOT_CONFIGURED (live research is not open to this workspace, or the task's data source is not configured). The numbers are in error.details."}},"/v1/jobs/{job_id}":{"get":{"operationId":"get__v1_jobs_job_id","summary":"Read a task receipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/jobs/{job_id}/results":{"get":{"operationId":"get__v1_jobs_job_id_results","summary":"Read a retained result page","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResult"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}]}},"/v1/jobs/{job_id}/cancel":{"post":{"operationId":"post__v1_jobs_job_id_cancel","summary":"Cancel a queued task","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"cancelled"}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Cancels a queued task and releases its reservation. Repeating the cancel returns the same result. A dispatched or finished task returns 409 JOB_NOT_CANCELLABLE with its current status in error.details.status."}},"/v1/jobs/{job_id}/export":{"get":{"operationId":"get__v1_jobs_job_id_export","summary":"Download full retained results","responses":{"200":{"description":"Workspace-authorized file; never publicly cached","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}},"application/json":{"schema":{"$ref":"#/components/schemas/RetainedJobResult"}}},"headers":{"Content-Disposition":{"description":"attachment; filename=\"mapsscraper-results.{csv,xlsx,json,jsonl}\" for the requested format.","schema":{"type":"string"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"XLSX_TOO_LARGE_USE_JSONL: the result is too large for a workbook; download jsonl instead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","schema":{"enum":["csv","json","jsonl","xlsx"],"default":"csv"}},{"name":"fields","in":"query","description":"Comma-separated columns to keep, in this order. Each must be a documented record field of the task kind (search, rank, details and enrichment use business fields; reviews and photos their own). Records keep only these keys, so fetch metadata such as _source is left out. Omit for every field. An unknown, repeated or empty name, or the parameter given twice, returns 400 EXPORT_FIELDS_INVALID; a task kind without documented record fields returns 400 EXPORT_FIELDS_UNSUPPORTED.","schema":{"type":"string","pattern":"^[a-z_]+(,[a-z_]+)*$","maxLength":2000}}],"description":"Downloads the full retained result. CSV is UTF-8 with a byte-order mark; every cell is quoted and text that could start a formula is prefixed with an apostrophe. Refusals: 400 UNSUPPORTED_EXPORT_FORMAT, EXPORT_FIELDS_INVALID or EXPORT_FIELDS_UNSUPPORTED (checked first), 409 JOB_NOT_READY, 410 RESULT_EXPIRED, 403 MAP_IMAGE_EXPORT_DISABLED (map tile images are viewed in the workspace, never exported) and 413 XLSX_TOO_LARGE_USE_JSONL (a result too large for a workbook; download jsonl instead)."}},"/v1/batches":{"get":{"operationId":"get__v1_batches","summary":"List aggregate batch receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BatchPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"kind","in":"query","schema":{"enum":["bulk","grid"]},"description":"Return only bulk or grid batches. Any other value returns 400 INVALID_KIND_FILTER."},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__v1_batches","summary":"Atomically reserve and create child tasks","responses":{"200":{"description":"Identical retry of an earlier batch admission. Nothing new is reserved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchReceipt"}}},"headers":{"Idempotent-Replayed":{"description":"true when this response repeats an earlier admission.","schema":{"const":"true"}}}},"202":{"description":"All children reserved and queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchReceipt"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Today's live research total is used up (RESEARCH_DAILY_LIMIT_REACHED). Nothing is reserved; Retry-After is the seconds until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}},{"name":"X-Max-Units","in":"header","required":true,"schema":{"type":"integer","minimum":1,"maximum":10000}}],"description":"Write scope, a stable Idempotency-Key and an explicit aggregate X-Max-Units budget are required. All children are reserved together or none are. An identical retry returns 200 with replayed true before any settings check. Refusals before admission charge nothing: 400 TASK_BUDGET_REQUIRED (X-Max-Units missing or not a whole number from 1 to 10000), 400 INVALID_JSON, VALIDATION_ERROR (the task does not match the schema; error.details lists the issues) or a field refusal (INVALID_QUERY, INVALID_LIMIT, INVALID_BUSINESS_ID, INVALID_LOCALE, INVALID_MIN_RATING, INVALID_COORDINATES, INVALID_WEBSITE_FILTER, INVALID_WEBSITE_AUDIT_OPTIONS, URL_ONLY_FOR_WEBSITE_AUDIT, UNSUPPORTED_TASK_KIND), 403 MODULE_DISABLED (the workspace switched this module off), 422 a workspace setting or limit (WORKSPACE_RECORD_LIMIT, SEARCH_VISIBILITY_DISABLED, RESULT_MAP_DISABLED, AREA_SEARCH_DISABLED, POLYGON_SEARCH_DISABLED, PHOTO_AUDIT_DISABLED or a WORKSPACE_*_LIMIT for the area, map or visibility targets), 422 TASK_BUDGET_TOO_LOW {needed, max_units}, INSUFFICIENT_BALANCE {needed, available}, DAILY_BUDGET_EXCEEDED {needed, daily_limit, used_today}, PENDING_LIMIT_REACHED {pending, max_pending} or BILLING_RECONCILIATION_REQUIRED, 423 WORKSPACE_DELETION_PENDING (read-only grace; 409 WORKSPACE_NOT_ACTIVE or WORKSPACE_DELETION_PENDING only if deletion starts during admission), 410 WORKSPACE_UNAVAILABLE, 429 RESEARCH_DAILY_LIMIT_REACHED (the platform's live research total for the UTC day is used up; Retry-After is the seconds until the next UTC day), 503 PROVIDER_NOT_CONFIGURED (live research is not open to this workspace, or the task's data source is not configured). The numbers are in error.details."}},"/v1/batches/{batch_id}":{"get":{"operationId":"get__v1_batches_batch_id","summary":"Inspect all child task receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDetail"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/batches/{batch_id}/cancel":{"post":{"operationId":"post__v1_batches_batch_id_cancel","summary":"Cancel only queued children","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"type":"integer","minimum":0},"running_unchanged":{"const":true}},"required":["cancelled","running_unchanged"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/lists":{"get":{"operationId":"get__v1_lists","summary":"List saved business lists","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SavedListPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__v1_lists","summary":"Create a list","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/List"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":true}}}}}},"/v1/lists/{list_id}":{"patch":{"operationId":"patch__v1_lists_list_id","summary":"Rename a list","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":true}}}}},"delete":{"operationId":"delete__v1_lists_list_id","summary":"Delete list records and import receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/lists/{list_id}/items":{"get":{"operationId":"get__v1_lists_list_id_items","summary":"Read saved records in cursor pages","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPage"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"stage","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__v1_lists_list_id_items","summary":"Save a business record; keep an existing saved copy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"const":true},"existing":{"type":"boolean"}},"required":["saved","existing"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRecord"}}}},"description":"Stores the original valid UTF-8 JSON text, including number lexemes and unknown source fields, within a 50,000-byte request-body limit including whitespace. The explicit business_id or place_id identifies the saved item. Workspace and actor come from authenticated service-binding context; record fields cannot grant authority. Saving an identity the list already holds keeps the stored copy, notes and qualification and returns existing:true; a first save returns existing:false. Already-rounded historical records cannot be reconstructed from a later export."}},"/v1/lists/{list_id}/items/{business_id}":{"patch":{"operationId":"patch__v1_lists_list_id_items_business_id","summary":"Update configured qualification fields against the original record snapshot","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualificationReceipt"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"business_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Qualification"}}}},"description":"Requires expected_record with the complete previously read list item, including its version. An atomic compare-and-set verifies every original field, current workspace ownership, the configuration version used for validation and assignee membership. A changed record/settings returns 409 QUALIFICATION_VERSION_CONFLICT without applying this write. Retain the draft and explicitly read/review the latest record; never automatically rebase or replay. Success remains {updated:true}; an unknown response requires read-only reconciliation. Older clients that omit expected_record are rejected. No paid live research."},"delete":{"operationId":"delete__v1_lists_list_id_items_business_id","summary":"Remove one saved record","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"business_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/imports":{"get":{"operationId":"get__v1_imports","summary":"List import receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ImportPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__v1_imports","summary":"Import at most 200 records atomically","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReceipt"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}]}},"/v1/reports":{"get":{"operationId":"get__v1_reports","summary":"List source-linked reports","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReportPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__v1_reports","summary":"Create a descriptive report from retained sources","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"report":{"type":"object","additionalProperties":false,"properties":{"methodology":{"type":"string"},"kind":{"enum":["comparison","reviews","grid","websites","photos"]},"records_analyzed":{"type":"integer","minimum":0},"rated_records":{"type":"integer","minimum":0},"average_rating":{"anyOf":[{"type":"number"},{"type":"null"}]},"rating_distribution":{"type":"array","items":{"type":"integer","minimum":0},"minItems":5,"maxItems":5},"website_not_provided":{"type":"integer","minimum":0},"terms":{"type":"array","maxItems":20,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"anyOf":[{"type":"string"},{"type":"integer","minimum":0}]}}},"entries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{},"rating":{"anyOf":[{"type":"number"},{"type":"null"}]},"review_count":{},"website":{},"address":{},"job_id":{"type":"string"}},"required":["id","name","rating","review_count","website","address","job_id"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}]},"excerpt":{"type":"string"},"job_id":{"type":"string"}},"required":["id","rating","excerpt","job_id"],"additionalProperties":false},{"type":"object","properties":{"lat":{"anyOf":[{"type":"number"},{"type":"null"}]},"lng":{"anyOf":[{"type":"number"},{"type":"null"}]},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}]},"sample_size":{"type":"integer"},"job_id":{"type":"string"},"status":{"enum":["completed","partial","failed","cancelled","uncertain","expired"],"description":"Point task status, or expired when a completed result is no longer retained."},"observed":{"type":"boolean","description":"false for a point that did not complete; its rank is null and sample_size 0, which is not rank zero."}},"required":["lat","lng","rank","sample_size","job_id"],"additionalProperties":false},{"type":"object","properties":{"photo_id":{"type":"string"},"source_kind":{"const":"AI interpretation of user-attested upload"},"width":{},"height":{},"category":{},"scene":{},"sharpness":{},"lighting":{},"obstruction":{},"observation":{},"suggestion":{},"asset_id":{},"image_sha256":{},"rights_basis":{},"job_id":{"type":"string"}},"required":["photo_id","source_kind","width","height","category","scene","sharpness","lighting","obstruction","observation","suggestion","asset_id","image_sha256","rights_basis","job_id"],"additionalProperties":false},{"type":"object","properties":{"photo_id":{"type":"string"},"source_kind":{"const":"Research metadata; pixels not inspected"},"photo_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"scene":{"const":"Pixels not inspected. Image links do not establish processing or redistribution rights."},"job_id":{"type":"string"}},"required":["photo_id","source_kind","photo_date","width","height","scene","job_id"],"additionalProperties":false},{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string"},"sample_complete":{"type":"boolean"},"business_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"type":"string"},"observed_at":{"type":"string"},"_source":{"type":"object","properties":{"provider":{"const":"public_http"},"fetched_at":{"type":"string"},"website_status":{"type":"string"},"scope":{"const":"one homepage and up to five redirects; no JavaScript"}},"required":["provider","fetched_at","website_status","scope"],"additionalProperties":false},"detail":{"type":"string"},"redirects":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"status":{"type":"integer"}},"required":["from","to","status"],"additionalProperties":false}},"final_url":{"type":"string"},"http_status":{"type":"integer"},"https":{"type":"boolean"},"headers_observed_ms":{"type":"number"},"content_type":{"type":"string"},"x_robots_tag":{"type":"string"},"hsts_present":{"type":"boolean"},"sample_bytes":{"type":"integer"},"html":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"title_count":{"type":"integer"},"description":{"type":"string"},"language":{"type":"string"},"canonical":{"type":"string"},"robots":{"type":"string"},"viewport":{"type":"boolean"},"h1_count":{"type":"integer"},"first_h1":{"type":"string"},"images":{"type":"integer"},"images_without_alt":{"type":"integer"},"links":{"type":"integer"},"json_ld_blocks":{"type":"integer"}},"required":["title","title_count","description","language","canonical","robots","viewport","h1_count","first_h1","images","images_without_alt","links","json_ld_blocks"],"additionalProperties":false},{"type":"null"}]},"analysis":{"type":"string"}},"required":["job_id","status","sample_complete","business_id","website","observed_at","_source"],"additionalProperties":false}]}},"sources":{"type":"array","items":{"type":"object","properties":{"job_id":{"type":"string"},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"fetched_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"anyOf":[{"enum":["live_maps","map_tiles","ai_overview","public_http","ai_image_analysis","user_import"],"description":"Neutral data source label: live_maps, map_tiles, ai_overview, public_http, ai_image_analysis or user_import."},{"type":"null"}]},"records":{"type":"integer","minimum":0}},"required":["job_id","query","fetched_at","provider","records"],"additionalProperties":false}},"entries_truncated":{"type":"boolean"},"metadata_records":{"type":"integer","minimum":0},"audited_images":{"type":"integer","minimum":0},"dated_records":{"type":"integer","minimum":0},"undated_records":{"type":"integer","minimum":0},"points_total":{"type":"integer","minimum":1},"points_observed":{"type":"integer","minimum":1},"points_missing":{"type":"integer","minimum":0}},"required":["methodology","kind","records_analyzed","rated_records","average_rating","rating_distribution","website_not_provided","terms","entries","sources","entries_truncated"]}},"required":["id","report"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportInput"}}}}}},"/v1/reports/{report_id}":{"get":{"operationId":"get__v1_reports_report_id","summary":"Read report evidence and methodology","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"delete__v1_reports_report_id","summary":"Delete a report without deleting source jobs","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Write scope. A member who is not an owner or admin cannot delete a report while another person's share of it is active: 409 REPORT_HAS_ACTIVE_SHARES with error.details.active_shares. Owners and admins may delete it."}},"/v1/saved-views":{"get":{"operationId":"get__v1_saved_views","summary":"List saved research presets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SavedViewPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__v1_saved_views","summary":"Save a research preset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"task":{"$ref":"#/components/schemas/Task"}},"required":["name","task"],"additionalProperties":true}}}}}},"/v1/saved-views/{view_id}":{"delete":{"operationId":"delete__v1_saved_views_view_id","summary":"Delete a preset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/monitors":{"get":{"operationId":"get__monitors","summary":"List recurring research monitors","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MonitorPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__monitors","summary":"Create a bounded recurring search","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorAdmission"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9:_.-]+$"}}],"description":"Stable idempotency key and explicit per-run budget in the body required. The immutable creation receipt and schedule commit atomically, without reserving or dispatching a task. Identical retries return the original ID; a changed intent conflicts. A deleted schedule is never recreated by replaying its original key. Use session-only admission recovery to inspect or retire an unused key. The first scheduled run follows one full interval and rechecks current authorization, limits, balance and research source readiness. 503 PROVIDER_NOT_CONFIGURED when the task's research source is not open to this workspace; a scheduled run refused the same way is blocked with that code instead of retried. A spent daily research total does not refuse a schedule; a run it refuses is blocked with RESEARCH_DAILY_LIMIT_REACHED and the next interval runs again."}},"/monitors/{monitor_id}":{"patch":{"operationId":"patch__monitors_monitor_id","summary":"Pause or resume a monitor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":true}}}}},"delete":{"operationId":"delete__monitors_monitor_id","summary":"Delete schedule and comparisons, retaining jobs","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string"}}]},"get":{"operationId":"get__monitors_monitor_id","summary":"Inspect a workspace monitor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/monitors/{monitor_id}/runs":{"get":{"operationId":"get__monitors_monitor_id_runs","summary":"Read run history and observed changes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MonitorRunPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."}},"/monitors/{monitor_id}/run":{"post":{"operationId":"post__monitors_monitor_id_run","summary":"Start a manually budgeted monitor run","responses":{"200":{"description":"Identical retry of an earlier admission (same key and body). Nothing new is reserved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobReplay"}}},"headers":{"Idempotent-Replayed":{"description":"true when this response repeats an earlier admission.","schema":{"const":"true"}}}},"202":{"description":"Reserved and queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedJob"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}},{"name":"X-Max-Units","in":"header","required":true,"schema":{"type":"integer","minimum":1,"maximum":10000}}]}},"/notifications":{"get":{"operationId":"get__notifications","summary":"Read shared workspace inbox","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NotificationPageItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."}},"/notifications/read":{"post":{"operationId":"post__notifications_read","summary":"Mark workspace inbox read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/notifications/{notification_id}":{"patch":{"operationId":"patch__notifications_notification_id","summary":"Mark one notification read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/audit":{"get":{"operationId":"get__audit","summary":"Read a cursor page of audit events","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"before","in":"query","schema":{"type":"integer"}}]}},"/keys":{"get":{"operationId":"get__keys","summary":"List workspace key metadata without stored credentials","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"enum":["read","read,write"]},"revoked":{"type":"integer"},"created_at":{"type":"string"},"last_used":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursor":{"type":"string"}},"required":["id","name","prefix","scopes","revoked","created_at","last_used","cursor"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__keys","summary":"Create a scoped API key; token is returned only on creation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"token":{"type":"string","pattern":"^lo_[a-f0-9]{64}$"},"name":{"type":"string"},"scopes":{"enum":["read","read,write"]}},"required":["id","token","name","scopes"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"enum":["read","read,write"]}},"required":["name","scopes"]}}}},"security":[{"sessionCookie":[]}],"description":"Owner/admin session required. Copy the newly created token once; only its hash is stored. List responses never expose stored credentials."}},"/keys/{key_id}":{"delete":{"operationId":"delete__keys_key_id","summary":"Revoke a workspace API key","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"revoked":{"const":true}},"required":["revoked"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}]}},"/team":{"get":{"operationId":"get__team","summary":"List current workspace members","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"role":{"enum":["owner","admin","editor","viewer"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursor":{"type":"string"}},"required":["user_id","role","name","email","cursor"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__team","summary":"Change an existing member role; use invitations for new members","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"updated":{"const":true}},"required":["updated"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"email":{"type":"string","format":"email"},"role":{"enum":["admin","editor","viewer"]}},"required":["email","role"]}}}},"security":[{"sessionCookie":[]}],"description":"Owner session required. Cannot change your own role or an owner; an existing workspace member is required."}},"/team/{user_id}":{"delete":{"operationId":"delete__team_user_id","summary":"Remove an existing non-owner member","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"removed":{"const":true}},"required":["removed"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Owner session required. Cannot remove yourself or an owner."}},"/team/transfer":{"post":{"operationId":"post__team_transfer","summary":"Transfer ownership to a verified member after password confirmation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"transferred":{"const":true}},"required":["transferred"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many failed password confirmations (REAUTHENTICATION_RATE_LIMITED): 5 per user or 20 per client address in 15 minutes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","minLength":1},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["user_id","password"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/feedback":{"post":{"operationId":"post__feedback","summary":"Save product feedback in the signed-in workspace. A foreign workspace id is rejected and no email is sent.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"const":true},"delivery":{"const":"not_sent"},"outbound":{"const":false}},"required":["saved","delivery","outbound"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":5,"maxLength":5000}},"required":["message"],"additionalProperties":true}}}},"description":"Any signed-in browser session, whatever its role. API keys and OAuth clients need write scope, otherwise 403 FEEDBACK_FORBIDDEN."}},"/auth-capabilities":{"get":{"operationId":"get__auth_capabilities","summary":"Inspect configured account email capability","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"boolean"},"verification_required":{"type":"boolean"}},"required":["email","verification_required"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/account/export":{"get":{"operationId":"get__account_export","summary":"Download own profile, memberships and non-secret session metadata","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExport"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}]}},"/account/deletion":{"get":{"operationId":"get__account_deletion","summary":"Read own pending deletion deadline","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","purging"]},"delete_after":{"type":"string"},"created_at":{"type":"string"},"workspaces_json":{"type":"string"}},"required":["status","delete_after","created_at","workspaces_json"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}]},"post":{"operationId":"post__account_deletion","summary":"Schedule deletion after password confirmation and ownership checks","responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"scheduled":{"const":true},"delete_after":{"type":"string"}},"required":["scheduled","delete_after"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many failed password confirmations (REAUTHENTICATION_RATE_LIMITED): 5 per user or 20 per client address in 15 minutes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"confirmation":{"const":"DELETE MY ACCOUNT"}},"required":["password","confirmation"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}]},"delete":{"operationId":"delete__account_deletion","summary":"Cancel deletion before its deadline","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"const":true}},"required":["cancelled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}]}},"/exports":{"get":{"operationId":"get__exports","summary":"List workspace export manifests (owner session)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["queued","running","completed","failed"]},"state":{"enum":["queued","running","completed","failed","expired","deleted","cancelled"]},"part_count":{"type":"integer"},"record_count":{"type":"integer"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"removed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursor":{"type":"string"}},"required":["id","status","state","part_count","record_count","created_at","expires_at","error","removed_at","cursor"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__exports","summary":"Prepare or resume one active private workspace export","responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily export limit reached (EXPORT_DAILY_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}]}},"/exports/{export_id}":{"get":{"operationId":"get__exports_export_id","summary":"Inspect private export status, manifest and methodology","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["queued","running","completed","failed"]},"part_count":{"type":"integer"},"record_count":{"type":"integer"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspace_id":{"type":"string"},"requested_by":{"type":"string"},"section_index":{"type":"integer"},"cursor":{"type":"integer"},"lease_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"failures":{"type":"integer"},"retry_after":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"datasets_json":{"anyOf":[{"type":"string"},{"type":"null"}]},"methodology":{"const":"Complete paged data and retained artifacts observed during export; not a transactional point-in-time backup. Secrets excluded."},"datasets":{"type":"array","items":{"type":"string"}},"removed_at":{"type":"null"},"artifacts_deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"enum":["queued","running","completed","failed","expired","deleted","cancelled"]}},"required":["id","workspace_id","requested_by","status","section_index","cursor","part_count","record_count","lease_until","error","failures","retry_after","expires_at","created_at","updated_at","datasets_json","removed_at","artifacts_deleted_at","state","methodology","datasets"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}]},"delete":{"operationId":"delete__exports_export_id","summary":"Cancel an unfinished export or delete a finished one","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"enum":["cancelled","deleted"]}},"required":["id","state"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Owner browser session only. An unfinished export is cancelled and frees the workspace export slot; a finished one is deleted. Private parts are removed once no worker holds a lease. A removed export returns 410 EXPORT_REMOVED and an expired one 410 EXPORT_EXPIRED."}},"/exports/{export_id}/download":{"get":{"operationId":"get__exports_export_id_download","summary":"Stream completed private JSONL export; removed or expired exports return 410","responses":{"200":{"description":"Success","content":{"application/x-ndjson":{"schema":{"type":"string"}}},"headers":{"Content-Disposition":{"description":"attachment; filename=\"mapsscraper-export-<id>.jsonl\", or \"mapsscraper-export-<id>-part-<N>.jsonl\" for one part.","schema":{"type":"string"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Owner browser session only. A removed export returns 410 EXPORT_REMOVED and an expired one 410 EXPORT_EXPIRED; an unfinished export returns 409 EXPORT_NOT_READY."}},"/exports/{export_id}/parts/{part}":{"get":{"operationId":"get__exports_export_id_parts_part","summary":"Stream completed private JSONL export; removed or expired exports return 410","responses":{"200":{"description":"Success","content":{"application/x-ndjson":{"schema":{"type":"string"}}},"headers":{"Content-Disposition":{"description":"attachment; filename=\"mapsscraper-export-<id>.jsonl\", or \"mapsscraper-export-<id>-part-<N>.jsonl\" for one part.","schema":{"type":"string"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"part","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Owner browser session only. A removed export returns 410 EXPORT_REMOVED and an expired one 410 EXPORT_EXPIRED; an unfinished export returns 409 EXPORT_NOT_READY."}},"/invitations":{"get":{"operationId":"get__invitations","summary":"List workspace invitations without stored tokens","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"enum":["admin","editor","viewer"]},"status":{"enum":["pending","accepted","revoked"]},"expires_at":{"type":"string"},"created_at":{"type":"string"},"cursor":{"type":"string"}},"required":["id","email","role","status","expires_at","created_at","cursor"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns a cursor page of at most page_size rows (1-100). An absent page_size reads the default page of 25, exactly as if page_size=25 had been sent. Follow next_cursor until null for full history."},"post":{"operationId":"post__invitations","summary":"Create a single-use private invitation link (owner session)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"delivery":{"const":"share-link"},"expires_in_hours":{"type":"integer"}},"required":["id","url","delivery","expires_in_hours"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"enum":["admin","editor","viewer"]}},"required":["email","role"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/invitations/{invitation_id}":{"delete":{"operationId":"delete__invitations_invitation_id","summary":"Revoke a pending invitation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"const":true}},"required":["revoked"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}]}},"/invitations/accept":{"post":{"operationId":"post__invitations_accept","summary":"Accept invitation as its matching verified email identity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"const":true},"workspace_id":{"type":"string"}},"required":["accepted","workspace_id"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^loi_[a-f0-9]{64}$"}},"required":["token"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/v1/lists/{list_id}/matches":{"get":{"operationId":"get__v1_lists_list_id_matches","summary":"Rank identity candidates within an existing retained job sample","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/ListItem"},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"business_id":{"type":"string"},"record":{"type":"object","additionalProperties":true},"match":{"type":"object","properties":{"score":{"type":"integer","minimum":0,"maximum":100},"evidence":{"type":"array","items":{"type":"string"}},"conflicts":{"type":"array","items":{"type":"string"}},"method":{"const":"localos.rules.v1"},"interpretation":{"type":"string"}},"required":["score","evidence","conflicts","method","interpretation"],"additionalProperties":false}},"required":["business_id","record","match"]}},"total":{"type":"integer"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}]},"methodology":{"type":"string"}},"required":["source","items","total","next_offset","methodology"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"business_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"job_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"offset","in":"query","schema":{"type":"integer"}}]}},"/v1/lists/{list_id}/merge-preview":{"post":{"operationId":"post__v1_lists_list_id_merge_preview","summary":"Preview exact source-field and qualification changes without applying them","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/ListItem"},"target":{"anyOf":[{"$ref":"#/components/schemas/ListItem"},{"type":"null"}]},"preview":{"type":"object","additionalProperties":false,"properties":{"after":{"$ref":"#/components/schemas/ListItem"},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"before":{},"after":{}},"required":["field","before","after"],"additionalProperties":false}},"consolidation":{"type":"boolean"},"qualification_policy":{"type":"string"},"methodology":{"type":"string"}},"required":["after","changes","consolidation","qualification_policy","methodology"]},"source_version":{"type":"integer"},"target_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source","target","preview","source_version","target_version","preview_hash"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"maxLength":250},"job_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"target_id":{"type":"string","minLength":1,"maxLength":250},"mode":{"enum":["fill_missing","selected"],"type":"string"},"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?!_|business_id$|place_id$)"},"default":[],"maxItems":200},"qualification":{"enum":["source","target"],"type":"string"}},"required":["source_id","job_id","target_id","mode","qualification"],"additionalProperties":false}}}},"description":"Read scope is sufficient, including read-only API keys. Nothing is stored or applied; applying the merge needs write scope.","x-read-only":true}},"/v1/lists/{list_id}/merges":{"get":{"operationId":"get__v1_lists_list_id_merges","summary":"Read cursor-paged merge receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"source_id":{"type":"string"},"target_id":{"type":"string"},"job_id":{"type":"string"},"status":{"type":"string"},"after_version":{"type":"integer"},"created_at":{"type":"string"},"cursor":{"type":"string"}},"required":["id","source_id","target_id","job_id","status","after_version","created_at","cursor"]}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}]},"post":{"operationId":"post__v1_lists_list_id_merges","summary":"Apply reviewed merge atomically with preview versions and idempotency","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"business_id":{"type":"string"},"record":{"$ref":"#/components/schemas/ListItem"},"replayed":{"type":"boolean"}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"maxLength":250},"job_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"target_id":{"type":"string","minLength":1,"maxLength":250},"mode":{"enum":["fill_missing","selected"],"type":"string"},"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?!_|business_id$|place_id$)"},"default":[],"maxItems":200},"qualification":{"enum":["source","target"],"type":"string"},"source_version":{"type":"integer","minimum":1,"maximum":9007199254740990},"target_version":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740990},{"type":"null"}]},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["source_id","job_id","target_id","mode","qualification","source_version","target_version","preview_hash"],"additionalProperties":false}}}}}},"/v1/lists/{list_id}/merges/{receipt_id}":{"get":{"operationId":"get__v1_lists_list_id_merges_receipt_id","summary":"Read immutable original rows and applied result","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"list_id":{"type":"string"},"idempotency_key":{"type":"string"},"fingerprint":{"type":"string"},"source_id":{"type":"string"},"target_id":{"type":"string"},"job_id":{"type":"string"},"source_version":{"type":"integer"},"target_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"before_source":{"type":"string"},"before_target":{"anyOf":[{"type":"string"},{"type":"null"}]},"after_json":{"type":"string"},"after_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"batch_merge_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspace_id","list_id","idempotency_key","fingerprint","source_id","target_id","job_id","source_version","target_version","before_source","before_target","after_json","after_version","status","created_at","batch_merge_id"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/lists/{list_id}/merges/{receipt_id}/undo":{"post":{"operationId":"post__v1_lists_list_id_merges_receipt_id_undo","summary":"Restore originals only while the complete applied row, receipt, workspace and current configuration/membership remain valid; no automatic replay","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"undone":{"const":true,"type":"boolean"},"replayed":{"const":true,"type":"boolean"}},"required":["undone"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/v1/lists/{list_id}/batch-merge-preview":{"post":{"operationId":"post__v1_lists_list_id_batch_merge_preview","summary":"Preview exact-ID batch field changes and skipped tasks without writing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"preview_hash":{"type":"string"},"config_version":{"type":"integer"},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"business_id":{"type":"string"},"job_id":{"type":"string"},"name":{"type":"string"},"source_version":{"type":"integer"},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"before":{},"after":{}},"required":["field","before","after"],"additionalProperties":false}},"evidence":{"type":"object","properties":{"score":{"type":"integer","minimum":0,"maximum":100},"evidence":{"type":"array","items":{"type":"string"}},"conflicts":{"type":"array","items":{"type":"string"}},"method":{"const":"localos.rules.v1"},"interpretation":{"type":"string"}},"required":["score","evidence","conflicts","method","interpretation"],"additionalProperties":false}},"required":["business_id","job_id","name","source_version","changes","evidence"]}},"skipped":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"job_id":{"type":"string"},"business_id":{"type":"string"},"reason":{"type":"string"},"source_status":{"type":"string"}},"required":["job_id","business_id","reason"]}},"fields":{"type":"array","items":{"type":"string"}},"methodology":{"type":"string"},"batch_id":{"type":"string"},"list_id":{"type":"string"}},"required":["batch_id","list_id","preview_hash","config_version","items","skipped","fields","methodology"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"enum":["fill_missing","selected"],"type":"string"},"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?!_|business_id$|place_id$)"},"maxItems":200,"default":[]}},"required":["batch_id","mode"],"additionalProperties":false}}}}}},"/v1/lists/{list_id}/batch-merges":{"post":{"operationId":"post__v1_lists_list_id_batch_merges","summary":"Atomically apply the exact reviewed batch after full-row, settings, membership and source-state checks; all changes commit together or none do","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"business_id":{"type":"string"},"job_id":{"type":"string"},"status":{"type":"string"},"after_version":{"type":"integer"}},"required":["id","business_id","job_id","status","after_version"]}},"skipped":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"job_id":{"type":"string"},"business_id":{"type":"string"},"reason":{"type":"string"},"source_status":{"type":"string"}},"required":["job_id","business_id","reason"]}},"replayed":{"type":"boolean"},"batch_id":{"type":"string"},"preview_hash":{"type":"string"},"config_version":{"type":"integer"},"created_at":{"type":"string"}},"required":["id","batch_id","preview_hash","config_version","skipped","items","created_at","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"enum":["fill_missing","selected"],"type":"string"},"fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^(?!_|business_id$|place_id$)"},"maxItems":200,"default":[]},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed":{"const":true,"type":"boolean"}},"required":["batch_id","mode","preview_hash","confirmed"],"additionalProperties":false}}}}},"get":{"operationId":"get__v1_lists_list_id_batch_merges","summary":"Read cursor-paged batch write-back history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"batch_id":{"type":"string"},"created_at":{"type":"string"},"applied_count":{"type":"integer"},"skipped_count":{"type":"integer"},"undone_count":{"type":"integer"},"cursor":{"type":"string"}},"required":["id","batch_id","created_at","applied_count","skipped_count","undone_count","cursor"]}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}]}},"/v1/lists/{list_id}/batch-merges/{receipt_id}":{"get":{"operationId":"get__v1_lists_list_id_batch_merges_receipt_id","summary":"Read skipped tasks and current child receipt undo states","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"batch_id":{"type":"string"},"preview_hash":{"type":"string"},"config_version":{"type":"integer"},"skipped":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"job_id":{"type":"string"},"business_id":{"type":"string"},"reason":{"type":"string"},"source_status":{"type":"string"}},"required":["job_id","business_id","reason"]}},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"business_id":{"type":"string"},"job_id":{"type":"string"},"status":{"type":"string"},"after_version":{"type":"integer"}},"required":["id","business_id","job_id","status","after_version"]}},"created_at":{"type":"string"},"replayed":{"type":"boolean"}},"required":["id","batch_id","preview_hash","config_version","skipped","items","created_at","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/shares":{"get":{"operationId":"get__shares","summary":"List share metadata without link secrets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"created_by":{"type":"string"},"job_id":{"type":"string"},"title":{"type":"string"},"fields_json":{"type":"string"},"status":{"enum":["preparing","active","revoked","expired"]},"row_count":{"type":"integer"},"expires_at":{"type":"string"},"created_at":{"type":"string"},"password_protected":{"type":"boolean"},"available":{"type":"boolean"}},"required":["id","created_by","job_id","title","fields_json","status","row_count","expires_at","created_at","password_protected","available"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"operationId":"post__shares","summary":"Publish an explicitly reviewed immutable result snapshot","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expires_at":{"type":"string"},"replayed":{"type":"boolean"},"created_by":{"type":"string"},"job_id":{"type":"string"},"title":{"type":"string"},"fields_json":{"type":"string"},"status":{"enum":["preparing","active","revoked","expired"]},"row_count":{"type":"integer"},"created_at":{"type":"string"},"password_protected":{"type":"boolean"}},"required":["id","created_by","job_id","title","fields_json","status","row_count","expires_at","created_at","password_protected","replayed","url"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expires_at":{"type":"string"},"replayed":{"type":"boolean"},"created_by":{"type":"string"},"job_id":{"type":"string"},"title":{"type":"string"},"fields_json":{"type":"string"},"status":{"enum":["preparing","active","revoked","expired"]},"row_count":{"type":"integer"},"created_at":{"type":"string"},"password_protected":{"type":"boolean"}},"required":["id","created_by","job_id","title","fields_json","status","row_count","expires_at","created_at","password_protected","replayed","url"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":100},"fields":{"type":"array","items":{"type":"string","maxLength":250},"minItems":1,"maxItems":100},"hours":{"type":"integer","minimum":1,"maximum":720},"token":{"type":"string","pattern":"^sh_[a-f0-9]{64}$","description":"Generate 32 cryptographically random bytes. Only SHA-256 is stored; reuse for an identical retry."},"confirmed_public":{"const":true},"password":{"type":"string","minLength":16,"maxLength":128,"writeOnly":true,"description":"Optional share password; required by workspace sharing.require_password. Exact characters are preserved. Never place passwords in URLs. Lost passwords cannot be recovered; revoke and create a new link."}},"required":["job_id","title","fields","hours","token","confirmed_public"],"additionalProperties":true}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}]}},"/shares/{share_id}/revoke":{"post":{"operationId":"post__shares_share_id_revoke","summary":"Revoke a creator-owned share, or any share for workspace admins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"const":true}},"required":["revoked"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/shared/{share_id}":{"post":{"operationId":"post__shared_share_id","summary":"Read a live public snapshot using its fragment capability","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"schema":{"const":"localos.shared-result.v1"},"title":{"type":"string"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"count":{"type":"integer"},"source":{"type":"object","properties":{"job_id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"collected_at":{"type":"string"}},"required":["job_id","kind","status","collected_at"],"additionalProperties":false},"limitations":{"type":"string"},"items":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["schema","title","created_at","expires_at","fields","count","source","limitations","items"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Password attempt limit reached (SHARE_PASSWORD_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^sh_[a-f0-9]{64}$"},"password":{"type":"string","minLength":1,"maxLength":128,"writeOnly":true}},"required":["token"],"additionalProperties":true}}}},"security":[],"description":" Protected shares require the password in the POST JSON body on every read. A valid capability is required before password verification. Missing/incorrect password returns 401, exhausted attempt budget returns 429, unavailable verification returns 503. This does not replace a verified recipient session. Passwords/hashes never appear in returned snapshots or metadata. No-store; downloaded copies cannot be recalled."}},"/marketing/config":{"get":{"operationId":"get__marketing_config","summary":"Inspect optional measurement readiness and public campaign labels","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"retention_days":{"type":"integer","minimum":1,"maximum":90},"campaigns":{"type":"array","maxItems":32,"items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"label":{"type":"string","maxLength":80}},"required":["id","label"],"additionalProperties":false}},"available":{"type":"boolean"},"policy":{"type":"string"}},"required":["enabled","retention_days","campaigns","available","policy"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/marketing/events":{"post":{"operationId":"post__marketing_events","summary":"Record a consented bounded event without visitor identifiers","responses":{"204":{"description":"Recorded, disabled, or suppressed by a browser privacy signal; no response body"},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Approximate edge limit or strict daily ingest ceiling reached","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"enum":["page_view","workspace_intent","signup_intent","signup_completed","docs_open","contact_saved"]},"page":{"type":"string"},"campaign":{"type":"string"},"source":{"enum":["direct","search","social","email","referral","other"]},"consent":{"const":true}},"required":["event","page","campaign","source","consent"],"additionalProperties":true}}}},"security":[]}},"/operator/marketing/config":{"get":{"operationId":"get__operator_marketing_config","summary":"Read platform measurement configuration (verified allowlisted operator only)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"enabled":{"type":"boolean"},"retention_days":{"type":"integer","minimum":1,"maximum":90},"campaigns":{"type":"array","maxItems":32,"items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"label":{"type":"string","maxLength":80}},"required":["id","label"],"additionalProperties":false}}},"required":["enabled","retention_days","campaigns"],"additionalProperties":false},"version":{"type":"integer"}},"required":["config","version"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}]},"put":{"operationId":"put__operator_marketing_config","summary":"Save measurement settings with version check (operator only)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"enabled":{"type":"boolean"},"retention_days":{"type":"integer","minimum":1,"maximum":90},"campaigns":{"type":"array","maxItems":32,"items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"label":{"type":"string","maxLength":80}},"required":["id","label"],"additionalProperties":false}}},"required":["enabled","retention_days","campaigns"],"additionalProperties":false},"version":{"type":"integer"}},"required":["config","version"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"enabled":{"type":"boolean"},"retention_days":{"type":"integer","minimum":1,"maximum":90},"campaigns":{"type":"array","maxItems":32,"items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"label":{"type":"string","maxLength":80}},"required":["id","label"],"additionalProperties":true}}},"required":["enabled","retention_days","campaigns"],"additionalProperties":true},"version":{"type":"integer"}},"required":["config","version"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}]}},"/operator/marketing/report":{"get":{"operationId":"get__operator_marketing_report","summary":"Read 1–90 days of consented counts and reported financial inputs (operator only)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"events":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"campaign":{"type":"string"},"event":{"type":"string"},"source":{"type":"string"},"count":{"type":"integer"}},"required":["campaign","event","source","count"]}},"daily":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"day":{"type":"string"},"event":{"type":"string"},"count":{"type":"integer"}},"required":["day","event","count"]}},"financials":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"day":{"type":"string"},"campaign":{"type":"string"},"currency":{"type":"string"},"spend_minor":{"type":"integer"},"revenue_minor":{"type":"integer"},"version":{"type":"integer"},"updated_by":{"type":"string"},"updated_at":{"type":"string"}},"required":["day","campaign","currency","spend_minor","revenue_minor","version","updated_by","updated_at"]}},"methodology":{"type":"string"}},"required":["start","end","events","daily","financials","methodology"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"start","in":"query","schema":{"type":"string","format":"date"}},{"name":"end","in":"query","schema":{"type":"string","format":"date"}}]}},"/operator/marketing/financials":{"put":{"operationId":"put__operator_marketing_financials","summary":"Record or correct reported financial inputs with version guard; does not move money","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"day":{"type":"string"},"campaign":{"type":"string"},"currency":{"type":"string"},"spend_minor":{"type":"integer"},"revenue_minor":{"type":"integer"},"version":{"type":"integer"},"updated_by":{"type":"string"},"updated_at":{"type":"string"}},"required":["day","campaign","currency","spend_minor","revenue_minor","version","updated_by","updated_at"]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"day":{"type":"string","format":"date"},"campaign":{"type":"string"},"currency":{"enum":["USD","EUR","GBP","CAD","AUD","SGD","JPY","CNY","INR"]},"spend_minor":{"type":"integer","minimum":0,"maximum":1000000000},"revenue_minor":{"type":"integer","minimum":0,"maximum":1000000000},"version":{"type":"integer"}},"required":["day","campaign","currency","spend_minor","revenue_minor","version"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}]}},"/account/connections":{"get":{"summary":"List your OAuth agent connections (all workspaces)","security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"client_name":{"type":"string"},"redirect_host":{"type":"string"},"workspace_id":{"type":"string"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"string"},"status":{"enum":["pending","active","revoked"]},"created_at":{"type":"integer"},"expires_at":{"type":"integer"},"revoked_at":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["id","client_name","redirect_host","workspace_id","workspace_name","scopes","status","created_at","expires_at","revoked_at"]}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_connections":{"type":"integer"}},"required":["items","next_cursor","max_connections"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"get_account_connections","parameters":[{"name":"cursor","in":"query","schema":{"type":"string","maxLength":200}}]}},"/account/connections/{id}":{"delete":{"summary":"Revoke your agent connection immediately","security":[{"sessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"const":true}},"required":["revoked"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"delete_account_connections_id"}},"/webhooks":{"get":{"operationId":"get__webhooks","summary":"List redacted webhook destinations and delivery readiness","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"host":{"type":"string"},"key_id":{"type":"string"},"events_json":{"type":"string"},"status":{"enum":["paused","active","deleted"]},"version":{"type":"integer"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by":{"type":"string"},"disabled_reason":{"anyOf":[{"const":"gone"},{"type":"null"}],"description":"gone when the system paused the destination after the receiver answered 410. Re-enabling clears it."},"disabled_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","host","key_id","events_json","status","version","created_at","updated_at","deleted_at","created_by","disabled_reason","disabled_at"],"additionalProperties":false}},"ready":{"type":"boolean"},"config":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"max_endpoints":{"type":"integer","minimum":1,"maximum":5,"default":3},"max_pending":{"type":"integer","minimum":1,"maximum":1000,"default":250},"daily_attempts":{"type":"integer","minimum":1,"maximum":1000,"default":500},"max_attempts":{"type":"integer","minimum":1,"maximum":8,"default":8},"retention_days":{"type":"integer","minimum":7,"maximum":90,"default":30}},"required":["enabled","max_endpoints","max_pending","daily_attempts","max_attempts","retention_days"],"additionalProperties":false},"today":{"type":"object","properties":{"attempts":{"type":"integer"},"omitted":{"type":"integer"}},"required":["attempts","omitted"],"additionalProperties":false}},"required":["items","ready","config","today"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Destinations are listed without URLs or secrets. Verify every delivery before acting on it. Each request carries the Standard Webhooks headers webhook-id, webhook-timestamp and webhook-signature. Compute HMAC-SHA256 of id.timestamp.body (the webhook-id value, a dot, the webhook-timestamp value, a dot, then the raw request body bytes), keyed by the base64 decoding of the secret after whsec_. webhook-signature holds one or more space-separated v1,<base64> signatures; accept the request if any of them equals your digest, compared in constant time. Reject a webhook-timestamp (Unix seconds) more than 300 seconds before or after your clock. Rotating the secret pauses the destination and later deliveries use the new secret, so accept both the old and the new secret until the switch is complete. webhook-id is the event ID and stays the same across retries; use it to ignore duplicates."},"post":{"operationId":"post__webhooks","summary":"Create a paused destination; reveal its signing secret once","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"host":{"type":"string"},"key_id":{"type":"string"},"events_json":{"type":"string"},"status":{"enum":["paused","active","deleted"]},"version":{"type":"integer"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by":{"type":"string"},"disabled_reason":{"anyOf":[{"const":"gone"},{"type":"null"}],"description":"gone when the system paused the destination after the receiver answered 410. Re-enabling clears it."},"disabled_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","host","key_id","events_json","status","version","created_at","updated_at","deleted_at","created_by","disabled_reason","disabled_at"],"additionalProperties":false},"signing_secret":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayed":{"type":"boolean"}},"required":["endpoint","signing_secret","replayed"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"host":{"type":"string"},"key_id":{"type":"string"},"events_json":{"type":"string"},"status":{"enum":["paused","active","deleted"]},"version":{"type":"integer"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by":{"type":"string"},"disabled_reason":{"anyOf":[{"const":"gone"},{"type":"null"}],"description":"gone when the system paused the destination after the receiver answered 410. Re-enabling clears it."},"disabled_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","host","key_id","events_json","status","version","created_at","updated_at","deleted_at","created_by","disabled_reason","disabled_at"],"additionalProperties":false},"signing_secret":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayed":{"type":"boolean"}},"required":["endpoint","signing_secret","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","format":"uri","maxLength":2048,"description":"Public HTTPS only; no credentials, IPs, fragments, custom ports, local domains or workers.dev. Path/query are encrypted and never returned."},"events":{"type":"array","minItems":1,"maxItems":5,"uniqueItems":true,"items":{"enum":["job.completed","job.partial","job.failed","job.uncertain","job.cancelled"]}}},"required":["name","url","events"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Requires a verified-email workspace owner or admin browser session and same-origin mutation. API keys and OAuth cannot administer destinations. Verify every delivery before acting on it. Each request carries the Standard Webhooks headers webhook-id, webhook-timestamp and webhook-signature. Compute HMAC-SHA256 of id.timestamp.body (the webhook-id value, a dot, the webhook-timestamp value, a dot, then the raw request body bytes), keyed by the base64 decoding of the secret after whsec_. webhook-signature holds one or more space-separated v1,<base64> signatures; accept the request if any of them equals your digest, compared in constant time. Reject a webhook-timestamp (Unix seconds) more than 300 seconds before or after your clock. Rotating the secret pauses the destination and later deliveries use the new secret, so accept both the old and the new secret until the switch is complete. webhook-id is the event ID and stays the same across retries; use it to ignore duplicates.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}]}},"/webhooks/{id}":{"patch":{"operationId":"patch__webhooks_id","summary":"CAS update name/events or explicitly enable; pausing cancels pending deliveries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"host":{"type":"string"},"key_id":{"type":"string"},"events_json":{"type":"string"},"status":{"enum":["paused","active","deleted"]},"version":{"type":"integer"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by":{"type":"string"},"disabled_reason":{"anyOf":[{"const":"gone"},{"type":"null"}],"description":"gone when the system paused the destination after the receiver answered 410. Re-enabling clears it."},"disabled_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","host","key_id","events_json","status","version","created_at","updated_at","deleted_at","created_by","disabled_reason","disabled_at"],"additionalProperties":false}},"required":["endpoint"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":100},"events":{"type":"array","minItems":1,"maxItems":5,"uniqueItems":true,"items":{"enum":["job.completed","job.partial","job.failed","job.uncertain","job.cancelled"]}},"enabled":{"type":"boolean"},"confirmed_transfer":{"const":true}},"required":["version","name","events","enabled"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Requires a verified-email workspace owner or admin browser session and same-origin mutation. API keys and OAuth cannot administer destinations."},"delete":{"operationId":"delete__webhooks_id","summary":"Erase destination credentials and cancel pending deliveries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1}},"required":["version"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Requires a verified-email workspace owner or admin browser session and same-origin mutation. API keys and OAuth cannot administer destinations."}},"/webhooks/{id}/rotate":{"post":{"operationId":"post__webhooks_id_rotate","summary":"Rotate secret once, pause destination, cancel pending deliveries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"host":{"type":"string"},"key_id":{"type":"string"},"events_json":{"type":"string"},"status":{"enum":["paused","active","deleted"]},"version":{"type":"integer"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_by":{"type":"string"},"disabled_reason":{"anyOf":[{"const":"gone"},{"type":"null"}],"description":"gone when the system paused the destination after the receiver answered 410. Re-enabling clears it."},"disabled_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","host","key_id","events_json","status","version","created_at","updated_at","deleted_at","created_by","disabled_reason","disabled_at"],"additionalProperties":false},"signing_secret":{"type":"string"}},"required":["endpoint","signing_secret"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1}},"required":["version"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Requires a verified-email workspace owner or admin browser session and same-origin mutation. API keys and OAuth cannot administer destinations."}},"/webhooks/{id}/test":{"post":{"operationId":"post__webhooks_id_test","summary":"Explicitly send a signed metadata-only test; consumes delivery attempts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"endpoint_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"payload_json":{"type":"string"},"status":{"enum":["pending","sending","delivered","failed","cancelled"]},"attempts":{"type":"integer"},"total_attempts":{"type":"integer"},"generation":{"type":"integer"},"next_attempt":{"type":"string"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_http_status":{"anyOf":[{"type":"integer"},{"type":"null"}]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","endpoint_id","event_id","event_type","payload_json","status","attempts","total_attempts","generation","next_attempt","last_error","last_http_status","created_at","expires_at","delivered_at"],"additionalProperties":false}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"endpoint_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"payload_json":{"type":"string"},"status":{"enum":["pending","sending","delivered","failed","cancelled"]},"attempts":{"type":"integer"},"total_attempts":{"type":"integer"},"generation":{"type":"integer"},"next_attempt":{"type":"string"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_http_status":{"anyOf":[{"type":"integer"},{"type":"null"}]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","endpoint_id","event_id","event_type","payload_json","status","attempts","total_attempts","generation","next_attempt","last_error","last_http_status","created_at","expires_at","delivered_at"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmed_transfer":{"const":true}},"required":["confirmed_transfer"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Requires a verified-email workspace owner or admin browser session and same-origin mutation. API keys and OAuth cannot administer destinations."}},"/webhooks/deliveries":{"get":{"operationId":"get__webhooks_deliveries","summary":"Read retained delivery receipts with keyset pagination","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"endpoint_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"payload_json":{"type":"string"},"status":{"enum":["pending","sending","delivered","failed","cancelled"]},"attempts":{"type":"integer"},"total_attempts":{"type":"integer"},"generation":{"type":"integer"},"next_attempt":{"type":"string"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_http_status":{"anyOf":[{"type":"integer"},{"type":"null"}]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","endpoint_id","event_id","event_type","payload_json","status","attempts","total_attempts","generation","next_attempt","last_error","last_http_status","created_at","expires_at","delivered_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer","minimum":0,"description":"Current count of retained receipts for the same workspace and endpoint_id filter."}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"endpoint_id","in":"query","schema":{"type":"string","format":"uuid"}}]}},"/webhooks/deliveries/{id}":{"get":{"operationId":"get__webhooks_deliveries_id","summary":"Read a receipt and its last 20 attempts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"endpoint_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"payload_json":{"type":"string"},"status":{"enum":["pending","sending","delivered","failed","cancelled"]},"attempts":{"type":"integer"},"total_attempts":{"type":"integer"},"generation":{"type":"integer"},"next_attempt":{"type":"string"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_http_status":{"anyOf":[{"type":"integer"},{"type":"null"}]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"receipts":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer"},"key_id":{"type":"string"},"started_at":{"type":"string"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"outcome":{"type":"string"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["attempt","key_id","started_at","finished_at","outcome","http_status","duration_ms"],"additionalProperties":false}}},"required":["id","endpoint_id","event_id","event_type","payload_json","status","attempts","total_attempts","generation","next_attempt","last_error","last_http_status","created_at","expires_at","delivered_at","receipts"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/webhooks/deliveries/{id}/retry":{"post":{"operationId":"post__webhooks_deliveries_id_retry","summary":"Retry a retained failed event with the same ID; maximum 20 lifetime attempts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"pending"}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmed_transfer":{"const":true}},"required":["confirmed_transfer"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Requires a verified-email workspace owner or admin browser session and same-origin mutation. API keys and OAuth cannot administer destinations."}},"/webhooks/deliveries/{id}/cancel":{"post":{"operationId":"post__webhooks_deliveries_id_cancel","summary":"Cancel a pending delivery","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"cancelled"}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Requires a verified-email workspace owner or admin browser session and same-origin mutation. API keys and OAuth cannot administer destinations."}},"/reports/{report_id}/presentation":{"get":{"operationId":"get__reports_report_id_presentation","summary":"Read exact report projection with version and SHA-256 review hash","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPresentationPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"operationId":"patch__reports_report_id_presentation","summary":"Save version-checked report presentation without publication","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPresentationPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0},"presentation":{"$ref":"#/components/schemas/ReportPresentation"}},"required":["version","presentation"],"additionalProperties":false}}}}}},"/report-shares":{"get":{"operationId":"get__report_shares","summary":"List report share metadata without capabilities or artifact keys","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReportShareMetadata"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["items","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"query","schema":{"type":"string","format":"uuid"},"description":"Only shares of this report; total counts the same filter. Any other format returns 400 INVALID_REPORT_ID."},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}]},"post":{"operationId":"post__report_shares","summary":"Publish a reviewed immutable report, capped by source retention","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expires_at":{"type":"string"},"replayed":{"type":"boolean"},"created_by":{"type":"string"},"report_id":{"type":"string"},"report_version":{"type":"integer"},"title":{"type":"string"},"snapshot_hash":{"type":"string"},"access":{"enum":["link","verified_emails"]},"recipients_json":{"type":"string"},"pdf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["preparing","active","revoked","expired"]},"created_at":{"type":"string"},"password_protected":{"type":"boolean"}},"required":["id","created_by","report_id","report_version","title","snapshot_hash","access","recipients_json","pdf_id","status","created_at","expires_at","password_protected","replayed","url"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"expires_at":{"type":"string"},"replayed":{"type":"boolean"},"created_by":{"type":"string"},"report_id":{"type":"string"},"report_version":{"type":"integer"},"title":{"type":"string"},"snapshot_hash":{"type":"string"},"access":{"enum":["link","verified_emails"]},"recipients_json":{"type":"string"},"pdf_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"enum":["preparing","active","revoked","expired"]},"created_at":{"type":"string"},"password_protected":{"type":"boolean"}},"required":["id","created_by","report_id","report_version","title","snapshot_hash","access","recipients_json","pdf_id","status","created_at","expires_at","password_protected","replayed","url"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportShare"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}]}},"/report-shares/{share_id}/revoke":{"post":{"operationId":"post__report_shares_share_id_revoke","summary":"Revoke a creator-owned report share or any report share for admins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"const":true}},"required":["revoked"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/shared-report/{share_id}":{"post":{"operationId":"post__shared_report_share_id","summary":"Read live report snapshot using its capability and optional verified recipient session","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"$ref":"#/components/schemas/ReportSnapshot"},"pdf_available":{"type":"boolean"},"expires_at":{"type":"string"},"access":{"type":"string"},"limitations":{"type":"string"}},"required":["snapshot","pdf_available","expires_at","access","limitations"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Share request or password attempt limit reached (SHARE_RATE_LIMIT, SHARE_PASSWORD_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^rs_[a-f0-9]{64}$"},"password":{"type":"string","minLength":1,"maxLength":128,"writeOnly":true}},"required":["token"],"additionalProperties":false}}}},"security":[],"description":"POST the URL fragment token in the JSON body. No-store/no-referrer/noindex. verified_emails requires a current verified Better Auth session matching the allowlist; API keys do not substitute for recipient identity. Native per-IP throttling. Every read rechecks report, source, workspace, sharing configuration, expiry and revocation. Protected shares require the password in the POST JSON body on every read. A valid capability is required before password verification. Missing/incorrect password returns 401, exhausted attempt budget returns 429, unavailable verification returns 503. This does not replace a verified recipient session. Passwords/hashes never appear in returned snapshots or metadata. No-store; downloaded copies cannot be recalled."}},"/report-pdfs":{"get":{"operationId":"get__report_pdfs","summary":"List private PDF receipts and live availability with keyset continuation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReportPdfWithAvailability"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"ready":{"type":"boolean"},"config":{"$ref":"#/components/schemas/ReportPdfConfig"},"today":{"type":"integer"}},"required":["items","next_cursor","ready","config","today"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Returns at most 25 receipts. today counts all newly admitted requests since UTC midnight, including failed and cancelled requests. ready requires deployment enablement and a private renderer binding. No stored snapshot, lease, object path or recipient secret is returned."},"post":{"operationId":"post__report_pdfs","summary":"Queue an immutable PDF from the exact saved and reviewed presentation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPdfReplay"}}}},"202":{"description":"Queued or rendering receipt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPdfReplay"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportPdf"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"description":"Requires write scope, report module, workspace PDF enablement, available source retention and exact version/hash. Atomic workspace pending/day and deployment day limits apply. Does not spend research units. Same key/input returns the prior receipt; changed input conflicts. Failed/uncertain renders never automatically replay; a new explicitly requested key is needed for another attempt."}},"/report-pdfs/{pdf_id}":{"get":{"operationId":"get__report_pdfs_pdf_id","summary":"Read one workspace PDF receipt and current availability","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPdfWithAvailability"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"pdf_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/report-pdfs/{pdf_id}/cancel":{"post":{"operationId":"post__report_pdfs_pdf_id_cancel","summary":"Cancel a queued or rendering PDF as its creator or an administrator","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"const":true},"render_may_finish":{"type":"boolean"}},"required":["cancelled","render_may_finish"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"pdf_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/report-pdfs/{pdf_id}/download":{"get":{"operationId":"get__report_pdfs_pdf_id_download","summary":"Download a private retained PDF after fresh workspace/report/source checks","responses":{"200":{"description":"Private PDF attachment with no-store and SHA-256 recorded on its receipt","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Disposition":{"description":"attachment; filename=\"mapsscraper-report-{pdf_id}.pdf\"","schema":{"type":"string"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"pdf_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/shared-report/{share_id}/pdf":{"post":{"operationId":"post__shared_report_share_id_pdf","summary":"Download the PDF attached to a live reviewed report share","responses":{"200":{"description":"Private PDF attachment with no-store and SHA-256 recorded on its receipt","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Disposition":{"description":"attachment; filename=\"mapsscraper-report-{pdf_id}.pdf\"","schema":{"type":"string"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Share request or password attempt limit reached (SHARE_RATE_LIMIT, SHARE_PASSWORD_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^rs_[a-f0-9]{64}$"},"password":{"type":"string","minLength":1,"maxLength":128,"writeOnly":true}},"required":["token"],"additionalProperties":false}}}},"security":[],"description":"Inherits the report capability, verified-email audience, current session verification, share configuration, expiry and revocation. Rechecks recipient/share after the private PDF read. No public R2 object URL. Downloaded copies cannot be recalled. Protected shares require the password in the POST JSON body on every read. A valid capability is required before password verification. Missing/incorrect password returns 401, exhausted attempt budget returns 429, unavailable verification returns 503. This does not replace a verified recipient session. Passwords/hashes never appear in returned snapshots or metadata. No-store; downloaded copies cannot be recalled."}},"/review-ai/preview":{"post":{"operationId":"post__review_ai_preview","summary":"Preview exact bounded excerpts, model and attempt budget without invoking AI","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAiPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"report_id":{"type":"string","format":"uuid"}},"required":["report_id"],"additionalProperties":false}}}}}},"/review-ai":{"get":{"operationId":"get__review_ai","summary":"List workspace analysis receipts with keyset continuation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReviewAiReceipt"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"ready":{"type":"boolean"},"today":{"type":"integer"},"config":{"$ref":"#/components/schemas/ReviewAiConfig"}},"required":["items","next_cursor","ready","today","config"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string"}}]},"post":{"operationId":"post__review_ai","summary":"Authorize one bounded generation from an exact reviewed input","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAiReplay"}}}},"202":{"description":"Queued or running analysis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAiReplay"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewAi"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"description":"Workspace write scope and explicit opt-in required. Atomic daily/pending/account limits count all admitted attempts. No Maps wallet debit. Stable key replays the receipt. Unknown or invalid outputs are never automatically reissued. Successful generation creates a separate cited report; it does not publish or send it. Input hash includes source content, presentation version and configuration version. Generated reports follow retained source availability."}},"/review-ai/{analysis_id}":{"get":{"operationId":"get__review_ai_analysis_id","summary":"Read a workspace-scoped analysis receipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAiReceipt"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/review-ai/{analysis_id}/cancel":{"post":{"operationId":"post__review_ai_analysis_id_cancel","summary":"Prevent analysis publication; a dispatched generation may still incur usage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"const":true},"generation_may_finish":{"type":"boolean"}},"required":["cancelled","generation_may_finish"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/jobs/{job_id}/continuation":{"get":{"operationId":"get__v1_jobs_job_id_continuation","summary":"Preview one paid result page and read retained chain receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContinuationPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Read-only, tenant-scoped and retention-aware. Submit the exact returned task to POST /v1/jobs with a stable key and an explicit budget to authorize one new page. Unknown outcomes and repeated cursors stop the chain. Artifact result pagination does not start live research. Chain receipts exclude cancelled/known-failed retry attempts, which remain in task history."}},"/chain-exports/preview":{"post":{"operationId":"post__chain_exports_preview","summary":"Review retained result pages through a chosen completed task","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainExportPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainExportPreviewInput"}}}},"description":"Read scope. Freezes the exact prefix, duplicate policy, configuration version and source content identities. No live research or wallet charge. Pages must be retained and continuous. Does not claim every source record was collected. Malformed JSON returns 400 INVALID_JSON. 422 carries only CHAIN_EXPORT_DISABLED, SOURCE_NOT_FOUND, SOURCE_NOT_READY, PAGE_LIMIT, SOURCE_UNAVAILABLE, SOURCE_TOO_LARGE or MANIFEST_TOO_LARGE; other failures return 500 INTERNAL_ERROR without internal detail."}},"/chain-exports":{"get":{"operationId":"get__chain_exports","summary":"List private multi-page export receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ChainExportReceipt"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"today_attempts":{"type":"integer"},"config":{"$ref":"#/components/schemas/ChainExportConfig"},"methodology":{"type":"string"}},"required":["items","next_cursor","today_attempts","config","methodology"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"through_job_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string"}}]},"post":{"operationId":"post__chain_exports","summary":"Create a reviewed resumable private export","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"queued"},"page_count":{"type":"integer"}},"required":["id","status","page_count"],"additionalProperties":false},{"$ref":"#/components/schemas/ChainExportReplay"}]}}}},"202":{"description":"Admitted export, queued for per-page file creation","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"queued"},"page_count":{"type":"integer"}},"required":["id","status","page_count"],"additionalProperties":false},{"$ref":"#/components/schemas/ChainExportReplay"}]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChainExport"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"description":"Write scope, confirmed_export=true and stable idempotency key required. Matching replay returns the existing receipt even after expiry; changed input conflicts. Atomic admission checks source, config, pending and daily caps; refusals use the same 422 codes as preview. Duplicates use exact review_id/photo_id only; first occurrence wins, content conflicts are counted, missing IDs retained. At most five storage recovery attempts per page; no research source request is repeated."}},"/chain-exports/{export_id}":{"get":{"operationId":"get__chain_exports_export_id","summary":"Read progress, source page IDs and private part integrity manifest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainExportDetail"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/chain-exports/{export_id}/cancel":{"post":{"operationId":"post__chain_exports_export_id_cancel","summary":"Cancel pending file generation with write scope","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cancelled":{"type":"boolean"}},"required":["cancelled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/chain-exports/{export_id}/download":{"get":{"operationId":"get__chain_exports_export_id_download","summary":"Download a completed retained chain export","responses":{"200":{"description":"Private attachment, Cache-Control: no-store, named attachment; filename=\"mapsscraper-chain-{export_id}.{format}\". JSONL has manifest and complete records; JSON has manifest, records and complete=true. CSV starts with a UTF-8 byte order mark, flattens up to 100 record fields and keeps additional fields in extra_fields_json. Excel retains long cells in Overflow and exact identifiers as strings.","content":{"application/x-ndjson":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","schema":{"enum":["jsonl","json","csv","xlsx"],"default":"jsonl"}}],"description":"Read scope. No public object URL. Reads and SHA-256 verifies one <=10 MB part at a time, with fresh workspace and source checks between parts. A late withdrawal aborts the stream; consumers must require the complete marker for JSON/JSONL. Excel requires <=5 MB stored parts; use streaming formats or parts above that bound. Downloaded copies cannot be recalled."}},"/chain-exports/{export_id}/parts/{part_index}":{"get":{"operationId":"get__chain_exports_export_id_parts_part_index","summary":"Resume a completed export by downloading one JSONL part","responses":{"200":{"description":"Raw JSONL record lines, no wrapper or complete marker, named attachment; filename=\"mapsscraper-chain-{export_id}-part-{part_index}.jsonl\". Verify bytes and SHA-256 against the receipt. All export/source/tenant gates apply.","content":{"application/x-ndjson":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"part_index","in":"path","required":true,"schema":{"type":"integer","minimum":0,"maximum":99}}]}},"/v1/polygon-plan":{"post":{"operationId":"post__v1_polygon_plan","summary":"Preview polygon cells, exclusions and aggregate research units","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolygonPlanPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolygonPlanInput"}}}},"description":"Read scope. No live research, reservation or new data. Cell grid uses planar longitude/latitude edges. Outer edges are included and hole edges excluded by postfiltering. Source returns bounded samples and may overlap on shared cell edges. Hash binds canonical plan, exact generated cells and workspace config version. The returned compact plan can be submitted without expanding every task."}},"/v1/polygon-batches":{"post":{"operationId":"post__v1_polygon_batches","summary":"Authorize a reviewed compact polygon plan as an atomic batch","responses":{"200":{"description":"Identical retry of an earlier batch admission. Nothing new is reserved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchReceipt"}}},"headers":{"Idempotent-Replayed":{"description":"true when this response repeats an earlier admission.","schema":{"const":"true"}}}},"202":{"description":"All child tasks reserved and queued atomically","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchReceipt"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Today's live research total is used up (RESEARCH_DAILY_LIMIT_REACHED). Nothing is reserved; Retry-After is the seconds until the next UTC day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolygonBatch"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}},{"name":"X-Max-Units","in":"header","required":true,"schema":{"type":"integer","minimum":1,"maximum":10000}}],"description":"Write scope, confirmed_plan=true, exact preview_hash, explicit aggregate X-Max-Units and stable Idempotency-Key required. Existing identical replay precedes mutable configuration checks. No partial parent, jobs, wallet or outbox records on failure. Every task rechecks current area/polygon configuration immediately before paid live research. Use existing batch detail/cancel and child job results/export APIs; no automatic full rescan. Shared-edge duplicates are not an aggregate unique-business count."}},"/billing/summary":{"get":{"operationId":"get__billing_summary","summary":"Read subscription and unit reconciliation status","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Read scope. Keys and agents receive summary only; test allowance cannot fund paid research. unit_debt is research units, never monetary debt."}},"/billing/plans":{"get":{"operationId":"get__billing_plans","summary":"Read current processor-backed plan quotes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BillingQuote"}},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","reason"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}]}},"/billing/checkouts":{"post":{"operationId":"post__billing_checkouts","summary":"Create or explicitly resume a confirmed recurring checkout","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string"},"quote_hash":{"type":"string"},"confirmed_recurring":{"const":true}},"required":["plan_id","quote_hash","confirmed_recurring"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":120,"pattern":"^[a-zA-Z0-9:_-]+$"}}],"description":"Verified owner session only. Quote hash binds immutable price, allowance, catalog version and tax settings. Stable request key required. Unknown POST outcomes remain uncertain; no scheduled replay. An explicit retry within 20 hours uses identical payment processor idempotency keys and snapshot; older unknown outcomes require operator reconciliation."},"get":{"operationId":"get__billing_checkouts","summary":"Read a bounded page of owned billing checkouts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","status","error","created_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"before","in":"query","schema":{"type":"string"},"description":"Opaque cursor returned by the previous page; at most 25 records. Scoped to the active workspace."}]}},"/billing/checkouts/{checkout_id}":{"get":{"operationId":"get__billing_checkouts_checkout_id","summary":"Read owned checkout and validate current hosted URL","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"202":{"description":"Saved checkout still pending or uncertain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"checkout_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}]}},"/billing/checkouts/{checkout_id}/retry":{"post":{"operationId":"post__billing_checkouts_checkout_id_retry","summary":"Explicitly resume the same saved checkout operation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"202":{"description":"Saved checkout still pending or uncertain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"checkout_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmed_existing":{"const":true}},"required":["confirmed_existing"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/billing/checkouts/{checkout_id}/expire":{"post":{"operationId":"post__billing_checkouts_checkout_id_expire","summary":"Expire an owned open checkout link","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"checkout_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/billing/portal":{"post":{"operationId":"post__billing_portal","summary":"Open an owned processor portal session","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":120,"pattern":"^[a-zA-Z0-9:_-]+$"}}],"description":"Verified owner session. Portal configuration must disable plan changes and allow only period-end cancellation. Fixed return URL; redirect host allowlist."}},"/billing/refresh":{"post":{"operationId":"post__billing_refresh","summary":"Reconcile current subscription and latest invoice","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/billing/reconcile-invoice":{"post":{"operationId":"post__billing_reconcile_invoice","summary":"Read an owned older invoice and reconcile units","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string","pattern":"^in_[A-Za-z0-9]{1,180}$"}},"required":["invoice_id"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/billing/invoices":{"get":{"operationId":"get__billing_invoices","summary":"Read a bounded page of owned billing invoices","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BillingInvoice"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"before","in":"query","schema":{"type":"string"},"description":"Opaque cursor returned by the previous page; at most 25 records. Scoped to the active workspace."}]}},"/billing/ledger":{"get":{"operationId":"get__billing_ledger","summary":"Read a bounded page of owned billing ledger","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BillingUnitEntry"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"before","in":"query","schema":{"type":"string"},"description":"Opaque cursor returned by the previous page; at most 25 records. Scoped to the active workspace."}]}},"/billing/events":{"get":{"operationId":"get__billing_events","summary":"Read a bounded page of owned billing events","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BillingEvent"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"before","in":"query","schema":{"type":"string"},"description":"Opaque cursor returned by the previous page; at most 25 records. Scoped to the active workspace."}]}},"/billing/events/{event_id}/reconcile":{"post":{"operationId":"post__billing_events_event_id_reconcile","summary":"Queue a fresh read for a completed, ignored or review event","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"pending"}},"required":["id","status"],"additionalProperties":false}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"const":"pending"}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Verified owner session. Reads current payment processor objects; never replays a payment or trusts old webhook amounts. Unresolved events remain visible and block account deletion."}},"/billing/webhook":{"post":{"operationId":"post__billing_webhook","summary":"Accept a signed minimal processor event receipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"const":true},"ignored":{"const":true}},"required":["received"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded billing request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Processor response rejected or not safely understood","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[],"parameters":[{"name":"Stripe-Signature","in":"header","required":true,"schema":{"type":"string"}}],"description":"Raw-body HMAC, 5-minute tolerance, pinned API version 2025-06-30.basil, mode and direct-account checks. Immutable event ID/hash dedupe. Raw customer payload is not retained. Queue performs fresh GET reconciliation under a fenced workspace lease. Unknown event types are acknowledged without processing."}},"/v1/jobs/{job_id}/map":{"get":{"operationId":"get__v1_jobs_job_id_map","summary":"Read a private retained basemap receipt and bounded PNG tiles","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapSnapshot"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Tenant-scoped read; never dispatches. Current expiry checked even before retention cleanup. Ordinary job results/MCP exclude image bytes; generic exports and public result shares are disabled for map tasks. Retained reads remain available until expiry after future-load opt-out."}},"/v1/locations":{"get":{"operationId":"get__v1_locations","summary":"List workspace locations with keyset pagination","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LocationRecord"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":80}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"portfolio","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"description":"Workspace members and read-scoped keys only. No live research or research-unit spending. Read-only access remains available when changes are disabled. Profiles are team-maintained, not verified listing ownership."},"post":{"operationId":"post__v1_locations","summary":"Create a private business profile","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRecord"}}}},"201":{"description":"Created with atomic history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationProfile"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"description":"Owner/admin/editor or write-scoped key. Retries with the same key and canonical input return the current record. Different input conflicts. Database-enforced configured capacity and daily mutation ceilings. Creation keys are omitted from responses and data exports."}},"/v1/locations/{id}":{"get":{"operationId":"get__v1_locations_id","summary":"Read a workspace location","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"operationId":"put__v1_locations_id","summary":"Replace a profile with optimistic concurrency","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["version","profile"],"properties":{"version":{"type":"integer","minimum":1,"maximum":2147483646},"profile":{"$ref":"#/components/schemas/LocationProfile"}}}}}},"description":"Compare the exact current version; on conflict read and review before retrying. PUT replaces the complete profile; preserve hours and coverage fields read from the current record. Operation location identity is immutable. Draft editing binds to the current location revision. Archiving a location requires no open work. No external side effects."}},"/v1/locations/{id}/events":{"get":{"operationId":"get__v1_locations_id_events","summary":"Read immutable revision history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LocationEvent"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^[0-9]+$"}}],"description":"At most 25 snapshots, newest first, with a numeric next_cursor. Includes user-supplied text. Retained until workspace deletion; included in owner data exports."}},"/v1/operations":{"get":{"operationId":"get__v1_operations","summary":"List workspace operations with keyset pagination","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OperationRecord"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":80}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"location_id","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"description":"Workspace members and read-scoped keys only. No live research or research-unit spending. Read-only access remains available when changes are disabled. Profiles are team-maintained, not verified listing ownership."},"post":{"operationId":"post__v1_operations","summary":"Create a private manual operation draft","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationRecord"}}}},"201":{"description":"Created with atomic history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationDraft"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"description":"Owner/admin/editor or write-scoped key. Retries with the same key and canonical input return the current record. Different input conflicts. Database-enforced configured capacity and daily mutation ceilings. Creation keys are omitted from responses and data exports."}},"/v1/operations/{id}":{"get":{"operationId":"get__v1_operations_id","summary":"Read a workspace operation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"put":{"operationId":"put__v1_operations_id","summary":"Replace an editable draft with optimistic concurrency","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["version","draft"],"properties":{"version":{"type":"integer","minimum":1,"maximum":2147483646},"draft":{"$ref":"#/components/schemas/OperationDraft"}}}}}},"description":"Compare the exact current version; on conflict read and review before retrying. PUT replaces the complete profile; preserve hours and coverage fields read from the current record. Operation location identity is immutable. Draft editing binds to the current location revision. Archiving a location requires no open work. No external side effects."}},"/v1/operations/{id}/events":{"get":{"operationId":"get__v1_operations_id_events","summary":"Read immutable revision history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LocationEvent"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^[0-9]+$"}}],"description":"At most 25 snapshots, newest first, with a numeric next_cursor. Includes user-supplied text. Retained until workspace deletion; included in owner data exports."}},"/v1/locations/summary":{"get":{"operationId":"get__v1_locations_summary","summary":"Read actual location and manual-work totals","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"locations":{"type":"integer"},"active":{"type":"integer"},"paused":{"type":"integer"},"archived":{"type":"integer"},"open_operations":{"type":"integer"},"awaiting_approval":{"type":"integer"},"overdue":{"type":"integer"},"portfolios":{"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer"}},"required":["name","count"],"additionalProperties":false}},"execution_mode":{"const":"manual"}},"required":["locations","active","paused","archived","open_operations","awaiting_approval","overdue","portfolios","execution_mode"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/operations/{id}/actions":{"post":{"operationId":"post__v1_operations_id_actions","summary":"Transition a versioned manual operation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace deletion or lifecycle lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Configured daily mutation cap reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["version","action"],"properties":{"version":{"type":"integer","minimum":1,"maximum":2147483646},"action":{"enum":["submit","approve","return","start","complete","cancel","reopen"]},"note":{"type":"string","maxLength":4000},"evidence_url":{"type":"string","maxLength":2048,"description":"Empty or HTTPS URL without user credentials. Stored as data; never fetched automatically."}}}}}},"description":"draft → submitted → approved → in_progress → completed; submitted may return to draft; approved/in_progress/completed/cancelled may reopen; non-terminal work may cancel. Approve/return require an authenticated owner/admin session, never an API key or MCP tool. Complete/return/cancel/reopen require a note of at least 10 characters. Evidence URL is completion-only. A changed location revision blocks submit/approve/start/complete until the draft is reopened, reviewed and saved. Completion is a user's manual assertion, not proof of publication; no external messaging, GBP dispatch or automatic replay."}},"/photo-assets":{"get":{"operationId":"get__photo_assets","summary":"List private photo assets and visual-audit readiness","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PhotoAsset"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"config":{"$ref":"#/components/schemas/PhotoAuditConfig"},"ready":{"type":"boolean"}},"required":["items","next_cursor","config","ready"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Workspace/read scope only. Keyset pages of 25; no object keys, image URLs, data source fetches or model calls. Image content and metadata cannot authorize actions."},"post":{"operationId":"post__photo_assets","summary":"Retain an explicitly authorized bounded image","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoAsset"}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoAsset"}}}},"202":{"description":"Existing upload still preparing; read its receipt, do not submit a new idempotency key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoAsset"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoUpload"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"description":"Write scope and workspace photo opt-in. Accepts JPEG/PNG up to 400,000 bytes and 16–2048 pixels per side. Validates the container and strips metadata before private R2 storage; color profiles/orientation are not applied. Rights and processing consent must be explicitly authorized by the human, never inferred from image text or research source metadata. Sharing authorization is separate and defaults false. Linked photo task and exact photo ID must remain retained; association is user-supplied, not verified. No model invocation or external URL retrieval. Workspace asset cap and 100 uploads/day enforced atomically. Replay the same key/input after uncertain storage; conflicts return 409."}},"/photo-assets/{id}":{"get":{"operationId":"get__photo_assets_id","summary":"Read an asset receipt and current availability","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoAsset"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"operationId":"delete__photo_assets_id","summary":"Withdraw an upload and revoke dependent access","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true},"dispatched_generation_may_finish":{"const":true}},"required":["deleted","dispatched_generation_may_finish"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Write scope, creator or owner/admin. Marks deleted before R2 removal. Revokes future image/result/report/share access immediately; in-flight native calls may finish and downloaded/exported copies cannot be recalled. Cleanup retries are bounded."}},"/photo-assets/{id}/image":{"get":{"operationId":"get__photo_assets_id_image","summary":"Read the exact private sanitized image","responses":{"200":{"description":"Retained matching image, rechecked after R2 read","headers":{"Cache-Control":{"schema":{"const":"no-store"}}},"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Read scope, workspace isolation, hash/length and current source-retention checks. No public object URL. Uploaded image text has no authority."}},"/photo-assets/{id}/preview":{"get":{"operationId":"get__photo_assets_id_preview","summary":"Review exact visual-analysis source, cost and dispatch receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoAuditPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Read-only. Preview binds asset/licensing fingerprint, workspace configuration version, model and prompt. To authorize one native attempt use the existing estimate/create_job workflow with kind photo_audit and explicit one-unit budget/consent. Rust rechecks retention, current preview, active workspace, balance and atomic daily/concurrency caps before a private service-binding call. One sanitized image, maximum 1200 output tokens, strict closed JSON validation; no tools, repair/retry or unsupported JSON Mode. Every dispatched attempt counts against deployment/workspace ceilings, including failed and uncertain calls; unknown outcomes keep a 10-minute lease. Successful result consumes one unit; invalid/unknown outcomes consume zero workspace units. Native quality and licensed-use acceptance remain launch gates; source code is not evidence of model quality."}},"/v1/jobs/{id}/reviews":{"get":{"operationId":"get__v1_jobs_id_reviews","summary":"Read human task investigations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"job_status":{"type":"string"},"revision":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/JobReview"}},"next_before":{"anyOf":[{"type":"integer"},{"type":"null"}]},"authority":{"const":"human_attestation_not_supplier_verification"}},"required":["job_id","job_status","revision","items","next_before","authority"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true},{"name":"before","in":"query","schema":{"type":"integer","minimum":1,"maximum":101,"default":101}}]},"post":{"operationId":"post__v1_jobs_id_reviews","summary":"Record a human task investigation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"revision":{"type":"integer"},"replayed":{"type":"boolean"}},"required":["job_id","revision","replayed"],"additionalProperties":false}}}},"201":{"description":"Human investigation recorded","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"revision":{"type":"integer"},"replayed":{"type":"boolean"}},"required":["job_id","revision","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Review save limit reached (JOB_REVIEW_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobReviewInput"}}}},"description":"Verified owner/admin session only; API keys and OAuth cannot submit attestations. Append-only revision check, 100 reviews per job and 100 per workspace per rolling day. Failed/uncertain jobs only. Statements never authorize a research replay or modify job status or units. Known credential patterns are rejected; do not submit sensitive data.","security":[{"sessionCookie":[]}]}},"/v1/jobs/{id}/restore-preview":{"get":{"operationId":"get__v1_jobs_id_restore_preview","summary":"Verify a retained result before renewed unit approval","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredResultPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/jobs/{id}/restore-stored":{"post":{"operationId":"post__v1_jobs_id_restore_stored","summary":"Restore retained data with fresh unit authorization","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"charged":{"type":"integer"},"replayed":{"type":"boolean"}},"required":["job_id","charged","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}},{"name":"X-Max-Units","in":"header","required":true,"schema":{"type":"integer","minimum":0,"maximum":4294967295}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreStoredResult"}}}},"description":"Verified owner/admin session only; API keys/OAuth/MCP cannot approve. Requires an uncertain uncharged job, immutable stored-result hash, current preview, explicit unit consent and budget. Atomically rechecks source retention, settings/review revision, available balance, billing holds and daily limits. Ten restorations/workspace/UTC day. Never sends a research source request. Original idempotency key replays the receipt after retention cleanup.","security":[{"sessionCookie":[]}]}},"/visibility-series":{"get":{"operationId":"get__visibility_series","summary":"List finite recurring visibility series","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/VisibilitySeriesItem"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"},"next_before":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["items","next_before","next_cursor","total"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Returns at most 25 series per page, newest first. Pass next_cursor as cursor (or next_before as before) for the next page; page size is fixed.","parameters":[{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}},{"name":"before","in":"query","description":"next_before from the previous page; cursor is equivalent.","schema":{"type":"integer","minimum":1}}]},"post":{"operationId":"post__visibility_series","summary":"Approve a finite visibility series with a verified administrator session","responses":{"200":{"description":"Identical approval replay","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_by":{"type":"string"},"plan":{"$ref":"#/components/schemas/VisibilitySeriesPlan"},"status":{"enum":["active","paused","cancelled","exhausted"]},"revision":{"type":"integer"},"next_cycle":{"type":"integer"},"cycles":{"type":"integer"},"interval_hours":{"type":"integer"},"maximum_units":{"type":"integer"},"next_run":{"type":"string"},"expires_at":{"type":"string"},"pause_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"replayed":{"const":true}},"required":["id","name","created_by","plan","status","revision","next_cycle","cycles","interval_hours","maximum_units","next_run","expires_at","pause_reason","created_at","replayed"],"additionalProperties":false}}}},"201":{"description":"Finite series created; no live research at approval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilitySeriesItem"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVisibilitySeries"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}},{"name":"X-Max-Units","in":"header","required":true,"schema":{"type":"integer","minimum":1,"maximum":300}}],"description":"No live research or reservation at approval. Each future observation separately checks wallet and daily limits. Failed or uncertain observations pause the series. API keys and OAuth cannot authorize recurring spending.","security":[{"sessionCookie":[]}]}},"/visibility-series/preview":{"post":{"operationId":"post__visibility_series_preview","summary":"Preview fixed prompts, schedule and total unit cap without spending","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilitySeriesPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilitySeriesPlan"}}}}}},"/visibility-series/{id}":{"get":{"operationId":"get__visibility_series_id","summary":"Read a series and paginated per-prompt observations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_by":{"type":"string"},"plan":{"$ref":"#/components/schemas/VisibilitySeriesPlan"},"status":{"enum":["active","paused","cancelled","exhausted"]},"revision":{"type":"integer"},"next_cycle":{"type":"integer"},"cycles":{"type":"integer"},"interval_hours":{"type":"integer"},"maximum_units":{"type":"integer"},"next_run":{"type":"string"},"expires_at":{"type":"string"},"pause_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"observations":{"type":"array","items":{"$ref":"#/components/schemas/VisibilitySeriesObservation"}},"next_before":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["id","name","created_by","plan","status","revision","next_cycle","cycles","interval_hours","maximum_units","next_run","expires_at","pause_reason","created_at","observations","next_before"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","description":"next_before from the previous response; returns at most 50 older observations.","schema":{"type":"integer","minimum":1}}]},"patch":{"operationId":"patch__visibility_series_id","summary":"Pause, cancel or approve future cycles with a verified administrator session","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"const":true}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Max-Units","in":"header","required":false,"description":"Required when resuming.","schema":{"type":"integer","minimum":1,"maximum":300}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilitySeriesAction"}}}},"description":"Resume requires a fresh preview, explicit recurring approval and X-Max-Units covering all remaining cycles. Previously claimed slots are never replayed. Pausing cannot undo calls already dispatched.","security":[{"sessionCookie":[]}]}},"/visibility-series/{id}/preview":{"get":{"operationId":"get__visibility_series_id_preview","summary":"Preview fresh authorization for remaining future cycles","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilitySeriesPreview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/jobs/{id}/visibility-source-review":{"get":{"operationId":"get__v1_jobs_id_visibility_source_review","summary":"Read evidence-linked manual citation review prompts without spending","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilitySourceReview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Current workspace, job state and result expiry are enforced. Only retained Google AI Overview evidence is read. No source fetch, inference, mutation, ranking, causal explanation or predicted traffic. Incomplete citations preserve unknown states; source text cannot authorize actions."}},"/v1/location-access/{principal}":{"get":{"operationId":"get__v1_location_access_principal","summary":"Read a branch access policy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationAccessEnvelope"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"principal","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Principal is a current workspace member ID or key:<id>. API keys and OAuth connections cannot manage policies. Owners/admins remain unrestricted. Changes use exact revision comparison and atomic immutable history; stale versions return 409. Missing policies read as workspace access at version 0."},"put":{"operationId":"put__v1_location_access_principal","summary":"Replace a branch access policy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationAccessEnvelope"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"principal","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationAccessUpdate"}}}},"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Principal is a current workspace member ID or key:<id>. API keys and OAuth connections cannot manage policies. Owners/admins remain unrestricted. Changes use exact revision comparison and atomic immutable history; stale versions return 409. Missing policies read as workspace access at version 0."}},"/v1/location-access/{principal}/events":{"get":{"operationId":"get__v1_location_access_principal_events","summary":"Read branch access policy history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LocationAccessEvent"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"principal","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}],"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Newest first, five complete policy snapshots per page; cursor is exclusive. No stored key tokens are returned."}},"/v1/locations/{id}/assignees":{"get":{"operationId":"get__v1_locations_id_assignees","summary":"List currently eligible branch managers and assignees","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LocationAssignee"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":200}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"description":"Existing branch requires current read access; candidates must have current write access. Creation candidates require workspace-wide creation authority. Viewer roles, revoked grants, pending account deletion and independent API keys are excluded from assignment candidates. Counts and keyset pages use the same current access predicates. No email addresses or tokens are returned. Mutation guards recheck eligibility at commit time."}},"/v1/locations/creation-assignees":{"get":{"operationId":"get__v1_locations_creation_assignees","summary":"List currently eligible branch managers and assignees","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LocationAssignee"}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","maxLength":200}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"description":"Existing branch requires current read access; candidates must have current write access. Creation candidates require workspace-wide creation authority. Viewer roles, revoked grants, pending account deletion and independent API keys are excluded from assignment candidates. Counts and keyset pages use the same current access predicates. No email addresses or tokens are returned. Mutation guards recheck eligibility at commit time."}},"/v1/locations/access":{"get":{"operationId":"get__v1_locations_access","summary":"Read the caller's current branch permissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationAccessOverview"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Current branch ACL combined with authenticated outer write scope. Selected mode does not permit branch creation. Branch-specific reads return 404 for inaccessible branches. Approval requires an owner/admin session; keys and OAuth cannot approve. This is advisory permission feedback, not an authorization receipt: limits, module/lifecycle state and operation workflow may still reject mutations, which recheck authority at commit time."}},"/v1/locations/{id}/access":{"get":{"operationId":"get__v1_locations_id_access","summary":"Read the caller's current branch permissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectiveLocationAccess"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Current branch ACL combined with authenticated outer write scope. Selected mode does not permit branch creation. Branch-specific reads return 404 for inaccessible branches. Approval requires an owner/admin session; keys and OAuth cannot approve. This is advisory permission feedback, not an authorization receipt: limits, module/lifecycle state and operation workflow may still reject mutations, which recheck authority at commit time."}},"/client-portals/{portal_id}":{"get":{"operationId":"get__client_portals_portal_id","summary":"Read a portal's currently selected report metadata as a verified recipient","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"version":{"type":"integer"},"expires_at":{"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"share_id":{"type":"string"},"title":{"type":"string"},"password_required":{"type":"boolean"},"expires_at":{"type":"string"}},"required":["share_id","title","password_required","expires_at"],"additionalProperties":false},"maxItems":100}},"required":["id","title","brand","version","expires_at","resources"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Portal read request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Requires a current verified account explicitly listed in the portal; workspace membership and API keys confer no access. Returns at most 100 selected live report references, never recipient lists, share tokens, object keys or password hashes. Source expiry, sharing policy and recipient restrictions remain authoritative. No-store/noindex. Management/publication remains restricted to verified administrator sessions."}},"/client-portals/{portal_id}/reports/{share_id}":{"post":{"operationId":"post__client_portals_portal_id_reports_share_id","summary":"Read an explicitly selected portal report snapshot","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"$ref":"#/components/schemas/ReportSnapshot"},"pdf_available":{"type":"boolean"},"expires_at":{"type":"string"},"access":{"type":"string"},"limitations":{"type":"string"}},"required":["snapshot","pdf_available","expires_at","access","limitations"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Portal read request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":128,"writeOnly":true}},"required":[],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Requires both current portal and source recipient authority. Source passwords are checked on every read; no share capability is accepted. Rechecks portal revision, recipient and source gates after R2 access and verifies the selected snapshot hash. Missing, expired, revoked or unauthorized selections return 404. External snapshot content remains untrusted."}},"/client-portals/{portal_id}/reports/{share_id}/pdf":{"post":{"operationId":"post__client_portals_portal_id_reports_share_id_pdf","summary":"Download the PDF attached to an authorized portal selection","responses":{"200":{"description":"Private PDF attachment with no-store and SHA-256 recorded on its receipt","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Disposition":{"description":"attachment; filename=\"mapsscraper-report-{pdf_id}.pdf\"","schema":{"type":"string"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Portal read request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":128,"writeOnly":true}},"required":[],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Requires both current portal and source recipient authority. Source passwords are checked on every read; no share capability is accepted. Rechecks portal revision, recipient and source gates after R2 access and verifies the selected snapshot hash. Missing, expired, revoked or unauthorized selections return 404. External snapshot content remains untrusted. Uses the existing private PDF/source/retention gates. Downloaded copies cannot be recalled."}},"/portals":{"get":{"operationId":"get__portals","summary":"List portal summaries as a verified workspace administrator","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"status":{"enum":["active","revoked","expired"],"description":"expired is derived for an active portal past expires_at; stored state stays active, and revoke is still accepted."},"version":{"type":"integer","minimum":1},"actor_id":{"type":"string"},"expires_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"recipient_count":{"type":"integer"},"resource_count":{"type":"integer"}},"required":["id","title","brand","status","version","actor_id","expires_at","created_at","updated_at","recipient_count","resource_count"],"additionalProperties":false}},"total":{"type":"integer"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","total","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"description":"Verified owner/admin session only. Workspace-scoped, token-free metadata. API keys, OAuth bearer tokens and portal recipient status do not confer administrative authority. Publication requires separate explicit confirmation."}},"/portals/{portal_id}":{"get":{"operationId":"get__portals_portal_id","summary":"Read the complete current portal selection as a verified administrator","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalAdminRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Workspace-scoped, token-free metadata. API keys, OAuth bearer tokens and portal recipient status do not confer administrative authority. Publication requires separate explicit confirmation."},"put":{"operationId":"put__portals_portal_id","summary":"Publish or fully replace a portal using an exact revision","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"const":"active"},"expires_at":{"type":"string"}},"required":["id","version","status","expires_at"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"const":"active"},"expires_at":{"type":"string"}},"required":["id","version","status","expires_at"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Portal administration request limit reached (PORTAL_RATE_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"maximum":2147483646},"title":{"type":"string","minLength":1,"maxLength":120},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"recipients":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":100},"resources":{"type":"array","items":{"type":"object","properties":{"share_id":{"type":"string","format":"uuid"},"snapshot_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["share_id","snapshot_hash"],"additionalProperties":false},"minItems":1,"maxItems":100},"expires_at":{"type":"string","format":"date-time"},"confirmed_publication":{"const":true}},"required":["expected_version","title","brand","recipients","resources","expires_at","confirmed_publication"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Every selected share must be live in this workspace with the reviewed snapshot hash and compatible recipients. Private snapshot objects are verified (8 MiB per object, 32 MiB cumulative); unavailable selections fail the whole request. Expiry must be in the next 90 days. Existing source passwords remain mandatory for recipients. No notifications are sent. Creation uses a caller-generated UUID and expected_version 0; replacement requires the current revision. Publication is explicit and atomically audited. On a lost mutation response, read this ID and history before further action; never automatically retry. Preview creates no portal and is not a guarantee that later publication will succeed."}},"/portals/{portal_id}/events":{"get":{"operationId":"get__portals_portal_id_events","summary":"Read up to five immutable portal revision snapshots","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PortalAdminEvent"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","schema":{"type":"string"},"required":true},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}],"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Workspace-scoped, token-free metadata. API keys, OAuth bearer tokens and portal recipient status do not confer administrative authority. Publication requires separate explicit confirmation."}},"/portals/{portal_id}/revoke":{"post":{"operationId":"post__portals_portal_id_revoke","summary":"Revoke portal access using its exact current revision","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalAdminRecord"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646}},"required":["expected_version"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Workspace-scoped, token-free metadata. API keys, OAuth bearer tokens and portal recipient status do not confer administrative authority. Publication requires separate explicit confirmation. Revocation is terminal and appends history atomically; stale/concurrent/repeated requests return 409. If a response is lost, read current state before deciding what to do. No automatic replay. Previously downloaded copies cannot be recalled."}},"/portals/{portal_id}/preview":{"post":{"operationId":"post__portals_portal_id_preview","summary":"Review the complete proposed portal selection without publishing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"expected_version":{"type":"integer"},"title":{"type":"string"},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"recipients":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":100},"expires_at":{"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"share_id":{"type":"string"},"title":{"type":"string"},"snapshot_hash":{"type":"string"},"access":{"enum":["link","verified_emails"]},"expires_at":{"type":"string"},"password_required":{"type":"boolean"}},"required":["share_id","title","snapshot_hash","access","expires_at","password_required"],"additionalProperties":false}},"publication_required":{"const":true}},"required":["id","expected_version","title","brand","recipients","expires_at","resources","publication_required"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Portal administration request limit reached (PORTAL_RATE_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"portal_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"maximum":2147483646},"title":{"type":"string","minLength":1,"maxLength":120},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"recipients":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":100},"resources":{"type":"array","items":{"type":"object","properties":{"share_id":{"type":"string","format":"uuid"},"snapshot_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["share_id","snapshot_hash"],"additionalProperties":false},"minItems":1,"maxItems":100},"expires_at":{"type":"string","format":"date-time"}},"required":["expected_version","title","brand","recipients","resources","expires_at"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Every selected share must be live in this workspace with the reviewed snapshot hash and compatible recipients. Private snapshot objects are verified (8 MiB per object, 32 MiB cumulative); unavailable selections fail the whole request. Expiry must be in the next 90 days. Existing source passwords remain mandatory for recipients. No notifications are sent. Creation uses a caller-generated UUID and expected_version 0; replacement requires the current revision. Publication is explicit and atomically audited. On a lost mutation response, read this ID and history before further action; never automatically retry. Preview creates no portal and is not a guarantee that later publication will succeed."}},"/portals/source-preview":{"post":{"operationId":"post__portals_source_preview","summary":"Inspect an exact published snapshot as a verified administrator","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"string"},"snapshot_hash":{"type":"string"},"snapshot":{"$ref":"#/components/schemas/ReportSnapshot"}},"required":["share_id","snapshot_hash","snapshot"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Portal administration request limit reached (PORTAL_RATE_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"string","format":"uuid"},"snapshot_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["share_id","snapshot_hash"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. Resolves the exact reviewed share/hash within the authenticated workspace and current source policies, reads at most 8 MiB, verifies object integrity and rechecks authority after the read. Returns only the immutable snapshot and its reference; no capability tokens, password hashes or object keys. Does not grant recipient access or publish a portal."}},"/portal-summary":{"get":{"operationId":"get__portal_summary","summary":"Read aggregate portal status for a verified workspace administrator","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"active":{"type":"integer"},"expired":{"type":"integer"},"revoked":{"type":"integer"},"next_expiry":{"anyOf":[{"type":"string"},{"type":"null"}]},"management_path":{"const":"/app/reports"},"publication_requires_verified_session":{"const":true}},"required":["total","active","expired","revoked","next_expiry","management_path","publication_requires_verified_session"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Read scope and a current verified owner/admin are required. REST requires a verified administrator session. Workspace API keys are denied because they have no verified user identity. The corresponding MCP tool also supports a verified administrator OAuth connection without granting access to session-only portal management. Returns only status/expiry counts and next expiry, never portal IDs, recipients, selections or report content. Active counts do not establish individual report availability. Counts sum to total.","security":[{"sessionCookie":[]}]}},"/client-portals":{"get":{"operationId":"get__client_portals","summary":"Discover active portals explicitly shared with the current verified email","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"brand":{"type":"object","properties":{"name":{"type":"string"},"accent":{"type":"string"}},"required":["name","accent"],"additionalProperties":false},"version":{"type":"integer"},"expires_at":{"type":"string"}},"required":["id","title","brand","version","expires_at"],"additionalProperties":false},"maxItems":50},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Portal read request limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"description":"Verified session only, before workspace bootstrap. Returns active unexpired portals explicitly naming the current verified email, across active publisher workspaces with sharing enabled. Membership and keys confer no access. Stable ID keyset pages, maximum 50 items; cursor does not grant authority. No workspace IDs, recipients, selections or report contents. Report/source availability is checked independently on open. No-store/noindex. Unknown or repeated query parameters are rejected."}},"/portal-domains":{"get":{"operationId":"get__portal_domains","summary":"List ownership claims in the administrator workspace","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"portal_id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"expires_ms":{"type":"integer"},"verified_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"enum":["pending","verified","revoked"]},"version":{"type":"integer"},"actor_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","portal_id","hostname","expires_ms","verified_ms","status","version","actor_id","created_at","updated_at","routing_enabled"],"additionalProperties":false},"maxItems":50},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"parameters":[{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}":{"get":{"operationId":"get__portal_domains_claim_id","summary":"Read ownership metadata without the challenge value or hash","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"portal_id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"expires_ms":{"type":"integer"},"verified_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"enum":["pending","verified","revoked"]},"version":{"type":"integer"},"actor_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","portal_id","hostname","expires_ms","verified_ms","status","version","actor_id","created_at","updated_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."},"put":{"operationId":"put__portal_domains_claim_id","summary":"Create an explicitly confirmed ownership claim and issue its one-time TXT value","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"portal_id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"expires_ms":{"type":"integer"},"verified_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"enum":["pending","verified","revoked"]},"version":{"type":"integer"},"actor_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false},"challenge":{"type":"object","properties":{"name":{"type":"string"},"type":{"const":"TXT"},"value":{"type":"string","pattern":"^localos-portal-verification=[a-f0-9]{64}$"}},"required":["name","type","value"],"additionalProperties":false}},"required":["id","portal_id","hostname","expires_ms","verified_ms","status","version","actor_id","created_at","updated_at","routing_enabled","challenge"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"portal_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hostname":{"type":"string","maxLength":254},"expected_version":{"type":"number","const":0},"confirmed_domain_setup":{"type":"boolean","const":true}},"required":["portal_id","hostname","expected_version","confirmed_domain_setup"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/events":{"get":{"operationId":"get__portal_domains_claim_id_events","summary":"Read bounded immutable ownership history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"claim_id":{"type":"string"},"portal_id":{"type":"string"},"hostname":{"type":"string"},"version":{"type":"integer"},"actor_id":{"type":"string"},"status":{"enum":["pending","verified","revoked"]},"expires_ms":{"type":"integer"},"verified_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","claim_id","portal_id","hostname","version","actor_id","status","expires_ms","verified_ms","created_at"],"additionalProperties":false},"maxItems":5},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/rotate":{"post":{"operationId":"post__portal_domains_claim_id_rotate","summary":"Explicitly rotate a stored claim challenge using its current revision","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"portal_id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"expires_ms":{"type":"integer"},"verified_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"enum":["pending","verified","revoked"]},"version":{"type":"integer"},"actor_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false},"challenge":{"type":"object","properties":{"name":{"type":"string"},"type":{"const":"TXT"},"value":{"type":"string","pattern":"^localos-portal-verification=[a-f0-9]{64}$"}},"required":["name","type","value"],"additionalProperties":false}},"required":["id","portal_id","hostname","expires_ms","verified_ms","status","version","actor_id","created_at","updated_at","routing_enabled","challenge"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_rotation":{"type":"boolean","const":true}},"required":["expected_version","confirmed_rotation"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/revoke":{"post":{"operationId":"post__portal_domains_claim_id_revoke","summary":"Terminally revoke an ownership claim using its current revision","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"portal_id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"expires_ms":{"type":"integer"},"verified_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"enum":["pending","verified","revoked"]},"version":{"type":"integer"},"actor_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","portal_id","hostname","expires_ms","verified_ms","status","version","actor_id","created_at","updated_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_removal":{"type":"boolean","const":true}},"required":["expected_version","confirmed_removal"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/verify":{"post":{"operationId":"post__portal_domains_claim_id_verify","summary":"Check stored DNS proof and commit only after current authority and revision rechecks","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"proof":{"const":"pending"},"routing_enabled":{"const":false}},"required":["id","version","proof","routing_enabled"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"portal_id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"expires_ms":{"type":"integer"},"verified_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"enum":["pending","verified","revoked"]},"version":{"type":"integer"},"actor_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false},"proof":{"const":"verified"}},"required":["id","portal_id","hostname","expires_ms","verified_ms","status","version","actor_id","created_at","updated_at","routing_enabled","proof"],"additionalProperties":false}]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646}},"required":["expected_version"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations":{"get":{"operationId":"get__portal_domains_claim_id_operations","summary":"List provisioning metadata scoped to one ownership claim","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"claim_id":{"type":"string","format":"uuid"},"claim_version":{"type":"integer"},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"actor_id":{"type":"string"},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"]},"version":{"type":"integer"},"removal_authorization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","claim_id","claim_version","hostname","provider_id","actor_id","status","version","removal_authorization_id","created_at","updated_at","routing_enabled"],"additionalProperties":false},"maxItems":50},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id","summary":"Read exact provisioning metadata without operator credentials or leases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"claim_id":{"type":"string","format":"uuid"},"claim_version":{"type":"integer"},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"actor_id":{"type":"string"},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"]},"version":{"type":"integer"},"removal_authorization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","claim_id","claim_version","hostname","provider_id","actor_id","status","version","removal_authorization_id","created_at","updated_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."},"put":{"operationId":"put__portal_domains_claim_id_operations_operation_id","summary":"Record confirmed exact-claim provisioning preparation without provider dispatch","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"claim_id":{"type":"string","format":"uuid"},"claim_version":{"type":"integer"},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"actor_id":{"type":"string"},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"]},"version":{"type":"integer"},"removal_authorization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","claim_id","claim_version","hostname","provider_id","actor_id","status","version","removal_authorization_id","created_at","updated_at","routing_enabled"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"claim_id":{"type":"string","format":"uuid"},"claim_version":{"type":"integer"},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"actor_id":{"type":"string"},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"]},"version":{"type":"integer"},"removal_authorization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","claim_id","claim_version","hostname","provider_id","actor_id","status","version","removal_authorization_id","created_at","updated_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"number","const":0},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_preparation":{"type":"boolean","const":true}},"required":["expected_version","claim_version","confirmed_preparation"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/events":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_events","summary":"Read bounded immutable provisioning transition history","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"claim_id":{"type":"string","format":"uuid"},"claim_version":{"type":"integer"},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"actor_id":{"type":"string"},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"]},"version":{"type":"integer"},"created_at":{"type":"string"},"routing_enabled":{"const":false},"id":{"type":"integer"},"operation_id":{"type":"string","format":"uuid"}},"required":["claim_id","claim_version","hostname","provider_id","actor_id","status","version","created_at","routing_enabled","id","operation_id"],"additionalProperties":false},"maxItems":5},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/validation":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_validation","summary":"Read bounded exact-resource TXT setup instructions after fresh authority and revision checks","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"operation_version":{"type":"integer"},"claim_id":{"type":"string","format":"uuid"},"observed_at_ms":{"type":"integer"},"outcome":{"const":"observed"},"routing_enabled":{"const":false},"record":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"operation_id":{"type":"string","format":"uuid"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"ssl_status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","hostname","operation_id","status","ssl_status"],"additionalProperties":false},"dns_records":{"type":"array","items":{"type":"object","properties":{"purpose":{"enum":["ownership","certificate"]},"type":{"const":"TXT"},"name":{"type":"string","maxLength":253},"value":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^[A-Za-z0-9_+/=-]+$"}},"required":["purpose","type","name","value"],"additionalProperties":false},"maxItems":9}},"required":["operation_id","operation_version","claim_id","observed_at_ms","outcome","routing_enabled","record","dns_records"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/cancel":{"post":{"operationId":"post__portal_domains_claim_id_operations_operation_id_cancel","summary":"Cancel confirmed never-dispatched preparation at an exact revision","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"claim_id":{"type":"string","format":"uuid"},"claim_version":{"type":"integer"},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"actor_id":{"type":"string"},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"]},"version":{"type":"integer"},"removal_authorization_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"routing_enabled":{"const":false}},"required":["id","claim_id","claim_version","hostname","provider_id","actor_id","status","version","removal_authorization_id","created_at","updated_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_cancellation":{"type":"boolean","const":true}},"required":["expected_version","confirmed_cancellation"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/create-provider":{"post":{"operationId":"post__portal_domains_claim_id_operations_operation_id_create_provider","summary":"Explicitly dispatch provider creation for a confirmed prepared revision","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["not_dispatched","pending_proof","proof_unavailable","busy","uncertain","recorded"],"type":"string"},"operation":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483647},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},{"type":"null"}]},"actor_id":{"type":"string","minLength":1},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"],"type":"string"},"version":{"type":"integer","minimum":1,"maximum":2147483647},"removal_authorization_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{32}$"},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"updated_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"const":false,"type":"boolean"}},"required":["claim_id","claim_version","hostname","provider_id","actor_id","status","version","created_at","routing_enabled","id","removal_authorization_id","updated_at"],"additionalProperties":false},"routing_enabled":{"const":false,"type":"boolean"}},"required":["outcome","operation","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_provider_creation":{"type":"boolean","const":true}},"required":["expected_version","confirmed_provider_creation"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/reconcile":{"post":{"operationId":"post__portal_domains_claim_id_operations_operation_id_reconcile","summary":"Observe an uncertain provider creation without replay and recheck authority at commit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["busy","uncertain","recorded"],"type":"string"},"operation":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483647},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},{"type":"null"}]},"actor_id":{"type":"string","minLength":1},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"],"type":"string"},"version":{"type":"integer","minimum":1,"maximum":2147483647},"removal_authorization_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{32}$"},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"updated_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"const":false,"type":"boolean"}},"required":["claim_id","claim_version","hostname","provider_id","actor_id","status","version","created_at","routing_enabled","id","removal_authorization_id","updated_at"],"additionalProperties":false},"routing_enabled":{"const":false,"type":"boolean"}},"required":["outcome","operation","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_reconciliation":{"type":"boolean","const":true}},"required":["expected_version","confirmed_reconciliation"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/remove-provider":{"post":{"operationId":"post__portal_domains_claim_id_operations_operation_id_remove_provider","summary":"Authorize one exact-resource removal with fresh administrator consent and no uncertain replay","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["not_dispatched","uncertain","recorded"],"type":"string"},"operation":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483647},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},{"type":"null"}]},"actor_id":{"type":"string","minLength":1},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"],"type":"string"},"version":{"type":"integer","minimum":1,"maximum":2147483647},"removal_authorization_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{32}$"},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"updated_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"const":false,"type":"boolean"}},"required":["claim_id","claim_version","hostname","provider_id","actor_id","status","version","created_at","routing_enabled","id","removal_authorization_id","updated_at"],"additionalProperties":false},"routing_enabled":{"const":false,"type":"boolean"}},"required":["outcome","operation","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_provider_removal":{"type":"boolean","const":true}},"required":["expected_version","confirmed_provider_removal"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/recover-removal":{"post":{"operationId":"post__portal_domains_claim_id_operations_operation_id_recover_removal","summary":"Recover local removal state from a durable exact provider receipt without provider I/O","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["busy","uncertain","recorded"],"type":"string"},"operation":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483647},"hostname":{"type":"string"},"provider_id":{"anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},{"type":"null"}]},"actor_id":{"type":"string","minLength":1},"status":{"enum":["prepared","creating","uncertain","provisioned","removing","remove_uncertain","removed","cancelled"],"type":"string"},"version":{"type":"integer","minimum":1,"maximum":2147483647},"removal_authorization_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{32}$"},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"updated_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"const":false,"type":"boolean"}},"required":["claim_id","claim_version","hostname","provider_id","actor_id","status","version","created_at","routing_enabled","id","removal_authorization_id","updated_at"],"additionalProperties":false},"routing_enabled":{"const":false,"type":"boolean"}},"required":["outcome","operation","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"confirmed_receipt_recovery":{"type":"boolean","const":true}},"required":["expected_version","confirmed_receipt_recovery"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/readiness":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_readiness","summary":"Observe exact provider hostname/TLS and bounded DNS target evidence; never activates routing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483647},"routing_enabled":{"type":"boolean","const":false},"outcome":{"type":"string","const":"not_ready"}},"required":["claim_id","operation_id","operation_version","routing_enabled","outcome"],"additionalProperties":false},{"type":"object","properties":{"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483647},"routing_enabled":{"type":"boolean","const":false},"outcome":{"type":"string","const":"observed"},"provider_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"hostname":{"type":"string"},"target":{"type":"string"},"checked_at":{"type":"integer","minimum":0,"maximum":8640000000000000},"expires_at":{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000}},"required":["claim_id","operation_id","operation_version","routing_enabled","outcome","provider_id","hostname","target","checked_at","expires_at"],"additionalProperties":false}]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/refresh-readiness":{"post":{"operationId":"post__portal_domains_claim_id_operations_operation_id_refresh_readiness","summary":"Explicitly observe and persist readiness using a stable receipt ID and exact revision","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"provider_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"hostname":{"type":"string"},"target":{"type":"string"},"actor_id":{"type":"string","minLength":1,"maxLength":256},"outcome":{"type":"string","enum":["observed","not_ready","unavailable"]},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"expires_ms":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","operation_id","operation_version","claim_id","claim_version","portal_id","portal_version","provider_id","hostname","target","actor_id","outcome","checked_ms","expires_ms","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"receipt_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"confirmed_readiness_refresh":{"type":"boolean","const":true}},"required":["expected_version","receipt_id","confirmed_readiness_refresh"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/readiness-receipts/{receipt_id}":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_readiness_receipts_receipt_id","summary":"Read the saved readiness receipt without provider I/O or routing authority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"provider_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"hostname":{"type":"string"},"target":{"type":"string"},"actor_id":{"type":"string","minLength":1,"maxLength":256},"outcome":{"type":"string","enum":["observed","not_ready","unavailable"]},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"expires_ms":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","operation_id","operation_version","claim_id","claim_version","portal_id","portal_version","provider_id","hostname","target","actor_id","outcome","checked_ms","expires_ms","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/readiness-receipts":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_readiness_receipts","summary":"List five saved readiness receipts in ascending ID order without provider I/O; historical observations do not grant readiness","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"provider_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"hostname":{"type":"string"},"target":{"type":"string"},"actor_id":{"type":"string","minLength":1,"maxLength":256},"outcome":{"type":"string","enum":["observed","not_ready","unavailable"]},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"expires_ms":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","operation_id","operation_version","claim_id","claim_version","portal_id","portal_version","provider_id","hostname","target","actor_id","outcome","checked_ms","expires_ms","created_at","routing_enabled"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/refresh-ownership":{"post":{"operationId":"post__portal_domains_claim_id_refresh_ownership","summary":"Explicitly renew exact-generation TXT ownership evidence with a stable receipt ID; no provider mutation or routing grant","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"actor_id":{"type":"string","minLength":1,"maxLength":256},"outcome":{"type":"string","enum":["observed","not_observed","unavailable"]},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"expires_ms":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","portal_id","portal_version","hostname","actor_id","outcome","checked_ms","expires_ms","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":1,"maximum":2147483646},"receipt_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"confirmed_ownership_refresh":{"type":"boolean","const":true}},"required":["expected_version","receipt_id","confirmed_ownership_refresh"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/ownership-receipts/{receipt_id}":{"get":{"operationId":"get__portal_domains_claim_id_ownership_receipts_receipt_id","summary":"Recover a saved ownership observation without DNS I/O","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"actor_id":{"type":"string","minLength":1,"maxLength":256},"outcome":{"type":"string","enum":["observed","not_observed","unavailable"]},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"expires_ms":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","portal_id","portal_version","hostname","actor_id","outcome","checked_ms","expires_ms","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/ownership-receipts":{"get":{"operationId":"get__portal_domains_claim_id_ownership_receipts","summary":"Read five historical ownership observations in ascending ID order","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"actor_id":{"type":"string","minLength":1,"maxLength":256},"outcome":{"type":"string","enum":["observed","not_observed","unavailable"]},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"expires_ms":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000},{"type":"null"}]},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","portal_id","portal_version","hostname","actor_id","outcome","checked_ms","expires_ms","created_at","routing_enabled"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/ownership-status":{"get":{"operationId":"get__portal_domains_claim_id_ownership_status","summary":"Read current ownership eligibility and expiry without DNS or provider I/O; no routing grant","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"hostname":{"type":"string"},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"eligible":{"type":"boolean"},"source":{"anyOf":[{"type":"string","enum":["initial","renewal"]},{"type":"null"}]},"receipt_id":{"anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},{"type":"null"}]},"expires_ms":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":8640000000000000},{"type":"null"}]},"routing_enabled":{"type":"boolean","const":false}},"required":["claim_id","claim_version","portal_id","hostname","checked_ms","eligible","source","receipt_id","expires_ms","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/renewal-status":{"get":{"operationId":"get__portal_domains_claim_id_renewal_status","summary":"Read sampled renewal consent and operator status without DNS or routing authority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"operator_enabled":{"type":"boolean"},"consent_current":{"type":"boolean"},"effective_enabled":{"type":"boolean"},"setting":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"actor_id":{"type":"string","minLength":1,"maxLength":256},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","portal_version","revision","actor_id","enabled","created_at","routing_enabled"],"additionalProperties":false},{"type":"null"}]},"routing_enabled":{"type":"boolean","const":false},"hostname_allowed":{"type":"boolean"}},"required":["claim_id","claim_version","portal_id","portal_version","hostname","checked_ms","operator_enabled","hostname_allowed","consent_current","effective_enabled","setting","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/renewal-settings/{setting_id}":{"put":{"operationId":"put__portal_domains_claim_id_renewal_settings_setting_id","summary":"Explicitly enable or disable exact-revision ownership renewal with a stable setting ID","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"actor_id":{"type":"string","minLength":1,"maxLength":256},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","portal_version","revision","actor_id","enabled","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"setting_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":0,"maximum":2147483645},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"enabled":{"type":"boolean"},"confirmed_renewal_change":{"type":"boolean","const":true}},"required":["expected_revision","claim_version","portal_version","enabled","confirmed_renewal_change"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."},"get":{"operationId":"get__portal_domains_claim_id_renewal_settings_setting_id","summary":"Recover a historical renewal setting without DNS I/O","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"actor_id":{"type":"string","minLength":1,"maxLength":256},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","portal_version","revision","actor_id","enabled","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"setting_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/renewal-settings":{"get":{"operationId":"get__portal_domains_claim_id_renewal_settings","summary":"Read five historical renewal settings in ascending ID order","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"actor_id":{"type":"string","minLength":1,"maxLength":256},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","portal_version","revision","actor_id","enabled","created_at","routing_enabled"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/mappings/{mapping_id}":{"put":{"operationId":"put__portal_domains_claim_id_operations_operation_id_mappings_mapping_id","summary":"Record explicit exact-revision mapping consent without enabling traffic","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"target":{"type":"string"},"readiness_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"actor_id":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","operation_id","operation_version","portal_id","portal_version","hostname","target","readiness_id","actor_id","revision","enabled","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"mapping_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":0,"maximum":2147483645},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"readiness_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"enabled":{"type":"boolean"},"confirmed_mapping_change":{"type":"boolean","const":true}},"required":["expected_revision","operation_version","portal_version","readiness_id","enabled","confirmed_mapping_change"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."},"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_mappings_mapping_id","summary":"Recover an immutable historical mapping receipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"target":{"type":"string"},"readiness_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"actor_id":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","operation_id","operation_version","portal_id","portal_version","hostname","target","readiness_id","actor_id","revision","enabled","created_at","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"mapping_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/mappings":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_mappings","summary":"Read five historical mapping receipts in ascending ID order","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"target":{"type":"string"},"readiness_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"actor_id":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","operation_id","operation_version","portal_id","portal_version","hostname","target","readiness_id","actor_id","revision","enabled","created_at","routing_enabled"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/portal-domains/{claim_id}/operations/{operation_id}/mapping-status":{"get":{"operationId":"get__portal_domains_claim_id_operations_operation_id_mapping_status","summary":"Read sampled mapping consent and current readiness without DNS or routing authority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"checked_ms":{"type":"integer","minimum":0,"maximum":8639999999700000},"operator_enabled":{"type":"boolean"},"configuration_valid":{"type":"boolean"},"hostname_allowed":{"type":"boolean"},"readiness":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"expires_ms":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","expires_ms"],"additionalProperties":false},{"type":"null"}]},"consent_current":{"type":"boolean"},"enable_eligible":{"type":"boolean"},"mapping":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"claim_version":{"type":"integer","minimum":1,"maximum":2147483646},"operation_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"operation_version":{"type":"integer","minimum":1,"maximum":2147483646},"portal_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"portal_version":{"type":"integer","minimum":1,"maximum":2147483646},"hostname":{"type":"string"},"target":{"type":"string"},"readiness_id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[a-f0-9-]+$"}]},"actor_id":{"type":"string","minLength":1,"maxLength":256},"revision":{"type":"integer","minimum":1,"maximum":2147483646},"enabled":{"type":"boolean"},"created_at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"},"routing_enabled":{"type":"boolean","const":false}},"required":["id","claim_id","claim_version","operation_id","operation_version","portal_id","portal_version","hostname","target","readiness_id","actor_id","revision","enabled","created_at","routing_enabled"],"additionalProperties":false},{"type":"null"}]},"routing_enabled":{"type":"boolean","const":false}},"required":["claim_id","claim_version","operation_id","operation_version","portal_id","portal_version","hostname","checked_ms","operator_enabled","configuration_valid","hostname_allowed","readiness","consent_current","enable_eligible","mapping","routing_enabled"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Domain claim request or lifecycle limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"operation_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Current verified owner/admin browser session with write scope only. Mutations require exact same-origin Origin and explicit intent where applicable. Caller-chosen IDs and exact revisions support reconciliation: never replay an uncertain mutation automatically. Creation/rotation return a fresh TXT value once; stored hashes and prior values are never returned. DNS proof uses the stored challenge and rechecks identity, portal, expiry and revision after I/O. Pending proof writes nothing. SQL enforces tenant scope, limits and immutable history. Ownership claims and read-only provisioning metadata/history never dispatch Cloudflare mutations, activate TLS, route a hostname or grant recipient authority. Provisioning reads bind workspace, claim and operation; lease tokens and operator zone configuration are omitted. Validation reads require explicit server configuration and a current verified claim/provisioned revision, recheck authority and revisions after provider I/O, and return bounded TXT data without granting readiness. Domain normalization/refinements and reserved-host policy remain server enforced."}},"/v1/local-scope/actions":{"post":{"operationId":"post__v1_local_scope_actions","summary":"Record an authorized workspace-scoped competitive action without live research","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"capability":{"type":"string"},"status":{"type":"string"},"provider_attempted":{"type":"integer"},"provider_outcome":{"type":"string"},"subject_key":{"type":"string"},"replayed":{"type":"boolean"},"state":{"oneOf":[{"type":"object","properties":{"field":{"enum":["title","phone","website"]},"provider_attempted":{"const":0},"provider_protocol":{"const":false}},"required":["field","provider_attempted","provider_protocol"],"additionalProperties":false},{"type":"object","properties":{"portfolio_key":{"type":"string"},"location_count":{"type":"integer","minimum":0,"maximum":20},"provider_protocol":{"const":false}},"required":["portfolio_key","location_count","provider_protocol"],"additionalProperties":false},{"type":"object","properties":{"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"},"duplicate":{"type":"boolean"},"distributed":{"const":false}},"required":["fingerprint","duplicate","distributed"],"additionalProperties":false},{"type":"object","properties":{"recipient_ref":{"type":"string"},"sent":{"const":false}},"required":["recipient_ref","sent"],"additionalProperties":false},{"type":"object","properties":{"body":{"type":"string"}},"required":["body"],"additionalProperties":false},{"type":"object","properties":{"service":{"type":"string"},"start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"}},"required":["service","start"],"additionalProperties":false},{"type":"object","properties":{"network":{"enum":["google","facebook","instagram"]},"body":{"type":"string"},"sent":{"const":false}},"required":["network","body","sent"],"additionalProperties":false},{"type":"object","properties":{"engines":{"type":"array","minItems":2,"maxItems":4,"items":{"enum":["google_ai_overview","bing_copilot","perplexity","gemini"]}},"prompt_count":{"type":"integer","minimum":1,"maximum":5},"interval_hours":{"type":"integer","enum":[24,168]},"supplier_access":{"const":false}},"required":["engines","prompt_count","interval_hours","supplier_access"],"additionalProperties":false},{"type":"object","properties":{"nap_complete":{"const":true},"website_https":{"type":"boolean"},"ranking_claim":{"const":false}},"required":["nap_complete","website_https","ranking_claim"],"additionalProperties":false},{"type":"object","properties":{"reserved":{"const":true}},"required":["reserved"],"additionalProperties":false},{"type":"object","properties":{"http_status":{"type":"integer"},"body_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"update_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider_host":{"const":"mybusiness.googleapis.com"}},"required":["http_status","body_sha256","update_time","provider_host"],"additionalProperties":false}]}},"required":["id","workspace_id","capability","status","provider_attempted","provider_outcome","subject_key","state","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Local scope capacity reached (LOCAL_SCOPE_CAPACITY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capability":{"type":"string"},"idempotency_key":{"type":"string"},"subject_key":{"type":"string"}},"required":["capability","idempotency_key","subject_key"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Owner/admin session only. Google Business Profile (GBP) calls stay off unless the operator enables them. Uncertain GBP calls are not replayed. GBP edits do not call a location-update host. Live Google OAuth is not claimed."}},"/v1/local-scope/actions/{id}":{"get":{"operationId":"get__v1_local_scope_actions_id","summary":"Read one competitive action in the signed-in workspace","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"capability":{"type":"string"},"status":{"type":"string"},"provider_attempted":{"type":"integer"},"provider_outcome":{"type":"string"},"subject_key":{"type":"string"},"replayed":{"type":"boolean"},"state":{"oneOf":[{"type":"object","properties":{"field":{"enum":["title","phone","website"]},"provider_attempted":{"const":0},"provider_protocol":{"const":false}},"required":["field","provider_attempted","provider_protocol"],"additionalProperties":false},{"type":"object","properties":{"portfolio_key":{"type":"string"},"location_count":{"type":"integer","minimum":0,"maximum":20},"provider_protocol":{"const":false}},"required":["portfolio_key","location_count","provider_protocol"],"additionalProperties":false},{"type":"object","properties":{"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"},"duplicate":{"type":"boolean"},"distributed":{"const":false}},"required":["fingerprint","duplicate","distributed"],"additionalProperties":false},{"type":"object","properties":{"recipient_ref":{"type":"string"},"sent":{"const":false}},"required":["recipient_ref","sent"],"additionalProperties":false},{"type":"object","properties":{"body":{"type":"string"}},"required":["body"],"additionalProperties":false},{"type":"object","properties":{"service":{"type":"string"},"start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"}},"required":["service","start"],"additionalProperties":false},{"type":"object","properties":{"network":{"enum":["google","facebook","instagram"]},"body":{"type":"string"},"sent":{"const":false}},"required":["network","body","sent"],"additionalProperties":false},{"type":"object","properties":{"engines":{"type":"array","minItems":2,"maxItems":4,"items":{"enum":["google_ai_overview","bing_copilot","perplexity","gemini"]}},"prompt_count":{"type":"integer","minimum":1,"maximum":5},"interval_hours":{"type":"integer","enum":[24,168]},"supplier_access":{"const":false}},"required":["engines","prompt_count","interval_hours","supplier_access"],"additionalProperties":false},{"type":"object","properties":{"nap_complete":{"const":true},"website_https":{"type":"boolean"},"ranking_claim":{"const":false}},"required":["nap_complete","website_https","ranking_claim"],"additionalProperties":false},{"type":"object","properties":{"reserved":{"const":true}},"required":["reserved"],"additionalProperties":false},{"type":"object","properties":{"http_status":{"type":"integer"},"body_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"update_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider_host":{"const":"mybusiness.googleapis.com"}},"required":["http_status","body_sha256","update_time","provider_host"],"additionalProperties":false}]}},"required":["id","workspace_id","capability","status","provider_attempted","provider_outcome","subject_key","state","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/local-scope/consents":{"post":{"operationId":"post__v1_local_scope_consents","summary":"Record explicit consent for one local competitive capability","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"capability":{"type":"string"},"replayed":{"type":"boolean"}},"required":["id","capability","replayed"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"capability":{"type":"string"},"replayed":{"type":"boolean"}},"required":["id","capability","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capability":{"type":"string"}},"required":["capability"],"additionalProperties":true}}}}}},"/v1/local-scope/drills":{"post":{"operationId":"post__v1_local_scope_drills","summary":"Record a local partition, capacity, SLO, chaos, or rollback measurement","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["partition","capacity","slo","chaos","rollback"]},"metric":{"oneOf":[{"type":"object","properties":{"workspace_rows":{"type":"integer","minimum":0}},"required":["workspace_rows"],"additionalProperties":false},{"type":"object","properties":{"action_rows":{"type":"integer","minimum":0},"cap":{"const":30}},"required":["action_rows","cap"],"additionalProperties":false},{"type":"object","properties":{"elapsed_ms":{"type":"integer","minimum":0},"slo_claim":{"const":false}},"required":["elapsed_ms","slo_claim"],"additionalProperties":false},{"type":"object","properties":{"partial":{"const":false}},"required":["partial"],"additionalProperties":false},{"type":"object","properties":{"rolled_back":{"const":true}},"required":["rolled_back"],"additionalProperties":false}]},"provider_attempted":{"const":0},"replayed":{"type":"boolean"}},"required":["id","kind","metric","provider_attempted","replayed"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"chaos"},"partial":{"const":false},"provider_attempted":{"const":0},"replayed":{"const":false}},"required":["kind","partial","provider_attempted","replayed"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"rollback"},"rolled_back":{"const":true},"provider_attempted":{"const":0},"replayed":{"const":false}},"required":["kind","rolled_back","provider_attempted","replayed"],"additionalProperties":false}]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Local scope capacity reached (LOCAL_SCOPE_CAPACITY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string"},"idempotency_key":{"type":"string"}},"required":["kind","idempotency_key"],"additionalProperties":true}}}}}},"/billing/local-tax-quote":{"post":{"operationId":"post__billing_local_tax_quote","summary":"Quote synthetic fixture tax without a merchant call","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"region":{"type":"string"},"subtotal_cents":{"type":"integer"},"tax_bps":{"type":"integer"},"tax_cents":{"type":"integer"},"total_cents":{"type":"integer"},"rate_source":{"const":"synthetic_fixture"},"merchant":{"const":false},"live_tax":{"const":false},"replayed":{"type":"boolean"}},"required":["id","workspace_id","region","subtotal_cents","tax_bps","tax_cents","total_cents","rate_source","merchant","live_tax","replayed"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"region":{"type":"string"},"subtotal_cents":{"type":"integer"},"tax_bps":{"type":"integer"},"tax_cents":{"type":"integer"},"total_cents":{"type":"integer"},"rate_source":{"const":"synthetic_fixture"},"merchant":{"const":false},"live_tax":{"const":false},"replayed":{"type":"boolean"}},"required":["id","workspace_id","region","subtotal_cents","tax_bps","tax_cents","total_cents","rate_source","merchant","live_tax","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"idempotency_key":{"type":"string"},"region":{"type":"string"},"subtotal_cents":{"type":"integer"},"acknowledge_no_merchant":{"const":true}},"required":["idempotency_key","region","subtotal_cents","acknowledge_no_merchant"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Owner session only. Rates are labeled synthetic fixtures. This does not call a payment processor or claim a tax registration."}},"/billing/dunning-schedule":{"post":{"operationId":"post__billing_dunning_schedule","summary":"Schedule local dunning steps without sending a message","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string"},"invoice_ref":{"type":"string"},"delivery":{"const":"not_sent"},"merchant":{"const":false},"steps":{"type":"array","items":{"type":"object","properties":{"day_offset":{"type":"integer"},"status":{"type":"string"}},"required":["day_offset","status"],"additionalProperties":false}},"replayed":{"type":"boolean"}},"required":["workspace_id","invoice_ref","delivery","merchant","steps","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invoice_ref":{"type":"string"},"acknowledge_no_merchant":{"const":true}},"required":["invoice_ref","acknowledge_no_merchant"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Owner browser session only; API keys and OAuth receive 403 BILLING_OWNER_SESSION_REQUIRED."}},"/v1/workflow-skills/consents":{"post":{"operationId":"post__v1_workflow_skills_consents","summary":"Record explicit consent for one in-repo workflow skill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"skill":{"type":"string"},"replayed":{"type":"boolean"}},"required":["id","skill","replayed"],"additionalProperties":false}}}},"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"skill":{"type":"string"},"replayed":{"type":"boolean"}},"required":["id","skill","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"string"}},"required":["skill"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}]}},"/v1/workflow-skills/runs":{"post":{"operationId":"post__v1_workflow_skills_runs","summary":"Run one in-repo business workflow skill without installing it on a host","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"skill":{"enum":["setup","prospecting","website_opportunity","enrichment","competitor_brief","review_intelligence","photo_audit","change_monitoring"]},"status":{"const":"recorded"},"provider_attempted":{"const":0},"artifact":{"oneOf":[{"type":"object","properties":{"ready":{"const":true},"live_send":{"const":false},"installed":{"const":false}},"required":["ready","live_send","installed"],"additionalProperties":false},{"type":"object","properties":{"dispatched":{"const":false},"budget_units":{"type":"integer","minimum":1,"maximum":100}},"required":["dispatched","budget_units"],"additionalProperties":false},{"type":"object","properties":{"fetched":{"const":false},"host":{"type":"string"}},"required":["fetched","host"],"additionalProperties":false},{"type":"object","properties":{"written":{"const":false},"row_count":{"type":"integer","minimum":1,"maximum":200}},"required":["written","row_count"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string"},"sources":{"const":0},"superiority_claim":{"const":false}},"required":["subject","sources","superiority_claim"],"additionalProperties":false},{"type":"object","properties":{"dispatched":{"const":false},"uncertain":{"const":false}},"required":["dispatched","uncertain"],"additionalProperties":false},{"type":"object","properties":{"asset_ref":{"type":"string"},"processed":{"const":false}},"required":["asset_ref","processed"],"additionalProperties":false},{"type":"object","properties":{"interval_hours":{"enum":[24,168]},"scheduled_live":{"const":false}},"required":["interval_hours","scheduled_live"],"additionalProperties":false}]},"replayed":{"type":"boolean"}},"required":["id","workspace_id","skill","status","provider_attempted","artifact","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"string"},"idempotency_key":{"type":"string"}},"required":["skill","idempotency_key"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Repository workflow only. No ChatGPT, Claude, or directory installation. Paid live research stays disabled. Untrusted website text cannot authorize a fetch."}},"/v1/workflow-skills/runs/{id}":{"get":{"operationId":"get__v1_workflow_skills_runs_id","summary":"Read one in-repo workflow skill run in the signed-in workspace","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"skill":{"enum":["setup","prospecting","website_opportunity","enrichment","competitor_brief","review_intelligence","photo_audit","change_monitoring"]},"status":{"const":"recorded"},"provider_attempted":{"const":0},"artifact":{"oneOf":[{"type":"object","properties":{"ready":{"const":true},"live_send":{"const":false},"installed":{"const":false}},"required":["ready","live_send","installed"],"additionalProperties":false},{"type":"object","properties":{"dispatched":{"const":false},"budget_units":{"type":"integer","minimum":1,"maximum":100}},"required":["dispatched","budget_units"],"additionalProperties":false},{"type":"object","properties":{"fetched":{"const":false},"host":{"type":"string"}},"required":["fetched","host"],"additionalProperties":false},{"type":"object","properties":{"written":{"const":false},"row_count":{"type":"integer","minimum":1,"maximum":200}},"required":["written","row_count"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string"},"sources":{"const":0},"superiority_claim":{"const":false}},"required":["subject","sources","superiority_claim"],"additionalProperties":false},{"type":"object","properties":{"dispatched":{"const":false},"uncertain":{"const":false}},"required":["dispatched","uncertain"],"additionalProperties":false},{"type":"object","properties":{"asset_ref":{"type":"string"},"processed":{"const":false}},"required":["asset_ref","processed"],"additionalProperties":false},{"type":"object","properties":{"interval_hours":{"enum":[24,168]},"scheduled_live":{"const":false}},"required":["interval_hours","scheduled_live"],"additionalProperties":false}]},"replayed":{"type":"boolean"}},"required":["id","workspace_id","skill","status","provider_attempted","artifact","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/shared-report/{share_id}/acceptance":{"post":{"operationId":"post__shared_report_share_id_acceptance","summary":"Record verified-recipient acceptance of an existing report paper and orientation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"const":true},"replayed":{"type":"boolean"},"paper":{"enum":["a4","letter"]},"orientation":{"enum":["portrait","landscape"]},"redistribution":{"const":false},"delivery":{"const":"not_sent"},"outbound":{"const":false}},"required":["saved","replayed","paper","orientation","redistribution","delivery","outbound"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Share request or password attempt limit reached (SHARE_RATE_LIMIT, SHARE_PASSWORD_LIMIT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Present on every 429 response; route-specific values take precedence over the 60-second default.","schema":{"type":"integer","minimum":0}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^rs_[a-f0-9]{64}$"},"accepted":{"const":true},"paper":{"enum":["a4","letter"]},"orientation":{"enum":["portrait","landscape"]},"password":{"type":"string","minLength":1,"maxLength":128,"writeOnly":true}},"required":["token","accepted","paper","orientation"],"additionalProperties":false}}}},"security":[],"description":"Public capability route. The share workspace comes from the stored share, never from the body. A caller workspace id, a missing acceptance, or any redistribution field is rejected before insert. verified_emails requires the current verified session email on the allowlist. Stores paper and orientation only. redistribution is false, delivery is not_sent, and no email or Browser Run call is made. A repeated acceptance returns the stored row and does not update it. Abuse/load tuning and redistribution rights remain separate gates. Protected shares require the password in the POST JSON body on every read. A valid capability is required before password verification. Missing/incorrect password returns 401, exhausted attempt budget returns 429, unavailable verification returns 503. This does not replace a verified recipient session. Passwords/hashes never appear in returned snapshots or metadata. No-store; downloaded copies cannot be recalled."}},"/v1/local-scope/drills/{id}":{"get":{"operationId":"get__v1_local_scope_drills_id","summary":"Read one local drill in the signed-in workspace","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"kind":{"enum":["partition","capacity","slo","chaos","rollback"]},"provider_attempted":{"const":0},"replayed":{"const":false},"metric":{"oneOf":[{"type":"object","properties":{"workspace_rows":{"type":"integer","minimum":0}},"required":["workspace_rows"],"additionalProperties":false},{"type":"object","properties":{"action_rows":{"type":"integer","minimum":0},"cap":{"const":30}},"required":["action_rows","cap"],"additionalProperties":false},{"type":"object","properties":{"elapsed_ms":{"type":"integer","minimum":0},"slo_claim":{"const":false}},"required":["elapsed_ms","slo_claim"],"additionalProperties":false},{"type":"object","properties":{"partial":{"const":false}},"required":["partial"],"additionalProperties":false},{"type":"object","properties":{"rolled_back":{"const":true}},"required":["rolled_back"],"additionalProperties":false}]}},"required":["id","workspace_id","kind","metric","provider_attempted","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/agent/threads":{"get":{"operationId":"get__agent_threads","summary":"List workspace conversations and model allowance","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"created_at":{"type":"string"}},"required":["id","title","created_at"],"additionalProperties":false}},"wallet":{"type":"object","properties":{"balance_micro_usd":{"type":"integer"},"reserved_micro_usd":{"type":"integer"},"spent_micro_usd":{"type":"integer"}},"required":["balance_micro_usd","reserved_micro_usd","spent_micro_usd"],"additionalProperties":false},"model":{"const":"assistant-v1"},"model_enabled":{"type":"boolean"},"pricing":{"anyOf":[{"type":"object","properties":{"input_micro_usd_per_million_tokens":{"type":"integer","minimum":1,"maximum":100000000},"output_micro_usd_per_million_tokens":{"type":"integer","minimum":1,"maximum":100000000}},"required":["input_micro_usd_per_million_tokens","output_micro_usd_per_million_tokens"],"additionalProperties":false},{"type":"null"}],"description":"Operator-configured customer price per million tokens; null while the assistant is disabled or not priced, in which case model_enabled is false. A turn reserves ceil((max_input_tokens * input + max_output_tokens * output) / 1,000,000) * max_model_calls micro-USD."}},"required":["threads","wallet","model","model_enabled","pricing"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"sessionCookie":[]}],"description":"Micro-USD allowance amounts are conservative ceilings, not invoices. Reads and cleanup remain available when new generation is disabled. API keys cannot access conversations."},"post":{"operationId":"post__agent_threads","summary":"Create a workspace conversation without calling a model","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"replayed":{"const":true}},"required":["id","title"],"additionalProperties":false}}}},"201":{"description":"Conversation created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":120}},"required":["id","title"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Returns 503 AGENT_PRICING_NOT_CONFIGURED while the assistant has no configured price."}},"/agent/threads/{thread_id}":{"get":{"operationId":"get__agent_threads_thread_id","summary":"Read the server-owned conversation transcript","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"enum":["user","assistant"]},"parts":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["id","role","parts"],"additionalProperties":false}}},"required":["messages"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}]},"delete":{"operationId":"delete__agent_threads_thread_id","summary":"Remove conversation text while preserving cost receipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"enum":["purged","purge_pending"]},"model_replayed":{"const":false}},"required":["id","status","model_replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmed_delete":{"const":true}},"required":["confirmed_delete"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Does not cancel already dispatched model calls or approved research jobs. A durable tombstone prevents a late answer from restoring removed text; unavailable cleanup is retried without invoking a model."}},"/agent/threads/{thread_id}/turns":{"post":{"operationId":"post__agent_threads_thread_id_turns","summary":"Authorize one bounded model turn with a stable turn ID","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"turn_id":{"type":"string","format":"uuid"},"status":{"enum":["accepted","running","awaiting_approval","completed","truncated","interrupted","uncertain","failed"]},"replayed":{"const":true}},"required":["turn_id","status","replayed"],"additionalProperties":false}},"text/event-stream":{"schema":{"type":"string"},"example":"data: {\"type\":\"text-delta\",\"id\":\"text\",\"delta\":\"Research preview\"}\n\ndata: [DONE]\n\n"}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"turn_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"locale":{"type":"string","enum":["en","es","fr","de","pt","it","nl","pl","tr","ru","ja","ko","zh-CN","zh-TW","ar","hi"]},"budget":{"type":"object","properties":{"max_cost_micro_usd":{"type":"integer","minimum":1,"maximum":5000000},"max_input_tokens":{"type":"integer","minimum":256,"maximum":32768},"max_output_tokens":{"type":"integer","minimum":64,"maximum":4096},"max_model_calls":{"type":"integer","minimum":1,"maximum":8}},"required":["max_cost_micro_usd","max_input_tokens","max_output_tokens","max_model_calls"],"additionalProperties":false},"message_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"type":"string","minLength":1,"maxLength":8000}},"required":["turn_id","locale","budget","message_id","text"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Only a user message, locale, IDs and explicit token/call/cost limits are accepted. Caller histories, model choice, client tools, workspace/actor fields and approval flags are rejected. Keep the exact original intent and IDs after an interrupted admission; uncertainty is never automatically replayed. budget.max_cost_micro_usd must cover the reserve at the price from GET /agent/threads, otherwise 422 AGENT_BUDGET_TOO_LOW with error.details.needed_micro_usd. 503 AGENT_PRICING_NOT_CONFIGURED while the assistant has no configured price."}},"/agent/threads/{thread_id}/state":{"get":{"operationId":"get__agent_threads_thread_id_state","summary":"Read bounded model receipts and exact research previews","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"enum":["accepted","running","awaiting_approval","completed","truncated","interrupted","uncertain","failed"]},"settled":{"enum":[0,1]},"locale":{"type":"string"},"reserved_micro_usd":{"type":"integer"},"charged_micro_usd":{"type":"integer"},"created_at":{"type":"string"}},"required":["id","status","settled","locale","reserved_micro_usd","charged_micro_usd","created_at"],"additionalProperties":false}},"proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"turn_id":{"type":"string","format":"uuid"},"task":{"type":"object","properties":{"kind":{"type":"string","enum":["search","details","reviews","photos","enrichment","rank","website_audit","map_tiles","search_visibility","photo_audit"]},"url":{"default":"","type":"string","maxLength":2048},"tile_set":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"z":{"type":"integer","minimum":0,"maximum":19},"x":{"type":"integer","minimum":0,"maximum":9007199254740991},"y":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["z","x","y"],"additionalProperties":false}},"visibility":{"type":"object","properties":{"engine":{"type":"string","const":"google_ai_overview"},"location":{"default":"","type":"string","maxLength":120},"targets":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"domain":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])$"}},"required":["name","domain"],"additionalProperties":false}}},"required":["engine","targets"],"additionalProperties":false},"photo_audit":{"type":"object","properties":{"asset_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"preview_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmed_generation":{"type":"boolean","const":true}},"required":["asset_id","preview_hash","confirmed_generation"],"additionalProperties":false},"query":{"default":"","type":"string","maxLength":400},"business_id":{"default":"","type":"string","maxLength":250},"limit":{"type":"integer","minimum":1,"maximum":500},"region":{"default":"us","type":"string","pattern":"^[a-zA-Z]{2}$"},"language":{"default":"en","type":"string","minLength":2,"maxLength":8},"enrich":{"default":false,"type":"boolean"},"min_rating":{"type":"number","minimum":0,"maximum":5},"website":{"type":"string","enum":["all","present","missing"]},"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"area":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"polygon"},"geometry":{"type":"object","properties":{"type":{"type":"string","const":"Polygon"},"coordinates":{"minItems":1,"maxItems":5,"type":"array","items":{"minItems":4,"maxItems":256,"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-85,"maximum":85}],"items":false,"minItems":2,"maxItems":2}}}},"required":["type","coordinates"],"additionalProperties":false},"cell":{"type":"object","properties":{"south":{"type":"number","minimum":-85,"maximum":85},"west":{"type":"number","minimum":-180,"maximum":180},"north":{"type":"number","minimum":-85,"maximum":85},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","west","north","east"],"additionalProperties":false}},"required":["type","geometry"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"radius"},"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"radius_m":{"type":"integer","minimum":1,"maximum":50000}},"required":["type","lat","lng","radius_m"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"box"},"south":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"north":{"type":"number","minimum":-90,"maximum":90},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["type","south","west","north","east"],"additionalProperties":false}]},"review_options":{"type":"object","properties":{"sort_by":{"default":"most_relevant","type":"string","enum":["most_relevant","newest","highest_ranking","lowest_ranking"]},"query":{"default":"","type":"string","maxLength":400},"translate":{"default":false,"type":"boolean"}},"additionalProperties":false},"is_video":{"type":"boolean"},"continue_from":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind"],"additionalProperties":false},"preview_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"estimate_units":{"type":"integer"},"max_units":{"type":"integer"},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"denied_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"type":"string"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"expired":{"enum":[0,1]}},"required":["id","turn_id","task","preview_sha256","estimate_units","max_units","approved_at","denied_at","resolved_at","expires_at","job_id","expired"],"additionalProperties":false}}},"required":["turns","proposals"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"At most 30 turns and 30 previews. No lease, credential or internal request body is returned. A read may repair an already approved local transcript receipt; it never starts a model call."}},"/agent/proposals/{proposal_id}/approve":{"post":{"operationId":"post__agent_proposals_proposal_id_approve","summary":"Approve and admit exactly one reviewed research task","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"proposal_id":{"type":"string","format":"uuid"},"job_id":{"type":"string"},"status":{"const":"accepted"},"dispatch_evidence":{"const":"job_ledger"},"replayed":{"const":true},"approval_sync":{"enum":["resolved","pending"]}},"required":["proposal_id","job_id","status","dispatch_evidence","approval_sync"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proposal_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"preview_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"max_units":{"type":"integer","minimum":1,"maximum":100000},"confirmed_execution":{"type":"boolean","const":true}},"required":["proposal_id","preview_sha256","max_units","confirmed_execution"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}],"description":"Requires an unexpired exact preview hash and unit limit, current membership and sufficient research units. A fixed proposal idempotency key prevents a repeated decision from creating another job. Resolution updates the durable transcript without another model call."}},"/agent/proposals/{proposal_id}/deny":{"post":{"operationId":"post__agent_proposals_proposal_id_deny","summary":"Decline the exact proposal without starting research","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"proposal_id":{"type":"string","format":"uuid"},"status":{"const":"denied"},"approval_sync":{"enum":["resolved","pending"]}},"required":["proposal_id","status","approval_sync"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proposal_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"preview_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"max_units":{"type":"integer","minimum":1,"maximum":100000},"confirmed_denial":{"type":"boolean","const":true}},"required":["proposal_id","preview_sha256","max_units","confirmed_denial"],"additionalProperties":false}}}},"security":[{"sessionCookie":[]}]}},"/agent/threads/{thread_id}/turns/{turn_id}/export":{"get":{"operationId":"get__agent_threads_thread_id_turns_turn_id_export","summary":"Export one conversation turn with an owner session","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"const":"mapsscraper.agent-turn.v1"},"observed_at":{"type":"string"},"turn":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"thread_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"reserved_micro_usd":{"type":"integer"},"charged_micro_usd":{"type":"integer"},"created_at":{"type":"string"}},"required":["id","thread_id","status","reserved_micro_usd","charged_micro_usd","created_at"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"enum":["user","assistant"]},"parts":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["id","role","parts"],"additionalProperties":false}},"transcript_available":{"type":"boolean"}},"required":["schema","observed_at","turn","messages","transcript_available"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"turn_id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"sessionCookie":[]}],"description":"Owner-only snapshot. Transcript retention may have removed older text. The workspace export additionally iterates all retained turns; credentials and execution leases are excluded."}},"/admission-recovery":{"post":{"operationId":"post__admission_recovery","summary":"Inspect an original job/batch admission or retire its unused key","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"found"},"operation":{"type":"string","enum":["job","batch","monitor"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","minLength":1,"maxLength":40},"reserved":{"type":"integer","minimum":0,"maximum":9007199254740991},"charged":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["state","operation","id","status","reserved","charged","created_at"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_found"},"operation":{"type":"string","enum":["job","batch","monitor"]}},"required":["state","operation"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"retired"},"operation":{"type":"string","enum":["job","batch","monitor"]}},"required":["state","operation"],"additionalProperties":false}]}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"operation":{"type":"string","enum":["job","batch","monitor"]},"idempotency_key":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9:_.-]+$"},"action":{"type":"string","const":"inspect"}},"required":["operation","idempotency_key","action"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","enum":["job","batch","monitor"]},"idempotency_key":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9:_.-]+$"},"action":{"type":"string","const":"retire"},"confirmed_retire":{"type":"boolean","const":true}},"required":["operation","idempotency_key","action","confirmed_retire"],"additionalProperties":false}]}}}},"security":[{"sessionCookie":[]}],"description":"Session-only recovery, scoped to current membership. Inspection does not reserve or dispatch. A missing row is not proof that a request cannot arrive late. Confirmed retirement atomically fences an unused key; an already admitted job or batch is returned untouched. Retire never cancels or releases existing work."}},"/v1/jobs/{id}/restore-receipt":{"post":{"operationId":"post__v1_jobs_id_restore_receipt","summary":"Inspect the receipt of an original restoration request without charging units","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"charged":{"type":"integer"},"replayed":{"const":true}},"required":["job_id","charged","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}},{"name":"X-Max-Units","in":"header","required":true,"schema":{"type":"integer","minimum":0,"maximum":4294967295}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreStoredResult"}}}},"security":[{"sessionCookie":[]}],"description":"Verified owner/admin session only. The exact original body, Idempotency-Key and X-Max-Units are fingerprint data for lookup only. Returns an existing matching receipt or RESULT_RESTORE_RECEIPT_NOT_FOUND (404); mismatched fingerprints return IDEMPOTENCY_CONFLICT. This operation never creates a restoration, charges units, reads staged objects or sends a research source request, and works after temporary-stage cleanup. API keys/OAuth/MCP cannot approve or inspect these session-only receipts."}},"/v1/imports/receipt":{"post":{"operationId":"post__v1_imports_receipt","summary":"Inspect a committed import receipt without importing records","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReceipt"}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"description":"Read scope is sufficient, including read-only API keys and viewers. The exact original input and stable key are required. This reads only the current workspace/list receipt, never creates rows, replays a write, starts live research or spends units. Missing receipts return 404 IMPORT_RECEIPT_NOT_FOUND; a different original request returns 409 IDEMPOTENCY_CONFLICT. A missing receipt is not proof that an earlier request cannot still commit. Only an explicit continuation may send the original idempotent write.","x-read-only":true}},"/reports/{report_id}/delivery-summary":{"get":{"operationId":"get__reports_report_id_delivery_summary","summary":"Count the live links and client portals that deleting this report would end","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"report_id":{"type":"string"},"active_shares":{"type":"integer","minimum":0},"active_portals":{"type":"integer","minimum":0}},"required":["report_id","active_shares","active_portals"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/extension-connect":{"post":{"operationId":"post__extension_connect","summary":"Approve the browser extension that opened this page","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"expires_in":{"const":120}},"required":["code","expires_in"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"browser":{"enum":["chrome","edge","firefox","opera","safari"]}},"required":["code_challenge","browser"],"additionalProperties":true}}}},"security":[{"sessionCookie":[]}],"description":"Owner/admin session required (not an API key or OAuth grant). code_challenge is the base64url SHA-256 of the extension's PKCE verifier (RFC 7636, S256). Returns a single-use code that expires after 120 seconds; only its hash is stored. 403 ADMIN_REQUIRED; 400 VALIDATION_ERROR."}},"/extension-connect/token":{"post":{"operationId":"post__extension_connect_token","summary":"Exchange an approved extension code for a new workspace key","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^lo_[a-f0-9]{64}$"},"key_id":{"type":"string"},"name":{"type":"string"},"scopes":{"const":"read,write"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["token","key_id","name","scopes","workspace"],"additionalProperties":false}}}},"400":{"description":"Invalid fields, or INVALID_JSON for a malformed JSON or non-UTF-8 body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Scope, role or module denied; WORKSPACE_ACCESS_REVOKED when the session is no longer a member of the selected workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting version, idempotency key, task state or workspace state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Result expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds one MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Budget, balance or workspace limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"423":{"description":"Workspace writes are locked (deletion pending or workspace not active). During the read-only grace, reads stay available, including read-only MCP tools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data source configuration required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"code_verifier":{"type":"string","pattern":"^[A-Za-z0-9._~-]{43,128}$"}},"required":["code","code_verifier"],"additionalProperties":true}}}},"security":[],"description":"Called by the browser extension, which may send it from its extension origin without a bearer key. The first attempt consumes the code: a wrong verifier, an expired or used code all return 400 EXTENSION_CONNECT_CODE_INVALID. 403 ADMIN_REQUIRED when the approver is no longer an owner or admin; 429 RATE_LIMITED. The token is returned once; only its hash is stored, and it can be revoked under API keys."}}}}