{"openapi":"3.0.0","info":{"title":"Sable API","version":"1.0.0","description":"Backend API for Sable"},"components":{"schemas":{"WebhookEvent":{"type":"object","properties":{"publicId":{"type":"string"},"type":{"type":"string"},"apiVersion":{"type":"string"},"sessionId":{"type":"string"},"transcriptSessionId":{"type":"integer","nullable":true},"payload":{"type":"object","additionalProperties":true},"createdAt":{"type":"string"}},"required":["publicId","type","apiVersion","sessionId","transcriptSessionId","payload","createdAt"]},"Error":{"type":"object","properties":{"error":{"type":"string","example":"Insufficient free browsers in org pool"},"code":{"type":"string","example":"BROWSER_ALLOCATION_CONFLICT"},"metadata":{"type":"object","additionalProperties":true,"example":{"available":0,"requested":1}},"requestId":{"type":"string","example":"abf6c54e-1234-4567-89ab-cdef01234567"}},"required":["error"]},"VisitorBrand":{"type":"object","nullable":true,"properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\r\\n]*$"},"domain":{"type":"string","minLength":1,"maxLength":253},"primary":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"quality":{"type":"number","minimum":0,"maximum":1},"source":{"type":"string","enum":["brandfetch","config"]},"logo":{"type":"string"}},"required":["name","domain","primary","accent","quality","source"]},"AgentRuntimeStatus":{"type":"object","properties":{"published":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"env":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"example":"locked-1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"Brain environment name, ref, or locked-<full git sha> (the older rev-<full git sha> form is still accepted); null follows routing."}},"required":["id","env"]}},"required":["published"]},"AgentConfigVersionListResponse":{"type":"object","properties":{"configVersions":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigVersion"}}},"required":["configVersions"]},"AgentConfigVersion":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"number"},"agentId":{"type":"number","nullable":true},"versionNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":3},"comment":{"type":"string","nullable":true,"example":"Adjusted greeting and tone for onboarding demos."},"status":{"$ref":"#/components/schemas/AgentConfigStatus"},"config":{"$ref":"#/components/schemas/AgentConfig"},"createdByAuthId":{"type":"string","nullable":true,"format":"uuid","example":null},"createdByName":{"type":"string","nullable":true,"example":"Jane Doe"},"createdByEmail":{"type":"string","nullable":true,"example":"jane@company.com"},"createdByIsSableAdmin":{"type":"boolean","example":false},"createdAt":{"type":"string","example":"2024-01-01T00:00:00Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00Z"},"publishedAt":{"type":"string","nullable":true,"example":null},"expiresAt":{"type":"string","nullable":true,"example":null},"env":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"example":null,"description":"Environment serving this version; null means routing decides."}},"required":["id","orgId","agentId","versionNumber","comment","status","config","createdByAuthId","createdByName","createdByEmail","createdByIsSableAdmin","createdAt","updatedAt","publishedAt","expiresAt","env"]},"AgentConfigStatus":{"type":"string","enum":["draft","published","archived","expired"]},"AgentConfig":{"type":"object","nullable":true,"properties":{"name":{"type":"string","minLength":1},"greeting_instructions":{"type":"string","default":""},"environment":{"type":"string","enum":["development","staging","production"]},"custom_tools":{"type":"boolean"},"builtin_tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":true}]}},"instructions":{"type":"object","properties":{"template":{"type":"string"},"media":{"type":"array","items":{"$ref":"#/components/schemas/InstructionsMediaItem"}},"system_sections":{"type":"object","additionalProperties":{"type":"string"}},"behavior":{"anyOf":[{"type":"object","properties":{"personality":{"type":"string","nullable":true,"description":"Resolved personality. Omit or use null for the runtime default; an empty string disables this personality."}},"additionalProperties":true},{"nullable":true}]},"action_refs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ActionRef"}},"sable_system_prompt":{"type":"string","default":""},"customer_system_prompt":{"type":"string","default":""},"customer_stages":{"type":"array","items":{"$ref":"#/components/schemas/Stage"},"default":[]},"proactive_vision_prompt":{"type":"string","default":""}},"additionalProperties":true},"llm":{"type":"object","properties":{"turn_detection":{"type":"object","properties":{"type":{"type":"string","enum":["server_vad"]},"threshold":{"type":"number","minimum":0,"maximum":1},"silence_duration_ms":{"type":"integer","minimum":100,"maximum":2000}},"required":["type","threshold","silence_duration_ms"],"additionalProperties":true},"speed":{"type":"number","minimum":0.5,"maximum":1.5},"adaptive_speed":{"type":"boolean"},"voice":{"type":"string"}},"required":["turn_detection"],"additionalProperties":true},"stt":{"type":"object","properties":{"model":{"type":"string","nullable":true,"minLength":1},"delay":{"type":"string","nullable":true,"enum":["minimal","low","medium","high","xhigh",null]},"language_hints":{"type":"array","nullable":true,"items":{"type":"string","minLength":1}},"keywords":{"type":"array","nullable":true,"items":{"type":"string","minLength":1}},"prompt":{"type":"string","nullable":true},"barge_in":{"type":"string","nullable":true,"enum":["cut","judge","listen","confirm",null]}},"additionalProperties":true},"tts":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true,"minLength":1},"model":{"type":"string","nullable":true,"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_turbo_v2","eleven_turbo_v2_5","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3.6-2026-08-27","flux-hannah-en","flux-kit-en","flux-alexis-en","flux-cliff-en","flux-sienna-en","flux-cole-en","flux-brooke-en","flux-colin-en","flux-gemma-en","flux-haley-en","flux-heather-en","flux-miles-en","flux-sean-en","flux-bree-en","flux-brittany-en","flux-bruce-en","flux-conor-en","flux-donovan-en","flux-drew-en","flux-elise-en","flux-jack-en","flux-kai-en","flux-kelsey-en","flux-maeve-en","flux-marcelo-en","flux-marcus-en","flux-meena-en","flux-meghan-en","flux-naveen-en","flux-paige-en","flux-priya-en","flux-rufus-en","flux-sharon-en","flux-tanner-en","flux-wade-en","flux-wes-en","coda","mistv3","speech-2.8-turbo","gemini-3.8-flash-lite-tts","gemini-3.8-flash-tts",null]},"voice_switching":{"type":"boolean"},"voices":{"type":"array","items":{"type":"string","minLength":1}},"voice_metadata":{"type":"object","nullable":true,"properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"gender":{"type":"string","enum":["feminine","masculine","neutral"]}},"required":["provider","voice_id","model","gender"]},"pronunciation_terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"]},"validated_on":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true}},"required":["provider","voice_id","model"]},"sample_sentence":{"type":"string"},"label":{"type":"string","maxLength":200},"language":{"type":"string","default":"en"}},"required":["term","replace","class"],"additionalProperties":true},"maxItems":50},"pronunciation_rules":{"type":"array","items":{"type":"object","properties":{"string_to_replace":{"type":"string","minLength":1},"type":{"type":"string","enum":["alias","phoneme"]},"alias":{"type":"string"},"phoneme":{"type":"string"},"alphabet":{"type":"string","enum":["ipa","cmu","arpabet"]}},"required":["string_to_replace","type"],"additionalProperties":true}},"pronunciation_dictionary_id":{"type":"string","nullable":true},"pronunciation_dictionary_version_id":{"type":"string","nullable":true},"pronunciation_dictionary_rules_hash":{"type":"string","nullable":true}},"required":["provider","voice_id","model"],"additionalProperties":true},"room":{"type":"object","properties":{},"additionalProperties":true},"components":{"type":"object","properties":{"browser":{"type":"object","properties":{"enabled":{"type":"boolean"},"enable_streaming":{"type":"boolean"},"mcp_server_dir":{"type":"string","nullable":true,"minLength":1},"root_url":{"type":"string","format":"uri"},"root_urls":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["name","url"]}},{"type":"object","additionalProperties":{"type":"string","format":"uri"}}]},"signin_variables":{"type":"object","additionalProperties":{"type":"string"}},"signin_actions":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}},{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}]},"exit_actions":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}},{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}]},"clear_browser_data":{"type":"boolean"},"user_blocked_regions":{"type":"array","items":{"type":"string"}},"user_blocked_fallback_message":{"type":"string"},"user_blocked_shortcuts":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,199}$"},"minItems":1}},"required":["enabled","enable_streaming","mcp_server_dir"],"additionalProperties":true},"session_preparation":{"anyOf":[{"type":"object","properties":{"figma_demo":{"anyOf":[{"type":"object","properties":{"pool_agent_id":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}}},"required":["pool_agent_id"],"additionalProperties":false},{"type":"object","properties":{"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}}},"required":["read_from_pool","runtime_account_ids"],"additionalProperties":false},{"type":"object","properties":{"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"recipes":{"type":"array","items":{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments"],"additionalProperties":false},"minItems":1},"ready_count":{"type":"integer","minimum":1},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30}},"required":["write_to_pool","recipes","ready_count","maintenance_account_ids","runtime_account_ids"],"additionalProperties":false},{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100},"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments","account_id"],"additionalProperties":false},"minItems":1},"ready_count":{"type":"integer","minimum":1},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"}},"required":["recipes"],"additionalProperties":false},{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100},"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments","account_id"],"additionalProperties":false},{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"minItems":1,"maxItems":30}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments","account_ids"],"additionalProperties":false}]}},"required":["figma_demo"],"additionalProperties":false},{"type":"object","properties":{"notion_demo_cleanup":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"ready_count":{"type":"number","enum":[1]},"cleanup_scope":{"type":"string","enum":["workspace_and_channel"]},"slack_channel_source":{"type":"string","enum":["account_variables"]}},"required":["account_id","ready_count"],"additionalProperties":false},{"type":"object","properties":{"ready_count":{"type":"number","enum":[1]},"cleanup_scope":{"type":"string","enum":["workspace_and_channel"]},"slack_channel_source":{"type":"string","enum":["account_variables"]},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"minItems":1,"maxItems":30}},"required":["ready_count","cleanup_scope","account_ids"],"additionalProperties":false}]}},"required":["notion_demo_cleanup"],"additionalProperties":false},{"type":"object","properties":{"notion_demo_profile":{"type":"object","properties":{"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"minItems":1,"maxItems":30},"email_seed":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"template":{"type":"object","properties":{"version":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"subject":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\r\\n\\0]+$"},"body":{"type":"string","minLength":1,"maxLength":20000},"html_body":{"type":"string","minLength":1,"maxLength":40000}},"required":["version","subject","body"],"additionalProperties":false}},"additionalProperties":false}},"required":["account_ids"],"additionalProperties":false}},"required":["notion_demo_profile"],"additionalProperties":false},{"type":"object","properties":{"slack_channel":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"ready_count":{"type":"integer","minimum":1,"maximum":2000},"channel_prefix":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,59}$"},"purpose":{"type":"string","minLength":1,"maxLength":250},"min_age_hours":{"type":"number","minimum":0,"maximum":168},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000},"thread":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"after_hours":{"type":"number","minimum":0,"maximum":168},"reactions":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"name":{"type":"string","pattern":"^[a-z0-9_+'-]{1,64}$"}},"required":["speaker","name"],"additionalProperties":false},"maxItems":10}},"required":["id","speaker","text"],"additionalProperties":false},"maxItems":50},"report":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000}},"required":["speaker","text"],"additionalProperties":false},"fallback_channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^C[A-Z0-9]+$"},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,79}$"}},"required":["id","name"],"additionalProperties":false},"extensions":{"type":"object","properties":{"jira":{"type":"object","properties":{"space":{"type":"string","minLength":1,"maxLength":100},"project":{"type":"string","pattern":"^[A-Z][A-Z0-9]{0,9}$"}},"required":["space","project"],"additionalProperties":false},"aidan":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false}},"required":["account_id","ready_count","channel_prefix","history","fallback_channel"],"additionalProperties":false}},"required":["slack_channel"],"additionalProperties":false},{"type":"object","properties":{"atlassian_slack_channel":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"ready_count":{"type":"integer","minimum":1,"maximum":2000},"channel_prefix":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,59}$"},"purpose":{"type":"string","minLength":1,"maxLength":250},"jira_space":{"type":"string","minLength":1,"maxLength":100},"jira_project":{"type":"string","pattern":"^[A-Z][A-Z0-9]{0,9}$"},"jira_board":{"type":"object","properties":{"done_status":{"type":"string","minLength":1,"maxLength":100,"default":"Done"},"retire_after_minutes":{"type":"integer","minimum":0,"default":90},"columns":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","minLength":1,"maxLength":100},"repository":{"type":"string","format":"uri"},"links":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","format":"uri"}},"required":["title","url"],"additionalProperties":false}},"footnote":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":255},"type":{"type":"string","minLength":1,"maxLength":100,"default":"Task"},"priority":{"type":"string","minLength":1,"maxLength":100},"labels":{"type":"array","items":{"type":"string","pattern":"^\\S{1,255}$"}},"description":{"type":"string","minLength":1},"acceptance":{"type":"array","items":{"type":"string","minLength":1}}},"required":["summary","description"],"additionalProperties":false},"minItems":1}},"required":["status","items"],"additionalProperties":false},"minItems":1}},"required":["columns"],"additionalProperties":false},"min_age_hours":{"type":"number","minimum":0,"maximum":168},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000},"thread":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"after_hours":{"type":"number","minimum":0,"maximum":168},"reactions":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"name":{"type":"string","pattern":"^[a-z0-9_+'-]{1,64}$"}},"required":["speaker","name"],"additionalProperties":false},"maxItems":10}},"required":["id","speaker","text"],"additionalProperties":false},"maxItems":50},"report":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000}},"required":["speaker","text"],"additionalProperties":false},"fallback_channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^C[A-Z0-9]+$"},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,79}$"}},"required":["id","name"],"additionalProperties":false}},"required":["account_id","ready_count","channel_prefix","jira_space","jira_project","history","fallback_channel"],"additionalProperties":false}},"required":["atlassian_slack_channel"],"additionalProperties":false}]},"vision":{"type":"object","properties":{"enabled":{"type":"boolean"},"proactive":{"type":"boolean"}},"required":["enabled","proactive"],"additionalProperties":true},"transcription_logger":{"type":"object","properties":{"org_id":{"type":"string","nullable":true,"format":"uuid"}},"required":["org_id"],"additionalProperties":true},"rag":{"type":"object","properties":{"enabled":{"type":"boolean"},"top_k":{"type":"integer","minimum":1,"maximum":100,"default":15}},"required":["enabled"],"additionalProperties":true},"pip":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":true},"pause":{"type":"object","properties":{"enabled":{"type":"boolean"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"presence":{"type":"object","properties":{"default":{"type":"string","enum":["tile","chip"]}},"additionalProperties":true},"stream_transcription":{"type":"object","properties":{"enabled":{"type":"boolean"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"advance_step":{"type":"object","properties":{"enabled":{"type":"boolean"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"avatar":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","nullable":true,"enum":["video","image",null]},"image_url":{"type":"string","nullable":true,"format":"uri"},"provider":{"type":"string","enum":["tavus","lemonslice","anam"]},"replica_id":{"type":"string"},"persona_id":{"type":"string"},"agent_image_url":{"type":"string","format":"uri"},"agent_id":{"type":"string"},"agent_prompt":{"type":"string"},"avatar_name":{"type":"string"},"avatar_id":{"type":"string"},"avatar_model":{"type":"string"},"avatar_participant_name":{"type":"string"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"skills":{"type":"object","properties":{"enabled":{"type":"boolean"},"names":{"type":"array","items":{"type":"string","minLength":1}}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"mcp":{"type":"object","properties":{"mcpServers":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["http","streamable-http"]},"url":{"type":"string","format":"uri","pattern":"^https://"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["url"],"additionalProperties":true}}}},"dynamic_slides_generation":{"type":"object","properties":{"enabled":{"type":"boolean"},"opening":{"type":"boolean"}},"additionalProperties":true}},"required":["browser","vision","transcription_logger","rag","pip"],"additionalProperties":true},"nickel_endpoints":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"array","items":{"$ref":"#/components/schemas/NickelEndpoint"}}],"default":[]},"ui":{"type":"object","properties":{"call_action":{"type":"object","nullable":true,"properties":{"label":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"icon":{"type":"string","nullable":true,"enum":["calendar","phone","message","mail","cart","sparkles",null]}},"required":["label","message"]},"intro":{"type":"object","properties":{"title":{"type":"string","minLength":1},"cta_text":{"type":"string","minLength":1},"page_url":{"type":"string","format":"uri","pattern":"^https://"},"show_powered_by":{"type":"boolean"}},"required":["title","cta_text"]},"outro":{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"cta_text":{"type":"string","minLength":1}},"required":["title","subtitle","cta_text"]},"call_providers":{"type":"array","nullable":true,"items":{"type":"string","enum":["web","zoom","google_meet"]}},"network_fallback":{"type":"string","nullable":true,"enum":["google_meet","zoom",null]},"mic_interaction":{"type":"string","enum":["push-to-talk","toggle"]},"hide_login_form":{"type":"boolean","nullable":true},"login_form_over_call":{"type":"boolean","nullable":true},"auto_start":{"type":"boolean","nullable":true},"auto_resume":{"type":"boolean","nullable":true},"subtitles":{"type":"string","nullable":true,"enum":["on","off",null]}},"additionalProperties":true},"language":{"type":"string","minLength":2,"maxLength":10},"tutorial_enabled":{"type":"boolean"},"participant_profiles":{"type":"string","enum":["off","call","remember"]},"participant_memory_disabled":{"type":"boolean"},"company_research_enabled":{"type":"boolean"},"person_research_enabled":{"type":"boolean"},"participant_profiles_enabled":{"type":"boolean"},"caller_lookup_enabled":{"type":"boolean"},"identity_resolver_enabled":{"type":"boolean"},"email_verification_enabled":{"type":"boolean","nullable":true},"crm_email_lookup_policy":{"type":"string","enum":["off","verified_only","any_email"],"description":"CRM email access for this agent. Omission means verified_only. off disables during-call lookup without changing named-link mappings. any_email allows lookup using an unverified visitor-supplied email."},"email_verification_timing":{"type":"string","nullable":true,"enum":["before_call","during_call",null]},"email_verification_method":{"type":"string","nullable":true,"enum":["code","domain_check",null],"description":"How a visitor earns the email pass. code (the default) emails a one-time code; domain_check admits any address that passes the work-email and mail-domain checks, without a code."},"qualification":{"type":"object","properties":{"criteria":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]{0,63}$"},"fact":{"type":"string","enum":["company.annual_revenue","company.employees","company.sales_headcount"]},"at_least":{"type":"number","minimum":0}},"required":["id","fact","at_least"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]{0,63}$"},"question":{"type":"string","minLength":1,"maxLength":600},"yes":{"type":"string","minLength":1,"maxLength":600},"no":{"type":"string","minLength":1,"maxLength":600}},"required":["id","question","yes","no"],"additionalProperties":false}]},"minItems":1,"maxItems":12},"qualified_when":{"type":"string","maxLength":600}},"required":["criteria","qualified_when"],"additionalProperties":false},"caller_enrichers":{"type":"array","items":{"type":"string","enum":["web_lookup","gravatar","apollo"]},"maxItems":5},"research_focus":{"type":"string","maxLength":600},"personalization":{"type":"object","properties":{"remember":{"type":"string","enum":["off","call","always"]},"look_up":{"type":"string","enum":["off","company","company_and_person"]},"focus":{"type":"string","maxLength":600},"caller_location":{"type":"boolean"}},"required":["remember","look_up"],"additionalProperties":false},"sable_intro":{"type":"string","enum":["self","opening"],"description":"How this agent introduces Sable. Off by default. A browser has met Sable once a visitor's call with any agent that sets either value connected and the agent spoke, in any organization; calls placed by Sable staff and simulations never count. `self`: the agent introduces Sable itself, with the Sable intro skill or its own way, and is told, in its visitor context, when the browser already has (`already introduced to Sable on an earlier call: yes`) so its prompt can skip the intro. `opening`: each call opens with Sable's own intro agent, which hands over to this agent when the intro ends, unless the browser already met Sable; needs `SABLE_OPENING_AGENT_ID` set on the API, and without it the call has no intro."},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"tts":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true,"minLength":1},"model":{"type":"string","nullable":true,"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_turbo_v2","eleven_turbo_v2_5","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3.6-2026-08-27","flux-hannah-en","flux-kit-en","flux-alexis-en","flux-cliff-en","flux-sienna-en","flux-cole-en","flux-brooke-en","flux-colin-en","flux-gemma-en","flux-haley-en","flux-heather-en","flux-miles-en","flux-sean-en","flux-bree-en","flux-brittany-en","flux-bruce-en","flux-conor-en","flux-donovan-en","flux-drew-en","flux-elise-en","flux-jack-en","flux-kai-en","flux-kelsey-en","flux-maeve-en","flux-marcelo-en","flux-marcus-en","flux-meena-en","flux-meghan-en","flux-naveen-en","flux-paige-en","flux-priya-en","flux-rufus-en","flux-sharon-en","flux-tanner-en","flux-wade-en","flux-wes-en","coda","mistv3","speech-2.8-turbo","gemini-3.8-flash-lite-tts","gemini-3.8-flash-tts",null]},"voice_switching":{"type":"boolean"},"voices":{"type":"array","items":{"type":"string","minLength":1}},"voice_metadata":{"type":"object","nullable":true,"properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"gender":{"type":"string","enum":["feminine","masculine","neutral"]}},"required":["provider","voice_id","model","gender"]},"pronunciation_terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"]},"validated_on":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true}},"required":["provider","voice_id","model"]},"sample_sentence":{"type":"string"},"label":{"type":"string","maxLength":200},"language":{"type":"string","default":"en"}},"required":["term","replace","class"],"additionalProperties":true},"maxItems":50},"pronunciation_rules":{"type":"array","items":{"type":"object","properties":{"string_to_replace":{"type":"string","minLength":1},"type":{"type":"string","enum":["alias","phoneme"]},"alias":{"type":"string"},"phoneme":{"type":"string"},"alphabet":{"type":"string","enum":["ipa","cmu","arpabet"]}},"required":["string_to_replace","type"],"additionalProperties":true}},"pronunciation_dictionary_id":{"type":"string","nullable":true},"pronunciation_dictionary_version_id":{"type":"string","nullable":true},"pronunciation_dictionary_rules_hash":{"type":"string","nullable":true}},"additionalProperties":true}},"required":["id","name"],"additionalProperties":true}},"avatars":{"type":"array","items":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","nullable":true,"enum":["video","image",null]},"image_url":{"type":"string","nullable":true,"format":"uri"},"provider":{"type":"string","enum":["tavus","lemonslice","anam"]},"replica_id":{"type":"string"},"persona_id":{"type":"string"},"agent_image_url":{"type":"string","format":"uri"},"agent_id":{"type":"string"},"agent_prompt":{"type":"string"},"avatar_name":{"type":"string"},"avatar_id":{"type":"string"},"avatar_model":{"type":"string"},"avatar_participant_name":{"type":"string"},"id":{"type":"string","minLength":1},"prestart":{"type":"boolean"}},"required":["id"],"additionalProperties":true}}},"required":["name","environment","custom_tools","llm","stt","tts","components"],"additionalProperties":true,"example":null},"InstructionsMediaItem":{"type":"object","properties":{"languages":{"type":"object","additionalProperties":{"type":"string"},"description":"This item's address in each call language, by language code."}},"additionalProperties":true},"ActionRef":{"type":"object","properties":{"type":{"type":"string"},"category":{"type":"string"},"params":{"type":"object","additionalProperties":true}},"required":["type","category"],"additionalProperties":true},"Stage":{"type":"object","properties":{"name":{"type":"string","example":"intro"},"instruction":{"type":"string","default":"","example":""},"goal":{"type":"string","default":"","example":"Welcome the user"},"guide_steps":{"type":"array","items":{"$ref":"#/components/schemas/GuideStep"}},"additional_context":{"type":"string"},"exit_criteria":{"type":"string"}},"required":["name"],"additionalProperties":true},"GuideStep":{"type":"object","properties":{"title":{"type":"string","example":"Platform overview"},"body":{"type":"string","example":"Explain the platform then {{wait}} for the user..."}},"required":["title","body"],"additionalProperties":true},"NickelEndpoint":{"type":"object","properties":{"url":{"type":"string","minLength":1},"turn_host":{"type":"string","default":""},"turn_user":{"type":"string","default":""},"turn_pass":{"type":"string","default":""},"signin_variables":{"type":"object","additionalProperties":{"type":"string"}},"region":{"type":"string"}},"required":["url"]},"ValidateAgentConfigResponse":{"type":"object","properties":{"valid":{"type":"boolean","description":"False means the config would be rejected at publish."},"resolved":{"allOf":[{"$ref":"#/components/schemas/AgentConfig"},{"description":"The exact config the platform would persist. Present only when valid."}]},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]},"description":"Present only when invalid."}},"required":["valid"]},"ValidateAgentConfigBody":{"type":"object","properties":{"config":{"type":"object","additionalProperties":true},"configPatch":{"type":"object","additionalProperties":true},"primaryLanguage":{"$ref":"#/components/schemas/PrimaryLanguage"}}},"PrimaryLanguage":{"type":"string","enum":["auto","af","ar","hy","az","be","bs","bg","ca","zh","hr","cs","da","nl","en","et","fi","fr","gl","de","el","he","hi","hu","is","id","it","ja","kn","kk","ko","lv","lt","mk","ms","mr","mi","ne","no","fa","pl","pt","ro","ru","sr","sk","sl","es","sw","sv","tl","ta","th","tr","uk","ur","vi","cy"],"description":"Primary conversation language. Either an ISO-639-1 code or the sentinel \"auto\" for provider auto-detect. The server writes this to the config's root `language` field under an advisory lock."},"ApplyAgentConfigResponse":{"type":"object","properties":{"applied":{"type":"boolean"},"created":{"type":"boolean"},"wouldCreate":{"type":"boolean"},"reason":{"type":"string","enum":["changed","unchanged"]},"dryRun":{"type":"boolean"},"etag":{"type":"string","nullable":true,"description":"The version now live. Send it back as `etag` on the next apply."},"versionNumber":{"type":"number","nullable":true}},"required":["applied","reason","dryRun","etag","versionNumber"]},"ApplyAgentConfigConflict":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"conflict":{"type":"object","properties":{"etag":{"type":"string","nullable":true},"versionNumber":{"type":"number","nullable":true},"lastEditedByEmail":{"type":"string","nullable":true},"config":{"type":"object","additionalProperties":true}},"required":["etag","versionNumber","lastEditedByEmail","config"]}},"required":["error"]},"ApplyBySlugBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"slug":{"type":"string","maxLength":63,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","example":"acme-demo"},"name":{"type":"string","minLength":1},"config":{"type":"object","additionalProperties":true},"etag":{"type":"string","nullable":true,"format":"uuid"},"sourceRef":{"type":"string","minLength":1},"comment":{"type":"string"},"dryRun":{"type":"boolean"},"env":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"example":"locked-1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"Pin the applied version to this environment. Omit to preserve it; Sable admins may set or clear it with null."}},"required":["orgId","slug","name","config","etag"]},"AgentConfigVersionResponse":{"type":"object","properties":{"configVersion":{"$ref":"#/components/schemas/AgentConfigVersion"}},"required":["configVersion"]},"CreateAgentConfigBody":{"type":"object","properties":{"orgId":{"type":"number"},"agentId":{"type":"number"},"expiresAt":{"type":"string","format":"date-time"},"comment":{"type":"string","maxLength":1000},"config":{"$ref":"#/components/schemas/AgentConfig"}},"required":["config"],"additionalProperties":false},"AgentConfigDraft":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentId":{"type":"number"},"versionNumber":{"type":"number"},"status":{"type":"string","enum":["draft"]},"config":{"$ref":"#/components/schemas/AgentConfig"},"lastEditedByAuthId":{"type":"string","nullable":true,"format":"uuid"},"lastEditedByName":{"type":"string","nullable":true},"lastEditedByEmail":{"type":"string","nullable":true},"lastEditedAt":{"type":"string","nullable":true,"format":"date-time"},"reviewRequestedAt":{"type":"string","nullable":true,"format":"date-time","description":"When a non-Sable user attempted to publish a browser-moment journey."},"createdAt":{"type":"string","format":"date-time"}},"required":["id","agentId","versionNumber","status","config","lastEditedByAuthId","lastEditedByName","lastEditedByEmail","lastEditedAt","reviewRequestedAt","createdAt"]},"SaveAgentConfigDraftBody":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/AgentConfig"},"expectedLastEditedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["config"]},"PatchAgentConfigDraftResponse":{"type":"object","properties":{"dryRun":{"type":"boolean"},"draft":{"allOf":[{"$ref":"#/components/schemas/AgentConfigDraft"},{"description":"The saved draft. Absent on a dry run, where nothing was written."}]},"config":{"allOf":[{"$ref":"#/components/schemas/AgentConfig"},{"description":"The config the ops produced. Present ONLY on a dry run — on a real save the same value is already on `draft.config`, and returning it twice would double a payload that runs to hundreds of KB."}]}},"required":["dryRun"]},"PatchAgentConfigDraftBody":{"type":"object","properties":{"ops":{"type":"array","items":{"$ref":"#/components/schemas/JsonPatchOp"},"minItems":1,"maxItems":200,"description":"Applied in order, all-or-nothing. Paths must target `/instructions` or below — publish merges only that subtree onto the live config, so an edit elsewhere would be saved to the draft and then silently discarded. Pair every mutating op with a `test` op on the same path: array indices shift when another editor inserts or removes, and a `test` turns that into a clean failure instead of a silent edit to the wrong element."},"expectedLastEditedAt":{"type":"string","nullable":true,"format":"date-time","description":"Optimistic-concurrency stamp from the draft you read. `null` asserts you observed NO open draft. Omit to skip the check (last write wins)."},"dryRun":{"type":"boolean","default":false,"description":"Run the ops and every validation stage, return the resulting draft, and write nothing. Nothing is persisted and no draft is created."},"acknowledgeRetargets":{"type":"boolean","default":false,"description":"Accept transitions whose stored index now resolves to a different moment or step because the array around them shifted (removing moment 1 leaves `next_moment: 1` in range but pointing at what used to be moment 2). Rejected by default — set this only after reading the reported retargets and confirming each lands where you intend."}},"required":["ops"]},"JsonPatchOp":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add"]},"path":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"},"value":{"nullable":true}},"required":["op","path"]},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"path":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"}},"required":["op","path"]},{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"},"value":{"nullable":true}},"required":["op","path"]},{"type":"object","properties":{"op":{"type":"string","enum":["move"]},"path":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"},"from":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"}},"required":["op","path","from"]},{"type":"object","properties":{"op":{"type":"string","enum":["copy"]},"path":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"},"from":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"}},"required":["op","path","from"]},{"type":"object","properties":{"op":{"type":"string","enum":["test"]},"path":{"type":"string","pattern":"^(?:|(?:\\/(?:[^~/]|~[01])*)+)$"},"value":{"nullable":true}},"required":["op","path"]}],"description":"One RFC 6902 operation. Paths are JSON Pointers into the agent config root (so the journey lives at /instructions/moments). Use \"-\" as the last token to append to an array, and escape \"~\" as \"~0\" and \"/\" as \"~1\"."},"DiscardDraftResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"PublishAgentConfigBody":{"type":"object","properties":{"expectedDraftVersionId":{"type":"string","format":"uuid"},"expectedLastEditedAt":{"type":"string","nullable":true,"format":"date-time"},"asRole":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"env":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"example":"locked-1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"Pin the published version to this environment. Omit to preserve it; Sable admins may set or clear it with null."}},"required":["expectedDraftVersionId","expectedLastEditedAt"]},"CopilotSourceAuthoringGuide":{"type":"object","properties":{"instructions":{"type":"string"}},"required":["instructions"]},"CopilotSourceProposalReceipt":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"artifact":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"}},"required":["id","url"]},"metadata":{"nullable":true},"fileCount":{"type":"number"},"skillCount":{"type":"number"},"published":{"type":"boolean","enum":[false]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string"},"path":{"type":"string"}},"required":["rule","severity","message"]}}},"required":["ok","artifact","fileCount","skillCount","published"]},"CopilotSourceProposalBody":{"type":"object","properties":{"files":{"type":"object","properties":{},"additionalProperties":{"type":"string"},"propertyNames":{"minLength":1}},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["files"]},"CopilotSourceProposalArtifact":{"type":"object","additionalProperties":true},"RuntimeRevisionStatusResponse":{"type":"object","properties":{"status":{"type":"object","nullable":true,"properties":{"mainRevision":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"commitsBehind":{"type":"integer","minimum":0}},"required":["mainRevision","commitsBehind"]}},"required":["status"]},"RuntimeChangelogResponse":{"type":"object","properties":{"changelog":{"type":"object","nullable":true,"properties":{"head":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"commitsBehind":{"type":"integer","minimum":0},"entries":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeChangelogEntry"},"description":"Breaking entries first, then newest"},"entriesOmitted":{"type":"integer","minimum":0,"description":"Older entries left out of a long gap"},"unreadable":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["path","url"]},"description":"Entry files that do not follow the changelog format"},"otherChanges":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeChange"},"description":"Commits without an entry, newest first"},"otherChangesTruncated":{"type":"boolean","description":"The gap is longer than the 100 newest commits listed, so the list stops there"}},"required":["head","commitsBehind","entries","entriesOmitted","unreadable","otherChanges","otherChangesTruncated"]}},"required":["changelog"]},"RuntimeChangelogEntry":{"type":"object","properties":{"path":{"type":"string","example":"changelog.d/2675.md"},"prNumber":{"type":"integer","nullable":true},"prUrl":{"type":"string","nullable":true,"format":"uri"},"type":{"type":"string","enum":["added","changed","deprecated","removed","fixed","security"]},"breaking":{"type":"boolean"},"issues":{"type":"array","items":{"type":"string"},"example":["ENG-207"]},"related":{"type":"array","items":{"type":"string"},"example":["sable-inc/platform#3072"]},"note":{"type":"string"}},"required":["path","prNumber","prUrl","type","breaking","issues","related","note"]},"RuntimeChange":{"type":"object","properties":{"sha":{"type":"string"},"title":{"type":"string"},"prNumber":{"type":"integer","nullable":true},"url":{"type":"string","format":"uri"}},"required":["sha","title","prNumber","url"]},"RuntimeDeploymentsResponse":{"type":"object","properties":{"deployments":{"type":"object","nullable":true,"properties":{"mainRevision":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeDeploymentGroup"}}},"required":["mainRevision","groups"]}},"required":["deployments"]},"RuntimeDeploymentGroup":{"type":"object","properties":{"kind":{"type":"string","enum":["pinned","following"]},"environment":{"type":"string","nullable":true,"description":"The environment a following group tracks"},"revision":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"Null when the environment's build is unknown"},"mainCommit":{"type":"string","nullable":true,"description":"Where the revision sits on main: itself, or where its branch left main"},"onMain":{"type":"boolean"},"commitsBehind":{"type":"integer","nullable":true,"minimum":0,"description":"Main commits after `mainCommit`, which is also its index in main's history"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeDeployment"}}},"required":["kind","environment","revision","mainCommit","onMain","commitsBehind","deployments"]},"RuntimeDeployment":{"type":"object","properties":{"agentPublicId":{"type":"string"},"agentName":{"type":"string"},"agentSlug":{"type":"string"},"orgPublicId":{"type":"string"},"orgName":{"type":"string"},"locked":{"type":"boolean"},"lockExpiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["agentPublicId","agentName","agentSlug","orgPublicId","orgName","locked","lockExpiresAt"]},"RuntimePinsResponse":{"type":"object","properties":{"revision":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeDeployment"}}},"required":["revision","agents"]},"RuntimeHistoryResponse":{"type":"object","properties":{"history":{"type":"object","nullable":true,"properties":{"head":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"page":{"type":"integer"},"commits":{"type":"array","items":{"$ref":"#/components/schemas/RuntimeHistoryCommit"}},"nextPage":{"type":"integer","nullable":true}},"required":["head","page","commits","nextPage"]}},"required":["history"]},"RuntimeHistoryCommit":{"type":"object","properties":{"sha":{"type":"string"},"title":{"type":"string"},"prNumber":{"type":"integer","nullable":true},"prUrl":{"type":"string","nullable":true,"format":"uri"},"url":{"type":"string","format":"uri"},"committedAt":{"type":"string"},"entry":{"type":"object","nullable":true,"properties":{"path":{"type":"string","example":"changelog.d/2675.md"},"prNumber":{"type":"integer","nullable":true},"prUrl":{"type":"string","nullable":true,"format":"uri"},"type":{"type":"string","enum":["added","changed","deprecated","removed","fixed","security"]},"breaking":{"type":"boolean"},"issues":{"type":"array","items":{"type":"string"},"example":["ENG-207"]},"related":{"type":"array","items":{"type":"string"},"example":["sable-inc/platform#3072"]},"note":{"type":"string"}},"required":["path","prNumber","prUrl","type","breaking","issues","related","note"]}},"required":["sha","title","prNumber","prUrl","url","committedAt","entry"]},"RuntimeChangelogSummaryResponse":{"type":"object","properties":{"summary":{"type":"string","nullable":true,"description":"Null when there are no entries or the model is unavailable"}},"required":["summary"]},"CurrentRuntimeRevisionResponse":{"type":"object","properties":{"current":{"type":"object","nullable":true,"properties":{"revision":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"source":{"type":"string","enum":["link_pin","agent_pin","latest"]},"environment":{"type":"string","example":"cherry"}},"required":["revision","environment"]}},"required":["current"]},"AgentRuntimeResponse":{"type":"object","properties":{"agent":{"type":"object","properties":{"publicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a"},"name":{"type":"string","example":"Demo Agent"},"slug":{"type":"string","example":"demo-agent"},"createdAt":{"type":"string","format":"date-time","example":"2026-11-10T03:00:00.000Z","description":"When the agent was created; the call page gives agents created after a cutoff the new call UI."}},"required":["publicId","name","slug","createdAt"]},"config":{"type":"object","nullable":true,"properties":{"name":{"type":"string","minLength":1},"greeting_instructions":{"type":"string","default":""},"environment":{"type":"string","enum":["development","staging","production"]},"custom_tools":{"type":"boolean"},"builtin_tools":{"type":"object","additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":true}]}},"instructions":{"type":"object","properties":{"template":{"type":"string"},"media":{"type":"array","items":{"$ref":"#/components/schemas/InstructionsMediaItem"}},"system_sections":{"type":"object","additionalProperties":{"type":"string"}},"behavior":{"anyOf":[{"type":"object","properties":{"personality":{"type":"string","nullable":true,"description":"Resolved personality. Omit or use null for the runtime default; an empty string disables this personality."}},"additionalProperties":true},{"nullable":true}]},"action_refs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ActionRef"}},"sable_system_prompt":{"type":"string","default":""},"customer_system_prompt":{"type":"string","default":""},"customer_stages":{"type":"array","items":{"$ref":"#/components/schemas/Stage"},"default":[]},"proactive_vision_prompt":{"type":"string","default":""}},"additionalProperties":true},"llm":{"type":"object","properties":{"turn_detection":{"type":"object","properties":{"type":{"type":"string","enum":["server_vad"]},"threshold":{"type":"number","minimum":0,"maximum":1},"silence_duration_ms":{"type":"integer","minimum":100,"maximum":2000}},"required":["type","threshold","silence_duration_ms"],"additionalProperties":true},"speed":{"type":"number","minimum":0.5,"maximum":1.5},"adaptive_speed":{"type":"boolean"},"voice":{"type":"string"}},"required":["turn_detection"],"additionalProperties":true},"stt":{"type":"object","properties":{"model":{"type":"string","nullable":true,"minLength":1},"delay":{"type":"string","nullable":true,"enum":["minimal","low","medium","high","xhigh",null]},"language_hints":{"type":"array","nullable":true,"items":{"type":"string","minLength":1}},"keywords":{"type":"array","nullable":true,"items":{"type":"string","minLength":1}},"prompt":{"type":"string","nullable":true},"barge_in":{"type":"string","nullable":true,"enum":["cut","judge","listen","confirm",null]}},"additionalProperties":true},"tts":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true,"minLength":1},"model":{"type":"string","nullable":true,"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_turbo_v2","eleven_turbo_v2_5","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3.6-2026-08-27","flux-hannah-en","flux-kit-en","flux-alexis-en","flux-cliff-en","flux-sienna-en","flux-cole-en","flux-brooke-en","flux-colin-en","flux-gemma-en","flux-haley-en","flux-heather-en","flux-miles-en","flux-sean-en","flux-bree-en","flux-brittany-en","flux-bruce-en","flux-conor-en","flux-donovan-en","flux-drew-en","flux-elise-en","flux-jack-en","flux-kai-en","flux-kelsey-en","flux-maeve-en","flux-marcelo-en","flux-marcus-en","flux-meena-en","flux-meghan-en","flux-naveen-en","flux-paige-en","flux-priya-en","flux-rufus-en","flux-sharon-en","flux-tanner-en","flux-wade-en","flux-wes-en","coda","mistv3","speech-2.8-turbo","gemini-3.8-flash-lite-tts","gemini-3.8-flash-tts",null]},"voice_switching":{"type":"boolean"},"voices":{"type":"array","items":{"type":"string","minLength":1}},"voice_metadata":{"type":"object","nullable":true,"properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"gender":{"type":"string","enum":["feminine","masculine","neutral"]}},"required":["provider","voice_id","model","gender"]},"pronunciation_terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"]},"validated_on":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true}},"required":["provider","voice_id","model"]},"sample_sentence":{"type":"string"},"label":{"type":"string","maxLength":200},"language":{"type":"string","default":"en"}},"required":["term","replace","class"],"additionalProperties":true},"maxItems":100},"pronunciation_rules":{"type":"array","items":{"type":"object","properties":{"string_to_replace":{"type":"string","minLength":1},"type":{"type":"string","enum":["alias","phoneme"]},"alias":{"type":"string"},"phoneme":{"type":"string"},"alphabet":{"type":"string","enum":["ipa","cmu","arpabet"]}},"required":["string_to_replace","type"],"additionalProperties":true}},"pronunciation_dictionary_id":{"type":"string","nullable":true},"pronunciation_dictionary_version_id":{"type":"string","nullable":true},"pronunciation_dictionary_rules_hash":{"type":"string","nullable":true}},"required":["provider","voice_id","model"],"additionalProperties":true},"room":{"type":"object","properties":{},"additionalProperties":true},"components":{"type":"object","properties":{"browser":{"type":"object","properties":{"enabled":{"type":"boolean"},"enable_streaming":{"type":"boolean"},"mcp_server_dir":{"type":"string","nullable":true,"minLength":1},"root_url":{"type":"string","format":"uri"},"root_urls":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["name","url"]}},{"type":"object","additionalProperties":{"type":"string","format":"uri"}}]},"signin_variables":{"type":"object","additionalProperties":{"type":"string"}},"signin_actions":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}},{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}]},"exit_actions":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}},{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}]},"clear_browser_data":{"type":"boolean"},"user_blocked_regions":{"type":"array","items":{"type":"string"}},"user_blocked_fallback_message":{"type":"string"},"user_blocked_shortcuts":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,199}$"},"minItems":1}},"required":["enabled","enable_streaming","mcp_server_dir"],"additionalProperties":true},"session_preparation":{"anyOf":[{"type":"object","properties":{"figma_demo":{"anyOf":[{"type":"object","properties":{"pool_agent_id":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}}},"required":["pool_agent_id"],"additionalProperties":false},{"type":"object","properties":{"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}}},"required":["read_from_pool","runtime_account_ids"],"additionalProperties":false},{"type":"object","properties":{"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"recipes":{"type":"array","items":{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments"],"additionalProperties":false},"minItems":1},"ready_count":{"type":"integer","minimum":1},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30}},"required":["write_to_pool","recipes","ready_count","maintenance_account_ids","runtime_account_ids"],"additionalProperties":false},{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100},"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments","account_id"],"additionalProperties":false},"minItems":1},"ready_count":{"type":"integer","minimum":1},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"}},"required":["recipes"],"additionalProperties":false},{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100},"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments","account_id"],"additionalProperties":false},{"type":"object","properties":{"template_file_key":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"baseline_version_name":{"type":"string","minLength":1,"maxLength":200},"check_availability":{"type":"boolean","enum":[true]},"destination":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"},"folder_id":{"type":"string","pattern":"^\\d+$"},"org_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id","folder_id"],"additionalProperties":false},"ready_count":{"type":"integer","minimum":1},"source_file_keys":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]+$"},"minItems":1,"maxItems":20},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+:\\d+$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"minItems":1,"maxItems":100},"comments":{"type":"array","items":{"type":"object","properties":{"author_id":{"type":"string","pattern":"^\\d+$"},"message":{"type":"string","minLength":1,"maxLength":10000},"node_id":{"type":"string","pattern":"^\\d+:\\d+$"},"x":{"type":"number"},"y":{"type":"number"}},"required":["author_id","message","node_id","x","y"]},"minItems":1,"maxItems":100},"shared_with_agents":{"type":"array","items":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"maxItems":30},"maintenance_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"runtime_account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"}},"write_to_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"read_from_pool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$"},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"minItems":1,"maxItems":30}},"required":["template_file_key","baseline_version_name","ready_count","source_file_keys","pages","comments","account_ids"],"additionalProperties":false}]}},"required":["figma_demo"],"additionalProperties":false},{"type":"object","properties":{"notion_demo_cleanup":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"ready_count":{"type":"number","enum":[1]},"cleanup_scope":{"type":"string","enum":["workspace_and_channel"]},"slack_channel_source":{"type":"string","enum":["account_variables"]}},"required":["account_id","ready_count"],"additionalProperties":false},{"type":"object","properties":{"ready_count":{"type":"number","enum":[1]},"cleanup_scope":{"type":"string","enum":["workspace_and_channel"]},"slack_channel_source":{"type":"string","enum":["account_variables"]},"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"minItems":1,"maxItems":30}},"required":["ready_count","cleanup_scope","account_ids"],"additionalProperties":false}]}},"required":["notion_demo_cleanup"],"additionalProperties":false},{"type":"object","properties":{"notion_demo_profile":{"type":"object","properties":{"account_ids":{"type":"array","items":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"minItems":1,"maxItems":30},"email_seed":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"template":{"type":"object","properties":{"version":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},"subject":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\r\\n\\0]+$"},"body":{"type":"string","minLength":1,"maxLength":20000},"html_body":{"type":"string","minLength":1,"maxLength":40000}},"required":["version","subject","body"],"additionalProperties":false}},"additionalProperties":false}},"required":["account_ids"],"additionalProperties":false}},"required":["notion_demo_profile"],"additionalProperties":false},{"type":"object","properties":{"slack_channel":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"ready_count":{"type":"integer","minimum":1,"maximum":2000},"channel_prefix":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,59}$"},"purpose":{"type":"string","minLength":1,"maxLength":250},"min_age_hours":{"type":"number","minimum":0,"maximum":168},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000},"thread":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"after_hours":{"type":"number","minimum":0,"maximum":168},"reactions":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"name":{"type":"string","pattern":"^[a-z0-9_+'-]{1,64}$"}},"required":["speaker","name"],"additionalProperties":false},"maxItems":10}},"required":["id","speaker","text"],"additionalProperties":false},"maxItems":50},"report":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000}},"required":["speaker","text"],"additionalProperties":false},"fallback_channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^C[A-Z0-9]+$"},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,79}$"}},"required":["id","name"],"additionalProperties":false},"extensions":{"type":"object","properties":{"jira":{"type":"object","properties":{"space":{"type":"string","minLength":1,"maxLength":100},"project":{"type":"string","pattern":"^[A-Z][A-Z0-9]{0,9}$"}},"required":["space","project"],"additionalProperties":false},"aidan":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false}},"required":["account_id","ready_count","channel_prefix","history","fallback_channel"],"additionalProperties":false}},"required":["slack_channel"],"additionalProperties":false},{"type":"object","properties":{"atlassian_slack_channel":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^acc_[A-Za-z0-9]+$"},"ready_count":{"type":"integer","minimum":1,"maximum":2000},"channel_prefix":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,59}$"},"purpose":{"type":"string","minLength":1,"maxLength":250},"jira_space":{"type":"string","minLength":1,"maxLength":100},"jira_project":{"type":"string","pattern":"^[A-Z][A-Z0-9]{0,9}$"},"jira_board":{"type":"object","properties":{"done_status":{"type":"string","minLength":1,"maxLength":100,"default":"Done"},"retire_after_minutes":{"type":"integer","minimum":0,"default":90},"columns":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","minLength":1,"maxLength":100},"repository":{"type":"string","format":"uri"},"links":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","format":"uri"}},"required":["title","url"],"additionalProperties":false}},"footnote":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"object","properties":{"summary":{"type":"string","minLength":1,"maxLength":255},"type":{"type":"string","minLength":1,"maxLength":100,"default":"Task"},"priority":{"type":"string","minLength":1,"maxLength":100},"labels":{"type":"array","items":{"type":"string","pattern":"^\\S{1,255}$"}},"description":{"type":"string","minLength":1},"acceptance":{"type":"array","items":{"type":"string","minLength":1}}},"required":["summary","description"],"additionalProperties":false},"minItems":1}},"required":["status","items"],"additionalProperties":false},"minItems":1}},"required":["columns"],"additionalProperties":false},"min_age_hours":{"type":"number","minimum":0,"maximum":168},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000},"thread":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"after_hours":{"type":"number","minimum":0,"maximum":168},"reactions":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"name":{"type":"string","pattern":"^[a-z0-9_+'-]{1,64}$"}},"required":["speaker","name"],"additionalProperties":false},"maxItems":10}},"required":["id","speaker","text"],"additionalProperties":false},"maxItems":50},"report":{"type":"object","properties":{"speaker":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"text":{"type":"string","minLength":1,"maxLength":3000}},"required":["speaker","text"],"additionalProperties":false},"fallback_channel":{"type":"object","properties":{"id":{"type":"string","pattern":"^C[A-Z0-9]+$"},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,79}$"}},"required":["id","name"],"additionalProperties":false}},"required":["account_id","ready_count","channel_prefix","jira_space","jira_project","history","fallback_channel"],"additionalProperties":false}},"required":["atlassian_slack_channel"],"additionalProperties":false}]},"vision":{"type":"object","properties":{"enabled":{"type":"boolean"},"proactive":{"type":"boolean"}},"required":["enabled","proactive"],"additionalProperties":true},"transcription_logger":{"type":"object","properties":{"org_id":{"type":"string","nullable":true,"format":"uuid"}},"required":["org_id"],"additionalProperties":true},"rag":{"type":"object","properties":{"enabled":{"type":"boolean"},"top_k":{"type":"integer","minimum":1,"maximum":100,"default":15}},"required":["enabled"],"additionalProperties":true},"pip":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":true},"pause":{"type":"object","properties":{"enabled":{"type":"boolean"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"presence":{"type":"object","properties":{"default":{"type":"string","enum":["tile","chip"]}},"additionalProperties":true},"stream_transcription":{"type":"object","properties":{"enabled":{"type":"boolean"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"advance_step":{"type":"object","properties":{"enabled":{"type":"boolean"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"avatar":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","nullable":true,"enum":["video","image",null]},"image_url":{"type":"string","nullable":true,"format":"uri"},"provider":{"type":"string","enum":["tavus","lemonslice","anam"]},"replica_id":{"type":"string"},"persona_id":{"type":"string"},"agent_image_url":{"type":"string","format":"uri"},"agent_id":{"type":"string"},"agent_prompt":{"type":"string"},"avatar_name":{"type":"string"},"avatar_id":{"type":"string"},"avatar_model":{"type":"string"},"avatar_participant_name":{"type":"string"}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"skills":{"type":"object","properties":{"enabled":{"type":"boolean"},"names":{"type":"array","items":{"type":"string","minLength":1}}},"default":{"enabled":false},"required":["enabled"],"additionalProperties":true},"mcp":{"type":"object","properties":{"mcpServers":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["http","streamable-http"]},"url":{"type":"string","format":"uri","pattern":"^https://"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["url"],"additionalProperties":true}}}},"dynamic_slides_generation":{"type":"object","properties":{"enabled":{"type":"boolean"},"opening":{"type":"boolean"}},"additionalProperties":true}},"required":["browser","vision","transcription_logger","rag","pip"],"additionalProperties":true},"nickel_endpoints":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"array","items":{"$ref":"#/components/schemas/NickelEndpoint"}}],"default":[]},"ui":{"type":"object","properties":{"call_action":{"type":"object","nullable":true,"properties":{"label":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"icon":{"type":"string","nullable":true,"enum":["calendar","phone","message","mail","cart","sparkles",null]}},"required":["label","message"]},"intro":{"type":"object","properties":{"title":{"type":"string","minLength":1},"cta_text":{"type":"string","minLength":1},"page_url":{"type":"string","format":"uri","pattern":"^https://"},"show_powered_by":{"type":"boolean"}},"required":["title","cta_text"]},"outro":{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"cta_text":{"type":"string","minLength":1}},"required":["title","subtitle","cta_text"]},"call_providers":{"type":"array","nullable":true,"items":{"type":"string","enum":["web","zoom","google_meet"]}},"network_fallback":{"type":"string","nullable":true,"enum":["google_meet","zoom",null]},"mic_interaction":{"type":"string","enum":["push-to-talk","toggle"]},"hide_login_form":{"type":"boolean","nullable":true},"login_form_over_call":{"type":"boolean","nullable":true},"auto_start":{"type":"boolean","nullable":true},"auto_resume":{"type":"boolean","nullable":true},"subtitles":{"type":"string","nullable":true,"enum":["on","off",null]}},"additionalProperties":true},"language":{"type":"string","minLength":2,"maxLength":10},"tutorial_enabled":{"type":"boolean"},"participant_profiles":{"type":"string","enum":["off","call","remember"]},"participant_memory_disabled":{"type":"boolean"},"company_research_enabled":{"type":"boolean"},"person_research_enabled":{"type":"boolean"},"participant_profiles_enabled":{"type":"boolean"},"caller_lookup_enabled":{"type":"boolean"},"identity_resolver_enabled":{"type":"boolean"},"email_verification_enabled":{"type":"boolean","nullable":true},"crm_email_lookup_policy":{"type":"string","enum":["off","verified_only","any_email"],"description":"CRM email access for this agent. Omission means verified_only. off disables during-call lookup without changing named-link mappings. any_email allows lookup using an unverified visitor-supplied email."},"email_verification_timing":{"type":"string","nullable":true,"enum":["before_call","during_call",null]},"email_verification_method":{"type":"string","nullable":true,"enum":["code","domain_check",null],"description":"How a visitor earns the email pass. code (the default) emails a one-time code; domain_check admits any address that passes the work-email and mail-domain checks, without a code."},"qualification":{"type":"object","properties":{"criteria":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]{0,63}$"},"fact":{"type":"string","enum":["company.annual_revenue","company.employees","company.sales_headcount"]},"at_least":{"type":"number","minimum":0}},"required":["id","fact","at_least"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]{0,63}$"},"question":{"type":"string","minLength":1,"maxLength":600},"yes":{"type":"string","minLength":1,"maxLength":600},"no":{"type":"string","minLength":1,"maxLength":600}},"required":["id","question","yes","no"],"additionalProperties":false}]},"minItems":1,"maxItems":12},"qualified_when":{"type":"string","maxLength":600}},"required":["criteria","qualified_when"],"additionalProperties":false},"caller_enrichers":{"type":"array","items":{"type":"string","enum":["web_lookup","gravatar","apollo"]},"maxItems":5},"research_focus":{"type":"string","maxLength":600},"personalization":{"type":"object","properties":{"remember":{"type":"string","enum":["off","call","always"]},"look_up":{"type":"string","enum":["off","company","company_and_person"]},"focus":{"type":"string","maxLength":600},"caller_location":{"type":"boolean"}},"required":["remember","look_up"],"additionalProperties":false},"sable_intro":{"type":"string","enum":["self","opening"],"description":"How this agent introduces Sable. Off by default. A browser has met Sable once a visitor's call with any agent that sets either value connected and the agent spoke, in any organization; calls placed by Sable staff and simulations never count. `self`: the agent introduces Sable itself, with the Sable intro skill or its own way, and is told, in its visitor context, when the browser already has (`already introduced to Sable on an earlier call: yes`) so its prompt can skip the intro. `opening`: each call opens with Sable's own intro agent, which hands over to this agent when the intro ends, unless the browser already met Sable; needs `SABLE_OPENING_AGENT_ID` set on the API, and without it the call has no intro."},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"tts":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true,"minLength":1},"model":{"type":"string","nullable":true,"enum":["eleven_flash_v2","eleven_flash_v2_5","eleven_multilingual_v2","eleven_turbo_v2","eleven_turbo_v2_5","eleven_v3","eleven_v3_conversational","eleven_v4","eleven_v4_turbo","sonic-3.6-2026-08-27","flux-hannah-en","flux-kit-en","flux-alexis-en","flux-cliff-en","flux-sienna-en","flux-cole-en","flux-brooke-en","flux-colin-en","flux-gemma-en","flux-haley-en","flux-heather-en","flux-miles-en","flux-sean-en","flux-bree-en","flux-brittany-en","flux-bruce-en","flux-conor-en","flux-donovan-en","flux-drew-en","flux-elise-en","flux-jack-en","flux-kai-en","flux-kelsey-en","flux-maeve-en","flux-marcelo-en","flux-marcus-en","flux-meena-en","flux-meghan-en","flux-naveen-en","flux-paige-en","flux-priya-en","flux-rufus-en","flux-sharon-en","flux-tanner-en","flux-wade-en","flux-wes-en","coda","mistv3","speech-2.8-turbo","gemini-3.8-flash-lite-tts","gemini-3.8-flash-tts",null]},"voice_switching":{"type":"boolean"},"voices":{"type":"array","items":{"type":"string","minLength":1}},"voice_metadata":{"type":"object","nullable":true,"properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"gender":{"type":"string","enum":["feminine","masculine","neutral"]}},"required":["provider","voice_id","model","gender"]},"pronunciation_terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"]},"validated_on":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true}},"required":["provider","voice_id","model"]},"sample_sentence":{"type":"string"},"label":{"type":"string","maxLength":200},"language":{"type":"string","default":"en"}},"required":["term","replace","class"],"additionalProperties":true},"maxItems":50},"pronunciation_rules":{"type":"array","items":{"type":"object","properties":{"string_to_replace":{"type":"string","minLength":1},"type":{"type":"string","enum":["alias","phoneme"]},"alias":{"type":"string"},"phoneme":{"type":"string"},"alphabet":{"type":"string","enum":["ipa","cmu","arpabet"]}},"required":["string_to_replace","type"],"additionalProperties":true}},"pronunciation_dictionary_id":{"type":"string","nullable":true},"pronunciation_dictionary_version_id":{"type":"string","nullable":true},"pronunciation_dictionary_rules_hash":{"type":"string","nullable":true}},"additionalProperties":true}},"required":["id","name"],"additionalProperties":true}},"avatars":{"type":"array","items":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","nullable":true,"enum":["video","image",null]},"image_url":{"type":"string","nullable":true,"format":"uri"},"provider":{"type":"string","enum":["tavus","lemonslice","anam"]},"replica_id":{"type":"string"},"persona_id":{"type":"string"},"agent_image_url":{"type":"string","format":"uri"},"agent_id":{"type":"string"},"agent_prompt":{"type":"string"},"avatar_name":{"type":"string"},"avatar_id":{"type":"string"},"avatar_model":{"type":"string"},"avatar_participant_name":{"type":"string"},"id":{"type":"string","minLength":1},"prestart":{"type":"boolean"}},"required":["id"],"additionalProperties":true}},"visitor_context":{"type":"array","items":{"$ref":"#/components/schemas/VisitorContextEntry"},"maxItems":20},"opening":{"type":"object","properties":{"agent_id":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a"},"org":{"type":"string","example":"org_BWQ6MZx2XjGL3Y5i267HA"},"org_name":{"type":"string"},"config":{"type":"object","additionalProperties":true,"description":"The intro agent's resolved published config, as `GET /agents/{id}/published-config` serves it with its `branding` folded into `config.branding`, minus `visitor_context`, `call_continuation`, `agent_handoff` and `agent_transition`. It speaks for the customer the call is for, so the API sets two things on it, both absent when they cannot be resolved: `constants.company`, the customer's name (absent when it has no usable name), and `visitor_brand` `{name, primary, accent?, logo?, source: \"config\"}` (absent when there is no name or no valid `#rrggbb` primary colour; `accent` and `logo`, an https URL, are optional). The intro's own `visitor_brand` is always removed, so it never shows its own brand."}},"required":["agent_id","org","config"],"description":"Service-auth-only, on a live call (`callId`). The published agent this call opens with, embedded already resolved so the runtime fetches nothing, and handed over to this agent when it ends. Absent means no opening. Always derived by the API from `sable_intro`, and the browser's past calls; a stored `opening` key is dropped."},"research_context":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":128},"revision":{"type":"integer","minimum":0},"facts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"value":{"type":"string","minLength":1,"maxLength":512},"source":{"type":"string","enum":["research"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"as_of":{"type":"string","format":"date-time"}},"required":["name","value","source","url","as_of"]},"maxItems":4},"source":{"type":"string","minLength":1,"maxLength":300},"awaiting":{"type":"boolean"},"complete":{"type":"boolean"}},"required":["subject","revision","facts"]},"pinned_facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string","maxLength":500}},"required":["id","text"]},"maxItems":20,"description":"Facts a team member verified about the visitor, already filtered for what this call may see. Omitted when there are none."},"participant_profile":{"type":"object","properties":{"schema_version":{"type":"number","enum":[1]},"binding_id":{"type":"string","format":"uuid"},"generation":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"revision":{"type":"integer","minimum":0,"maximum":2147483647},"content":{"type":"object","nullable":true,"properties":{"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":120},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"text":{"type":"string","minLength":1,"maxLength":2000},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["crm","custom_link","form","call","web","unknown"]},"id":{"type":"string","minLength":1,"maxLength":300}},"required":["type","id"],"additionalProperties":false},"minItems":1,"maxItems":64}},"required":["id","text"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["key","title","items"],"additionalProperties":false},"maxItems":20},"card":{"type":"object","properties":{"location":{"type":"object","properties":{"value":{"type":"object","properties":{"city":{"type":"string","maxLength":128},"region":{"type":"string","maxLength":8},"country":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"whyTheyCame":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"whatMatters":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1,"maxItems":3},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"outcome":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"nextStep":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"title":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":120},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"profileUrl":{"type":"object","properties":{"value":{"type":"string","maxLength":1024,"format":"uri"},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"photo":{"type":"object","properties":{"value":{"type":"string","maxLength":1024,"format":"uri"},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"basedIn":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":120},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"background":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"links":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string","maxLength":1024,"format":"uri"},"minItems":1,"maxItems":3},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"enrichedFor":{"type":"string","pattern":"^[a-f0-9]{64}$"},"enrichPending":{"type":"boolean","enum":[true]}},"additionalProperties":false}},"required":["sections"],"additionalProperties":false},"research_sources":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":64}},"required":["schema_version","binding_id","generation","revision","content"],"additionalProperties":false,"description":"Service-auth-only profile for an authorized participant binding when the agent's `personalization.remember` is `call` or `always` (older configs: `participant_profiles` is `call` or `remember`, or `participant_profiles_enabled` is true and `participant_memory_disabled` is not true)."}},"required":["name","environment","custom_tools","llm","stt","tts","components"],"additionalProperties":true,"description":"Latest published agent config, null if none published. `research_context` and `visitor_context` are present only for a service-authed caller: the facts the link, the CRM or the pre-call form supplied about the person joining."},"configMeta":{"$ref":"#/components/schemas/AgentRuntimeConfigMeta"},"branding":{"type":"object","nullable":true,"properties":{"logo_url":{"type":"string","nullable":true,"default":null},"logo_lockup_url":{"type":"string","nullable":true,"default":null},"logo_alt":{"type":"string","nullable":true,"default":null},"brand_color":{"type":"string","nullable":true,"default":null},"avatar_label":{"type":"string","nullable":true,"default":null},"accent_color":{"type":"string","nullable":true,"default":null},"orb_color":{"type":"string","nullable":true,"default":null},"thinking_color":{"type":"string","nullable":true,"default":null},"agent_control_color":{"type":"string","nullable":true,"default":null},"background_color":{"type":"string","nullable":true,"default":null},"background_image_url":{"type":"string","nullable":true,"default":null,"description":"Background image URL applied behind pre-call surfaces (connecting, login, intro, outro)"},"font_family":{"type":"string","nullable":true,"default":null},"heading_font_family":{"type":"string","nullable":true,"default":null},"watermark_logo_url":{"type":"string","nullable":true,"default":null},"watermark_logo_dark_url":{"type":"string","nullable":true,"default":null},"watermark_logo_light_url":{"type":"string","nullable":true,"default":null},"intro_message":{"type":"string","nullable":true,"default":null},"intro_title":{"type":"string","nullable":true,"default":null,"description":"Intro headline. Rendered in the primary text color. Overrides the agent's intro title."},"intro_cta_text":{"type":"string","nullable":true,"default":null,"description":"Intro CTA button label. Overrides the agent's intro CTA text."},"loading_slides":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LoadingSlide"},"default":null},"busy_eyebrow":{"type":"string","nullable":true,"default":null},"busy_title":{"type":"string","nullable":true,"default":null},"busy_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_label":{"type":"string","nullable":true,"default":null},"busy_return_label":{"type":"string","nullable":true,"default":null},"busy_return_url":{"type":"string","nullable":true,"default":null},"onboarding_steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"},"default":null},"browser_intro_logo":{"type":"boolean","nullable":true,"default":null},"browser_intro_text":{"type":"string","nullable":true,"default":null},"intro_mode":{"type":"string","nullable":true,"enum":["orb","branded",null],"default":null,"description":"Intro experience mode: orb (animated orb) or branded (hero image splash)"},"branded_hero_image_url":{"type":"string","nullable":true,"default":null,"description":"Hero image URL for branded intro mode"},"outro_feedback_enabled":{"type":"boolean","nullable":true,"default":null},"outro_rating_question":{"type":"string","nullable":true,"default":null},"outro_rating_style":{"type":"string","nullable":true,"enum":["stars","numeric",null],"default":null,"description":"Outro rating control style. null defaults to stars."},"outro_rating_scale_max":{"type":"integer","nullable":true,"minimum":1,"maximum":10,"default":null,"description":"Upper bound of the outro rating scale (1–N). null defaults to 5 for stars or 10 for numeric."},"outro_text_questions":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_title":{"type":"string","nullable":true,"default":null},"outro_subtitle":{"type":"string","nullable":true,"default":null},"outro_chip_question":{"type":"string","nullable":true,"default":null},"outro_chips":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_poll_question":{"type":"string","nullable":true,"default":null},"outro_poll_options":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_return_label":{"type":"string","nullable":true,"default":null},"outro_return_url":{"type":"string","nullable":true,"default":null},"outro_restart_label":{"type":"string","nullable":true,"default":null},"outro_cta_label":{"type":"string","nullable":true,"default":null},"outro_cta_url":{"type":"string","nullable":true,"default":null},"outro_text_field_placeholder":{"type":"string","nullable":true,"default":null},"outro_schedule_label":{"type":"string","nullable":true,"default":null},"outro_schedule_url":{"type":"string","nullable":true,"default":null},"outro_schedule_icon":{"type":"string","nullable":true,"default":null},"outro_schedule_description":{"type":"string","nullable":true,"default":null,"description":"Subtitle text shown under the schedule card on the outro screen."},"outro_share_enabled":{"type":"boolean","nullable":true,"default":null,"description":"Whether the share card is shown on the outro screen. null/true ⇒ shown, false ⇒ hidden."},"outro_share_label":{"type":"string","nullable":true,"default":null},"outro_share_description":{"type":"string","nullable":true,"default":null},"outro_share_url":{"type":"string","nullable":true,"default":null},"outro_share_icon":{"type":"string","nullable":true,"default":null},"outro_submit_label":{"type":"string","nullable":true,"default":null},"outro_thank_you_title":{"type":"string","nullable":true,"default":null},"outro_thank_you_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_url":{"type":"string","nullable":true,"default":null},"login_heading":{"type":"string","nullable":true,"default":null,"description":"Heading text on the login form (e.g. 'Learn to use'). Shown before the logo pill."},"login_subtitle":{"type":"string","nullable":true,"default":null,"description":"Subtitle / instructions shown below the heading on the login form."},"login_button_label":{"type":"string","nullable":true,"default":null,"description":"Submit button label on the login form. Defaults to 'Proceed'."},"link_preview_title":{"type":"string","nullable":true,"default":null,"description":"Title shown when a call link is unfurled in chat / social previews"},"link_preview_description":{"type":"string","nullable":true,"default":null,"description":"Description shown when a call link is unfurled in chat / social previews"}},"description":"Organization branding (logo, colors), null if not configured"},"agentBrandingOverrides":{"type":"object","nullable":true,"properties":{"logo_url":{"type":"string","nullable":true,"default":null},"logo_lockup_url":{"type":"string","nullable":true,"default":null},"logo_alt":{"type":"string","nullable":true,"default":null},"brand_color":{"type":"string","nullable":true,"default":null},"avatar_label":{"type":"string","nullable":true,"default":null},"accent_color":{"type":"string","nullable":true,"default":null},"orb_color":{"type":"string","nullable":true,"default":null},"thinking_color":{"type":"string","nullable":true,"default":null},"agent_control_color":{"type":"string","nullable":true,"default":null},"background_color":{"type":"string","nullable":true,"default":null},"background_image_url":{"type":"string","nullable":true,"default":null,"description":"Background image URL applied behind pre-call surfaces (connecting, login, intro, outro)"},"font_family":{"type":"string","nullable":true,"default":null},"heading_font_family":{"type":"string","nullable":true,"default":null},"watermark_logo_url":{"type":"string","nullable":true,"default":null},"watermark_logo_dark_url":{"type":"string","nullable":true,"default":null},"watermark_logo_light_url":{"type":"string","nullable":true,"default":null},"intro_message":{"type":"string","nullable":true,"default":null},"intro_title":{"type":"string","nullable":true,"default":null,"description":"Intro headline. Rendered in the primary text color. Overrides the agent's intro title."},"intro_cta_text":{"type":"string","nullable":true,"default":null,"description":"Intro CTA button label. Overrides the agent's intro CTA text."},"loading_slides":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LoadingSlide"},"default":null},"busy_eyebrow":{"type":"string","nullable":true,"default":null},"busy_title":{"type":"string","nullable":true,"default":null},"busy_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_label":{"type":"string","nullable":true,"default":null},"busy_return_label":{"type":"string","nullable":true,"default":null},"busy_return_url":{"type":"string","nullable":true,"default":null},"onboarding_steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"},"default":null},"browser_intro_logo":{"type":"boolean","nullable":true,"default":null},"browser_intro_text":{"type":"string","nullable":true,"default":null},"intro_mode":{"type":"string","nullable":true,"enum":["orb","branded",null],"default":null,"description":"Intro experience mode: orb (animated orb) or branded (hero image splash)"},"branded_hero_image_url":{"type":"string","nullable":true,"default":null,"description":"Hero image URL for branded intro mode"},"outro_feedback_enabled":{"type":"boolean","nullable":true,"default":null},"outro_rating_question":{"type":"string","nullable":true,"default":null},"outro_rating_style":{"type":"string","nullable":true,"enum":["stars","numeric",null],"default":null,"description":"Outro rating control style. null defaults to stars."},"outro_rating_scale_max":{"type":"integer","nullable":true,"minimum":1,"maximum":10,"default":null,"description":"Upper bound of the outro rating scale (1–N). null defaults to 5 for stars or 10 for numeric."},"outro_text_questions":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_title":{"type":"string","nullable":true,"default":null},"outro_subtitle":{"type":"string","nullable":true,"default":null},"outro_chip_question":{"type":"string","nullable":true,"default":null},"outro_chips":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_poll_question":{"type":"string","nullable":true,"default":null},"outro_poll_options":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_return_label":{"type":"string","nullable":true,"default":null},"outro_return_url":{"type":"string","nullable":true,"default":null},"outro_restart_label":{"type":"string","nullable":true,"default":null},"outro_cta_label":{"type":"string","nullable":true,"default":null},"outro_cta_url":{"type":"string","nullable":true,"default":null},"outro_text_field_placeholder":{"type":"string","nullable":true,"default":null},"outro_schedule_label":{"type":"string","nullable":true,"default":null},"outro_schedule_url":{"type":"string","nullable":true,"default":null},"outro_schedule_icon":{"type":"string","nullable":true,"default":null},"outro_schedule_description":{"type":"string","nullable":true,"default":null,"description":"Subtitle text shown under the schedule card on the outro screen."},"outro_share_enabled":{"type":"boolean","nullable":true,"default":null,"description":"Whether the share card is shown on the outro screen. null/true ⇒ shown, false ⇒ hidden."},"outro_share_label":{"type":"string","nullable":true,"default":null},"outro_share_description":{"type":"string","nullable":true,"default":null},"outro_share_url":{"type":"string","nullable":true,"default":null},"outro_share_icon":{"type":"string","nullable":true,"default":null},"outro_submit_label":{"type":"string","nullable":true,"default":null},"outro_thank_you_title":{"type":"string","nullable":true,"default":null},"outro_thank_you_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_url":{"type":"string","nullable":true,"default":null},"login_heading":{"type":"string","nullable":true,"default":null,"description":"Heading text on the login form (e.g. 'Learn to use'). Shown before the logo pill."},"login_subtitle":{"type":"string","nullable":true,"default":null,"description":"Subtitle / instructions shown below the heading on the login form."},"login_button_label":{"type":"string","nullable":true,"default":null,"description":"Submit button label on the login form. Defaults to 'Proceed'."},"link_preview_title":{"type":"string","nullable":true,"default":null,"description":"Title shown when a call link is unfurled in chat / social previews"},"link_preview_description":{"type":"string","nullable":true,"default":null,"description":"Description shown when a call link is unfurled in chat / social previews"}},"description":"Raw agent-level branding overrides (sparse, null if none set)"},"theme":{"type":"object","nullable":true,"additionalProperties":true,"description":"Migrated BrandingV2 theme: deep-merge of the org and agent branding layers (nested manifest shape, asset tokens resolved). Additive alongside the legacy `branding` field; null when no branding is set."},"brandingMeta":{"$ref":"#/components/schemas/AgentRuntimeBrandingMeta"},"organizationId":{"type":"string","nullable":true,"example":"org_BWQ6MZx2XjGL3Y5i267HA","description":"Public id of the organization that owns this agent — the tenant whose knowledge base the agent's RAG resolves against. A runtime serving several orgs from one deployment cannot know this from its own environment, and it is absent from `config`, so it is read here. Note both transports to the runtime keep only the `config` subtree, so this never travels in a claim: a caller-supplied tenant must not be able to select a knowledge base."},"organizationName":{"type":"string","nullable":true,"description":"Organization display name for the agent's org"},"verifiesEmail":{"type":"boolean","enum":[true],"description":"Present (true) when a call on this config must verify the visitor's email first. A pinned config is also gated when the published one is, so an old version can't switch the gate off."},"maintenanceMode":{"type":"boolean","description":"Whether the agent, or the active link it was resolved through, is in maintenance. true = offline (parley renders MaintenanceScene); absent/false = not in maintenance. Whether a call is refused for any reason is `unavailableCode`."},"unavailableCode":{"type":"string","example":"ORGANIZATION_SUSPENDED","description":"Present whenever a call through this agent would be refused: the error code it is refused with (`AGENT_UNAVAILABLE`, `DEPLOYMENT_LINK_UNAVAILABLE` or `ORGANIZATION_SUSPENDED`). Absent = available."},"canonicalPublicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a","description":"Present only when the requested identifier resolved through a redirect (released) link — the agent's own public id, so the caller can issue a permanent redirect to the canonical runtime address."}},"required":["agent","config","theme","brandingMeta"]},"VisitorContextEntry":{"type":"object","properties":{"name":{"type":"string","maxLength":64,"example":"company"},"value":{"type":"string","maxLength":512,"example":"Acme Robotics"},"source":{"type":"string","enum":["crm","authored","self_reported","browser"],"description":"Who supplied the fact: the connected CRM, whoever authored the link, the visitor on the pre-call form, or the visitor's browser and network (approximate country and local time). A self_reported fact is the person's own unverified words. Form facts take precedence over link and CRM facts with the same name; a trusted mid-call packet keeps those form facts."}},"required":["name","value","source"]},"AgentRuntimeConfigMeta":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["draft","published","archived","expired"]}},"required":["id","status"],"description":"Metadata for the returned config version (id + status). Null when no specific config version is in scope (e.g. agent default config)."},"LoadingSlide":{"type":"object","properties":{"image_url":{"type":"string","nullable":true,"default":null},"tip_text":{"type":"string"},"dot_color":{"type":"string","nullable":true,"default":null}},"required":["tip_text"]},"OnboardingStep":{"type":"object","properties":{"target":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"cta_text":{"type":"string"}},"required":["target","title","description","cta_text"]},"AgentRuntimeBrandingMeta":{"type":"object","properties":{"overriddenPaths":{"type":"array","items":{"type":"string"}}},"required":["overriddenPaths"],"description":"Metadata about the v2 theme. `overriddenPaths` lists the dot-paths the agent layer overrides (empty when the agent inherits everything from the org)."},"BrowserProfileResponse":{"type":"object","properties":{"known":{"type":"boolean","description":"Whether this browser has a non-revoked profile in the agent's organization."},"firstName":{"type":"string","nullable":true},"company":{"type":"string","nullable":true}},"required":["known","firstName","company"]},"AgentSkillsResponse":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"publicId":{"type":"string"},"type":{"type":"string","enum":["browser"],"example":"browser"},"markdown":{"type":"string"}},"required":["publicId","type","markdown"]}}},"required":["skills"]},"AgentListResponse":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}}},"required":["agents"]},"Agent":{"type":"object","properties":{"id":{"type":"number","example":1},"publicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a"},"orgId":{"type":"number","example":1},"name":{"type":"string","example":"Demo Agent"},"slug":{"type":"string","example":"demo-agent"},"deployEnvironment":{"$ref":"#/components/schemas/DeployEnvironment"},"stage":{"$ref":"#/components/schemas/AgentStage"},"sessionGateway":{"$ref":"#/components/schemas/SessionGateway"},"configFrozenAt":{"type":"string","nullable":true,"format":"date-time"},"configFrozenByName":{"type":"string","nullable":true},"lockExpiresAt":{"type":"string","nullable":true,"format":"date-time","description":"30 days after the lock was set. Once lock expiry is enforced, an expired journey unlocks and follows the latest runtime; until then it stays locked."},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Label"},"description":"Sable admins only. Calls to an agent labeled `test` skip Sable's on-call alerts."},"configFrozen":{"type":"boolean","description":"Journey configuration is locked for all writers until a Sable admin unlocks it."},"config":{"$ref":"#/components/schemas/AgentConfig"},"branding":{"type":"object","nullable":true,"properties":{"logo_url":{"type":"string","nullable":true,"default":null},"logo_lockup_url":{"type":"string","nullable":true,"default":null},"logo_alt":{"type":"string","nullable":true,"default":null},"brand_color":{"type":"string","nullable":true,"default":null},"avatar_label":{"type":"string","nullable":true,"default":null},"accent_color":{"type":"string","nullable":true,"default":null},"orb_color":{"type":"string","nullable":true,"default":null},"thinking_color":{"type":"string","nullable":true,"default":null},"agent_control_color":{"type":"string","nullable":true,"default":null},"background_color":{"type":"string","nullable":true,"default":null},"background_image_url":{"type":"string","nullable":true,"default":null,"description":"Background image URL applied behind pre-call surfaces (connecting, login, intro, outro)"},"font_family":{"type":"string","nullable":true,"default":null},"heading_font_family":{"type":"string","nullable":true,"default":null},"watermark_logo_url":{"type":"string","nullable":true,"default":null},"watermark_logo_dark_url":{"type":"string","nullable":true,"default":null},"watermark_logo_light_url":{"type":"string","nullable":true,"default":null},"intro_message":{"type":"string","nullable":true,"default":null},"intro_title":{"type":"string","nullable":true,"default":null,"description":"Intro headline. Rendered in the primary text color. Overrides the agent's intro title."},"intro_cta_text":{"type":"string","nullable":true,"default":null,"description":"Intro CTA button label. Overrides the agent's intro CTA text."},"loading_slides":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LoadingSlide"},"default":null},"busy_eyebrow":{"type":"string","nullable":true,"default":null},"busy_title":{"type":"string","nullable":true,"default":null},"busy_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_label":{"type":"string","nullable":true,"default":null},"busy_return_label":{"type":"string","nullable":true,"default":null},"busy_return_url":{"type":"string","nullable":true,"default":null},"onboarding_steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"},"default":null},"browser_intro_logo":{"type":"boolean","nullable":true,"default":null},"browser_intro_text":{"type":"string","nullable":true,"default":null},"intro_mode":{"type":"string","nullable":true,"enum":["orb","branded",null],"default":null,"description":"Intro experience mode: orb (animated orb) or branded (hero image splash)"},"branded_hero_image_url":{"type":"string","nullable":true,"default":null,"description":"Hero image URL for branded intro mode"},"outro_feedback_enabled":{"type":"boolean","nullable":true,"default":null},"outro_rating_question":{"type":"string","nullable":true,"default":null},"outro_rating_style":{"type":"string","nullable":true,"enum":["stars","numeric",null],"default":null,"description":"Outro rating control style. null defaults to stars."},"outro_rating_scale_max":{"type":"integer","nullable":true,"minimum":1,"maximum":10,"default":null,"description":"Upper bound of the outro rating scale (1–N). null defaults to 5 for stars or 10 for numeric."},"outro_text_questions":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_title":{"type":"string","nullable":true,"default":null},"outro_subtitle":{"type":"string","nullable":true,"default":null},"outro_chip_question":{"type":"string","nullable":true,"default":null},"outro_chips":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_poll_question":{"type":"string","nullable":true,"default":null},"outro_poll_options":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_return_label":{"type":"string","nullable":true,"default":null},"outro_return_url":{"type":"string","nullable":true,"default":null},"outro_restart_label":{"type":"string","nullable":true,"default":null},"outro_cta_label":{"type":"string","nullable":true,"default":null},"outro_cta_url":{"type":"string","nullable":true,"default":null},"outro_text_field_placeholder":{"type":"string","nullable":true,"default":null},"outro_schedule_label":{"type":"string","nullable":true,"default":null},"outro_schedule_url":{"type":"string","nullable":true,"default":null},"outro_schedule_icon":{"type":"string","nullable":true,"default":null},"outro_schedule_description":{"type":"string","nullable":true,"default":null,"description":"Subtitle text shown under the schedule card on the outro screen."},"outro_share_enabled":{"type":"boolean","nullable":true,"default":null,"description":"Whether the share card is shown on the outro screen. null/true ⇒ shown, false ⇒ hidden."},"outro_share_label":{"type":"string","nullable":true,"default":null},"outro_share_description":{"type":"string","nullable":true,"default":null},"outro_share_url":{"type":"string","nullable":true,"default":null},"outro_share_icon":{"type":"string","nullable":true,"default":null},"outro_submit_label":{"type":"string","nullable":true,"default":null},"outro_thank_you_title":{"type":"string","nullable":true,"default":null},"outro_thank_you_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_url":{"type":"string","nullable":true,"default":null},"login_heading":{"type":"string","nullable":true,"default":null,"description":"Heading text on the login form (e.g. 'Learn to use'). Shown before the logo pill."},"login_subtitle":{"type":"string","nullable":true,"default":null,"description":"Subtitle / instructions shown below the heading on the login form."},"login_button_label":{"type":"string","nullable":true,"default":null,"description":"Submit button label on the login form. Defaults to 'Proceed'."},"link_preview_title":{"type":"string","nullable":true,"default":null,"description":"Title shown when a call link is unfurled in chat / social previews"},"link_preview_description":{"type":"string","nullable":true,"default":null,"description":"Description shown when a call link is unfurled in chat / social previews"}},"description":"Agent-level branding overrides (sparse, null if none set)"},"brandingRaw":{"type":"object","nullable":true,"additionalProperties":true,"description":"Agent-level branding overrides stored verbatim (unprojected). Preserves v2-only branches for the branding editor; additive to `branding`."},"gradingRubricId":{"type":"string","nullable":true,"format":"uuid","example":null,"description":"Bound grading rubric id; null when no grading rubric is attached to this agent."},"maintenanceMode":{"type":"boolean","example":false,"description":"Whether the agent is in maintenance. true = offline (parley shows MaintenanceScene; /connection-details returns 503)."},"disabled":{"type":"boolean","example":false,"description":"Whether the agent is turned off. true = every address reaching it shows parley's \"no longer active\" screen; /connection-details and the public runtime return 410 AGENT_DISABLED."},"dailyCallsPerCaller":{"type":"integer","nullable":true,"minimum":0,"example":null,"description":"Customer calls one browser or one email may start on this agent in 24 hours; null means no limit."},"dailyCallsPerEmailDomain":{"type":"integer","nullable":true,"minimum":0,"example":null,"description":"Customer calls one company email domain may start on this agent in 24 hours; null means no limit."},"sendThankYouEmail":{"type":"boolean","example":false,"description":"Whether an eligible call sends the participant a follow-up email. Off by default — it mails the customer's own customers."},"followUpReplyTo":{"type":"array","nullable":true,"items":{"type":"string"},"example":["hello@acme.com"],"description":"Mailboxes a reply to the follow-up email reaches. Empty = replies go to the unattended sending address, and the email stops inviting one."},"staticMetadata":{"type":"object","additionalProperties":true,"description":"Agent-level static metadata merged into this agent's call.completed webhook events."},"extractionFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["text","number","boolean","date","select"]},"description":{"type":"string","maxLength":500},"options":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Allowed answers, required on a `select` field (at least 2, unique ignoring case) and rejected on any other type."}},"required":["key","label","type"]},"maxItems":30,"description":"Customer-defined fields extracted from this agent's call transcripts. Empty array when the agent extracts nothing."},"allowedAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"publicId":{"type":"string"},"alias":{"type":"string"}},"required":["id","publicId","alias"]},"description":"Sandbox accounts the agent is allowed to claim. Omitted by list endpoints; present on single-agent GET."},"draft":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"lastEditedByAuthId":{"type":"string","nullable":true,"format":"uuid"},"lastEditedAt":{"type":"string","nullable":true,"format":"date-time"},"lastEditedByName":{"type":"string","nullable":true}},"required":["id","lastEditedByAuthId","lastEditedAt","lastEditedByName"],"description":"Open draft metadata for list responses. Populated when the agent has an unpublished draft config version; null/omitted otherwise."},"creator":{"type":"object","nullable":true,"properties":{"authId":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}},"required":["authId","name"],"description":"Journey creator (author of the agent's earliest config version), joined from users.name. Null when unknown (system/pre-migration agents or author row deleted). Populated by list responses."},"hasJourney":{"type":"boolean","description":"Whether the published config has a journey: at least one moment, or a journey.md with a non-empty Chapters section. Populated by list responses."},"createdAt":{"type":"string","example":"2024-01-01T00:00:00Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00Z"},"deletedAt":{"type":"string","nullable":true,"example":null}},"required":["id","publicId","orgId","name","slug","deployEnvironment","stage","sessionGateway","config","gradingRubricId","extractionFields","createdAt","updatedAt","deletedAt"]},"DeployEnvironment":{"type":"string","enum":["production","test"],"example":"production"},"AgentStage":{"type":"string","enum":["draft","live"],"description":"`live`: people outside Sable may reach the agent, so its calls alert and count as production. `draft`: it is not serving customers yet.","example":"live"},"SessionGateway":{"type":"string","enum":["none","brain"],"example":"brain"},"Label":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"color":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","color","createdAt","updatedAt"]},"AgentResponse":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/Agent"}},"required":["agent"]},"CreateAgentBody":{"type":"object","properties":{"orgId":{"type":"number"},"name":{"type":"string","minLength":1,"example":"Demo Agent"},"slug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","example":"demo-agent","description":"URL-friendly identifier. Auto-generated from name if not provided."},"deployEnvironment":{"$ref":"#/components/schemas/DeployEnvironment"},"config":{"$ref":"#/components/schemas/AgentConfig"},"extractionFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["text","number","boolean","date","select"]},"description":{"type":"string","maxLength":500},"options":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Allowed answers, required on a `select` field (at least 2, unique ignoring case) and rejected on any other type."}},"required":["key","label","type"]},"maxItems":30,"description":"Extraction field definitions for the new agent. Defaults to an empty array when omitted."}},"required":["name"],"additionalProperties":false},"UpdateAgentBody":{"type":"object","properties":{"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","example":"demo-agent"},"deployEnvironment":{"$ref":"#/components/schemas/DeployEnvironment"},"config":{"$ref":"#/components/schemas/AgentConfig"},"configPatch":{"type":"object","additionalProperties":true,"description":"Sparse deep-merge patch for the agent config. Only the keys you send are updated; everything else is preserved from the current published version. Cannot be combined with `config`."},"primaryLanguage":{"$ref":"#/components/schemas/PrimaryLanguage"},"configVersionComment":{"type":"string","maxLength":1000,"example":"Tweaked greeting and environment defaults."},"staticMetadata":{"type":"object","additionalProperties":true,"description":"Replace the agent's static metadata object (merged into call.completed webhook events; call-level metadata wins)."},"extractionFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["text","number","boolean","date","select"]},"description":{"type":"string","maxLength":500},"options":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Allowed answers, required on a `select` field (at least 2, unique ignoring case) and rejected on any other type."}},"required":["key","label","type"]},"maxItems":30,"description":"Replace the agent's extraction field definitions wholesale. Omit to leave them unchanged; send [] to clear them. Editing these never rewrites already-extracted sessions — each run freezes its own snapshot."}},"additionalProperties":false},"DuplicateAgentBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name for the new agent. Defaults to '<source.name> (Copy)' when omitted.","example":"Demo Agent (Copy)"}},"additionalProperties":false},"LanguageVoicesPreviewResponse":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"voiceId":{"type":"string"},"name":{"type":"string"},"main":{"type":"boolean"}},"required":["key","voiceId","name","main"]}}},"required":["rows"]},"LanguageVoicesPreviewBody":{"type":"object","properties":{"tts":{"type":"object","properties":{"provider":{"type":"string"},"voice_id":{"type":"string","nullable":true,"minLength":1},"voices":{"type":"array","items":{"type":"string","minLength":1}}},"required":["provider","voice_id"]},"language":{"allOf":[{"$ref":"#/components/schemas/PrimaryLanguage"},{"description":"The agent's starting language as edited but not yet saved, which the main voice speaks when it has no catalog row (\"auto\" for none). Omitted: the saved language."}]}},"required":["tts"]},"AgentAccountListResponse":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}},"required":["accounts"]},"Account":{"type":"object","properties":{"id":{"type":"number","example":1},"publicId":{"type":"string","example":"acc_01961f2a-b3c4-7d5e-8f6a-9b0c1d"},"orgId":{"type":"number","example":1},"alias":{"type":"string","example":"demo-user"},"poolId":{"type":"string","example":"acc_01961f2a-b3c4-7d5e-8f6a-9b0c1d"},"hasProfile":{"type":"boolean","example":false},"profileSize":{"type":"number","nullable":true,"example":null},"signinActions":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}},{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}],"example":[]},"variables":{"$ref":"#/components/schemas/AccountVariables"},"isShareable":{"type":"boolean","example":false},"loginUsername":{"type":"string","nullable":true,"example":"demo@candy-corp.com"},"hasLoginPassword":{"type":"boolean","example":false},"usesGoogleWorkspaceLogin":{"type":"boolean","example":false},"isProduction":{"type":"boolean","example":false,"description":"Whether Sable checks this profile's sign-in on a schedule, alerts on it, and signs it back in."},"healthCheck":{"$ref":"#/components/schemas/AccountHealthCheck"},"agentIds":{"type":"array","items":{"type":"number"},"example":[3,8],"description":"Live agents bound to this account. Only on `GET /accounts?include=bindings`, and only for callers with `agents:read`."},"createdAt":{"type":"string","example":"2024-01-01T00:00:00Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00Z"},"deletedAt":{"type":"string","nullable":true,"example":null}},"required":["id","publicId","orgId","alias","poolId","hasProfile","profileSize","isShareable","hasLoginPassword","usesGoogleWorkspaceLogin","isProduction","healthCheck","createdAt","updatedAt","deletedAt"]},"AccountVariables":{"type":"object","additionalProperties":{"type":"string"},"example":{"design_url":"https://www.figma.com/file/abc","email":"demo@example.com"}},"AccountHealthCheck":{"type":"object","nullable":true,"properties":{"url":{"type":"string","maxLength":2048,"format":"uri","example":"https://app.vanta.com"}},"additionalProperties":false},"AttachAccountToAgentBody":{"type":"object","properties":{"accountId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1}},"required":["accountId"],"additionalProperties":false},"UpdateAgentBrandingBody":{"type":"object","properties":{"branding":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[2]},"styles":{"type":"object","nullable":true,"additionalProperties":{"type":"object","nullable":true,"additionalProperties":true}},"identity":{"type":"object","nullable":true,"properties":{"colors":{"type":"object","nullable":true,"properties":{"brand":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"accent":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"background":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"orb":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"thinking":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"agentControl":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"additionalProperties":false},"logos":{"type":"object","nullable":true,"properties":{"logo":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"lockup":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"alt":{"type":"string","nullable":true,"maxLength":120},"watermark":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"watermarkDark":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"watermarkLight":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"hero":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"}},"additionalProperties":false},"fonts":{"type":"object","nullable":true,"properties":{"body":{"type":"string","nullable":true,"maxLength":120},"heading":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false},"background":{"type":"object","nullable":true,"properties":{"image":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"}},"additionalProperties":false}},"additionalProperties":false},"screens":{"type":"object","nullable":true,"properties":{"login":{"type":"object","nullable":true,"properties":{"heading":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":160},"buttonLabel":{"type":"string","nullable":true,"maxLength":40},"stageImage":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"fields":{"type":"array","nullable":true,"items":{"type":"object","properties":{"type":{"type":"string","enum":["name","company","email","website","text"]},"label":{"type":"string","minLength":1,"maxLength":60},"required":{"type":"boolean"},"workEmailOnly":{"type":"boolean"}},"required":["type","label","required"],"additionalProperties":false},"minItems":1,"maxItems":8}},"additionalProperties":false},"intro":{"type":"object","nullable":true,"properties":{"avatarLabel":{"type":"string","nullable":true,"maxLength":60},"mode":{"type":"string","nullable":true,"enum":["orb","branded",null]},"pageUrl":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"title":{"type":"string","nullable":true,"maxLength":160},"message":{"type":"string","nullable":true,"maxLength":400},"ctaText":{"type":"string","nullable":true,"maxLength":40},"ctaNote":{"type":"string","nullable":true,"maxLength":160}},"additionalProperties":false},"busy":{"type":"object","nullable":true,"properties":{"eyebrow":{"type":"string","nullable":true,"maxLength":40},"title":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":200},"primary":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40}},"additionalProperties":false},"return":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"}},"additionalProperties":false}},"additionalProperties":false},"browser":{"type":"object","nullable":true,"properties":{"introLogo":{"type":"boolean","nullable":true},"introText":{"type":"string","nullable":true,"maxLength":80}},"additionalProperties":false},"tooltips":{"type":"object","nullable":true,"properties":{"steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"},"maxItems":20}},"additionalProperties":false},"outro":{"type":"object","nullable":true,"properties":{"rating":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean","nullable":true},"question":{"type":"string","nullable":true,"maxLength":120},"style":{"type":"string","nullable":true,"enum":["stars","numeric",null]},"scaleMax":{"type":"integer","nullable":true,"minimum":1,"maximum":10},"explanationRequiredBelow":{"type":"integer","nullable":true,"minimum":0,"maximum":10}},"additionalProperties":false},"feedback":{"type":"object","nullable":true,"properties":{"default":{"type":"array","nullable":true,"items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"placeholder":{"type":"string"}},"required":["title"],"additionalProperties":false},"maxItems":5},"buckets":{"type":"array","nullable":true,"items":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"placeholder":{"type":"string"}},"required":["title"],"additionalProperties":false},"minItems":1,"maxItems":5}},"required":["min","max","questions"]}}},"additionalProperties":false},"chips":{"type":"object","nullable":true,"properties":{"question":{"type":"string","nullable":true,"maxLength":120},"options":{"type":"array","nullable":true,"items":{"type":"string"},"maxItems":10}},"additionalProperties":false},"poll":{"type":"object","nullable":true,"properties":{"question":{"type":"string","nullable":true,"maxLength":120},"options":{"type":"array","nullable":true,"items":{"type":"string"},"maxItems":10}},"additionalProperties":false},"title":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":160},"thankYou":{"type":"object","nullable":true,"properties":{"title":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":160}},"additionalProperties":false},"submitLabel":{"type":"string","nullable":true,"maxLength":40},"textFieldPlaceholder":{"type":"string","nullable":true,"maxLength":120},"ctas":{"type":"object","nullable":true,"properties":{"return":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"}},"additionalProperties":false},"restart":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40}},"additionalProperties":false},"cta":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40}},"additionalProperties":false},"schedule":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":60},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"icon":{"type":"string","nullable":true},"description":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false},"share":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean","nullable":true},"label":{"type":"string","nullable":true,"maxLength":60},"description":{"type":"string","nullable":true,"maxLength":120},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"icon":{"type":"string","nullable":true}},"additionalProperties":false},"moreInfo":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":60},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"icon":{"type":"string","nullable":true},"description":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"certificate":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean","nullable":true},"background":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"width":{"type":"integer","nullable":true,"minimum":200,"maximum":4096},"height":{"type":"integer","nullable":true,"minimum":200,"maximum":4096},"slots":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":60},"template":{"type":"string","minLength":1,"maxLength":200},"x":{"type":"number","minimum":0,"maximum":100},"y":{"type":"number","minimum":0,"maximum":100},"maxWidth":{"type":"number","minimum":1,"maximum":100},"fontSize":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":400},"fontWeight":{"anyOf":[{"type":"number","enum":[400]},{"type":"number","enum":[600]},{"type":"number","enum":[700]}]},"color":{"type":"string","pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"align":{"type":"string","enum":["left","center","right"]},"transform":{"type":"string","enum":["none","uppercase"]},"letterSpacing":{"type":"number","minimum":-10,"maximum":40}},"required":["id","label","template","x","y","maxWidth","fontSize","fontWeight","color","align"],"additionalProperties":false},"maxItems":12},"gate":{"type":"string","nullable":true,"enum":["final-moment","rubric","always","required-moments",null]},"requiredMoments":{"type":"array","nullable":true,"items":{"type":"string","minLength":1,"maxLength":120},"maxItems":50},"filename":{"type":"string","nullable":true,"maxLength":60},"cta":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":60},"description":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false}},"additionalProperties":false},"linkPreview":{"type":"object","nullable":true,"properties":{"title":{"type":"string","nullable":true,"maxLength":80},"description":{"type":"string","nullable":true,"maxLength":200}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},{"type":"object","properties":{"logo_url":{"type":"string","nullable":true},"logo_lockup_url":{"type":"string","nullable":true},"logo_alt":{"type":"string","nullable":true},"brand_color":{"type":"string","nullable":true},"avatar_label":{"type":"string","nullable":true},"accent_color":{"type":"string","nullable":true},"orb_color":{"type":"string","nullable":true},"thinking_color":{"type":"string","nullable":true},"agent_control_color":{"type":"string","nullable":true},"background_color":{"type":"string","nullable":true},"background_image_url":{"type":"string","nullable":true},"font_family":{"type":"string","nullable":true},"heading_font_family":{"type":"string","nullable":true},"watermark_logo_url":{"type":"string","nullable":true},"watermark_logo_dark_url":{"type":"string","nullable":true},"watermark_logo_light_url":{"type":"string","nullable":true},"intro_message":{"type":"string","nullable":true},"intro_title":{"type":"string","nullable":true},"intro_cta_text":{"type":"string","nullable":true},"loading_slides":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LoadingSlide"}},"busy_eyebrow":{"type":"string","nullable":true},"busy_title":{"type":"string","nullable":true},"busy_subtitle":{"type":"string","nullable":true},"busy_primary_label":{"type":"string","nullable":true},"busy_return_label":{"type":"string","nullable":true},"busy_return_url":{"type":"string","nullable":true},"onboarding_steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"}},"browser_intro_logo":{"type":"boolean","nullable":true},"browser_intro_text":{"type":"string","nullable":true},"intro_mode":{"type":"string","nullable":true,"enum":["orb","branded",null]},"branded_hero_image_url":{"type":"string","nullable":true},"outro_feedback_enabled":{"type":"boolean","nullable":true},"outro_rating_question":{"type":"string","nullable":true},"outro_rating_style":{"type":"string","nullable":true,"enum":["stars","numeric",null]},"outro_rating_scale_max":{"type":"integer","nullable":true,"minimum":1,"maximum":10},"outro_text_questions":{"type":"array","nullable":true,"items":{"type":"string"}},"outro_title":{"type":"string","nullable":true},"outro_subtitle":{"type":"string","nullable":true},"outro_chip_question":{"type":"string","nullable":true},"outro_chips":{"type":"array","nullable":true,"items":{"type":"string"}},"outro_poll_question":{"type":"string","nullable":true},"outro_poll_options":{"type":"array","nullable":true,"items":{"type":"string"}},"outro_return_label":{"type":"string","nullable":true},"outro_return_url":{"type":"string","nullable":true},"outro_restart_label":{"type":"string","nullable":true},"outro_cta_label":{"type":"string","nullable":true},"outro_cta_url":{"type":"string","nullable":true},"outro_text_field_placeholder":{"type":"string","nullable":true},"outro_schedule_label":{"type":"string","nullable":true},"outro_schedule_url":{"type":"string","nullable":true},"outro_schedule_icon":{"type":"string","nullable":true},"outro_schedule_description":{"type":"string","nullable":true},"outro_share_enabled":{"type":"boolean","nullable":true},"outro_share_label":{"type":"string","nullable":true},"outro_share_description":{"type":"string","nullable":true},"outro_share_url":{"type":"string","nullable":true},"outro_share_icon":{"type":"string","nullable":true},"outro_submit_label":{"type":"string","nullable":true},"outro_thank_you_title":{"type":"string","nullable":true},"outro_thank_you_subtitle":{"type":"string","nullable":true},"busy_primary_url":{"type":"string","nullable":true},"login_heading":{"type":"string","nullable":true},"login_subtitle":{"type":"string","nullable":true},"login_button_label":{"type":"string","nullable":true},"link_preview_title":{"type":"string","nullable":true},"link_preview_description":{"type":"string","nullable":true},"waiting_message":{"nullable":true},"busy_helper_items":{"nullable":true},"busy_panel_title":{"nullable":true},"busy_panel_subtitle":{"nullable":true},"busy_status_title":{"nullable":true},"busy_status_subtitle":{"nullable":true},"busy_status_estimate":{"nullable":true},"busy_wait_title":{"nullable":true},"busy_wait_items":{"nullable":true},"browser_stage_bg":{"nullable":true},"outro_recap_items":{"nullable":true},"login_email_hint":{"nullable":true},"text_primary_color":{"nullable":true},"text_secondary_color":{"nullable":true},"pill_bg_color":{"nullable":true},"pill_text_color":{"nullable":true}},"additionalProperties":false}]}},"required":["branding"]},"UpdateAgentFollowUpEmailBody":{"type":"object","properties":{"sendThankYouEmail":{"type":"boolean"},"followUpReplyTo":{"type":"array","nullable":true,"items":{"type":"string","maxLength":254,"format":"email"},"maxItems":5,"example":["hello@acme.com"]}},"additionalProperties":false},"UpdateAgentMaintenanceBody":{"type":"object","properties":{"maintenanceMode":{"type":"boolean"}},"required":["maintenanceMode"],"additionalProperties":false},"UpdateAgentDisabledBody":{"type":"object","properties":{"disabled":{"type":"boolean"}},"required":["disabled"],"additionalProperties":false},"SetAgentFreezeBody":{"type":"object","properties":{"frozen":{"type":"boolean","description":"Whether journey configuration is locked. Set false to unlock while preserving its environment pin. Locking an already locked journey renews its 30 days."},"expectedConfigVersionId":{"type":"string","format":"uuid"},"env":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"example":"locked-1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"Brain environment name, ref, or locked-<full git sha> (the older rev-<full git sha> form is still accepted); null follows routing."},"production":{"type":"boolean","description":"With frozen=true: false labels the journey `test` so its calls skip on-call alerts; true removes that label. A new lock defaults to true; renewing keeps the current labels."}},"required":["frozen","expectedConfigVersionId"],"additionalProperties":false},"SetAgentStageBody":{"type":"object","properties":{"stage":{"$ref":"#/components/schemas/AgentStage"},"reason":{"type":"string","minLength":1,"maxLength":2000,"description":"Why, in the words of the person deciding. Kept in the agent's stage history.","example":"Link sent to the customer's pilot group"},"correction":{"type":"boolean","description":"The stored stage was wrong, rather than the agent changing now. Recorded as a correction."}},"required":["stage","reason"],"additionalProperties":false},"AgentSummaryListResponse":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/AgentNavigationSummary"}}},"required":["agents"]},"AgentNavigationSummary":{"type":"object","properties":{"id":{"type":"number","example":1},"publicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a"},"orgId":{"type":"number","example":1},"name":{"type":"string","example":"Demo Agent"},"slug":{"type":"string","example":"demo-agent"},"deployEnvironment":{"$ref":"#/components/schemas/DeployEnvironment"},"gradingRubricId":{"type":"string","nullable":true,"format":"uuid","example":null,"description":"Bound grading rubric id; null when no grading rubric is attached to this agent."},"lastEditedAt":{"type":"string","format":"date-time","description":"Latest agent update or open-draft edit."},"appearance":{"$ref":"#/components/schemas/AgentAppearance"}},"required":["id","publicId","orgId","name","slug","deployEnvironment","gradingRubricId","lastEditedAt","appearance"]},"AgentAppearance":{"type":"object","properties":{"avatar":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean"},"mode":{"type":"string"},"provider":{"type":"string"},"image_url":{"type":"string"},"avatar_id":{"type":"string"}},"description":"The fields of `config.components.avatar` that decide the face; null when unset."},"orbColor":{"type":"string","nullable":true,"description":"The deployment's own orb colour (`branding.orb_color`)."},"accentColor":{"type":"string","nullable":true,"description":"The deployment's own Brand color (`branding.accent_color`), which the orb falls back to."}},"required":["avatar","orbColor","accentColor"],"description":"What a caller sees: enough to draw the deployment's orb or avatar without loading its configuration. Organization colours are not merged in."},"AgentJourneyResponse":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["sections"]},"source":{"type":"string","enum":["draft","published"]},"conduct":{"type":"string","nullable":true},"audience":{"type":"string"},"outcomes":{"type":"string"},"start":{"type":"object","properties":{"view":{"type":"string"},"demoAccount":{"type":"string"},"greeting":{"type":"string"}},"required":["view","demoAccount","greeting"]},"chapters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"The `###` heading as written, without its leading number."},"purpose":{"type":"string"},"explain":{"type":"string"},"ask":{"type":"object","properties":{"question":{"type":"string","description":"Empty when the chapter asks nothing."},"replies":{"type":"array","items":{"type":"string"}}},"required":["question","replies"]},"setup":{"type":"object","properties":{"kind":{"type":"string","enum":["slide","browser","other"]},"mediaId":{"type":"string","nullable":true,"description":"Id of the media row the chapter puts on screen."},"destinationId":{"type":"string","nullable":true,"description":"Browser destination the chapter opens."},"raw":{"type":"string","description":"The authored Setup line, including its fallback."}},"required":["kind","mediaId","destinationId","raw"]},"branches":{"type":"array","items":{"type":"string"},"description":"The authored Branches field as written: its lead-in when present, then one entry per nested bullet with its continuation lines."},"doneWhen":{"type":"string"},"visitorClicks":{"type":"string","description":"The authored Visitor clicks field as written; empty when absent."}},"required":["title","purpose","explain","ask","setup","branches","doneWhen","visitorClicks"]}},"prerequisites":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","properties":{"startMode":{"type":"string","nullable":true},"startMediaId":{"type":"string","nullable":true},"entryDestinationId":{"type":"string","nullable":true},"destinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","url"]}},"handsOn":{"type":"boolean","nullable":true},"allowedEffects":{"type":"array","items":{"type":"string"}},"blockedEffects":{"type":"array","items":{"type":"string"}}},"required":["startMode","startMediaId","entryDestinationId","destinations","handsOn","allowedEffects","blockedEffects"]},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mode":{"type":"string"},"label":{"type":"string"},"stillUrl":{"type":"string","nullable":true},"namedInJourney":{"type":"boolean"}},"required":["id","mode","label","stillUrl","namedInJourney"]}}},"required":["kind","source","conduct","audience","outcomes","start","chapters","prerequisites","environment","media"]},{"type":"object","properties":{"kind":{"type":"string","enum":["canvas"]}},"required":["kind"]}]},"ExtractionBackfillReport":{"type":"object","properties":{"scanned":{"type":"integer","minimum":0,"description":"Sessions still owed an extraction this run."},"enqueued":{"type":"integer","minimum":0,"description":"Sessions whose extraction job was created."}},"required":["scanned","enqueued"]},"PronunciationCandidatesResponse":{"type":"object","properties":{"term":{"type":"string","nullable":true,"example":"SOC 2"},"candidates":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","example":"Q and A"},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"],"example":"expansion"},"label":{"type":"string","example":"FIG-muh"}},"required":["value","class"]}},"sentences":{"type":"array","items":{"type":"string"}},"heard":{"type":"array","items":{"type":"string"}}},"required":["term","candidates","sentences"]},"PronunciationCandidatesBody":{"anyOf":[{"type":"object","properties":{"term":{"type":"string","minLength":1,"example":"Q&A"},"recording":{"type":"string","minLength":1,"maxLength":400000,"description":"Base64-encoded WAV (16-bit PCM) of the person saying the word the way it should sound."}},"required":["term"]},{"type":"object","properties":{"term":{"type":"string","minLength":1,"example":"Q&A"},"recording":{"type":"string","minLength":1,"maxLength":400000,"description":"Base64-encoded WAV (16-bit PCM) of the person saying the word the way it should sound."}},"required":["recording"]}]},"PronunciationPreviewResponse":{"type":"object","properties":{"clips":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"text":{"type":"string"},"url":{"type":"string","format":"uri"},"spoken":{"type":"string"}},"required":["index","text","url"]}}},"required":["clips"]},"PronunciationPreviewBody":{"type":"object","properties":{"voice":{"type":"string","minLength":1,"example":"cedar"},"speed":{"type":"number","minimum":0.25,"maximum":1.5,"example":1.2},"pronunciations":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200}},"required":["term","replace"]},"maxItems":50,"example":[{"term":"SQL","replace":"sequel"}]},"items":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"example":"We'll wrap up with a Q&A."},"fix":{"type":"object","properties":{"term":{"type":"string","minLength":1,"example":"Q&A"},"replace":{"type":"string","minLength":1,"example":"Q and A"}},"required":["term","replace"]}},"required":["text"]},"minItems":1,"maxItems":8}},"required":["items"]},"DeploymentLinkListResponse":{"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentLink"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page, or null on the last page. Pass back as `cursor` with the same filters and `sort`."},"total":{"type":"integer","minimum":0,"description":"Every link on this agent, or every link of the `kind` asked for, ignoring `q` and `status`."},"matched":{"type":"integer","minimum":0,"description":"Links matching `q` and `status`; equals `total` when neither is set."}},"required":["links","nextCursor","total","matched"]},"DeploymentLink":{"type":"object","properties":{"ref":{"type":"string","example":"lnk_4f8c2a_spring-launch"},"name":{"type":"string","nullable":true,"example":"Spring launch"},"status":{"type":"string","enum":["active","disabled","redirect"],"example":"active"},"kind":{"type":"string","enum":["customer","internal"],"example":"customer","description":"`customer`: for the customer's callers. `internal`: Sable's own, for staff, sales and scripts; only callers with `agents:configure` create, change or see one."},"maintenanceMode":{"type":"boolean","description":"Whether the link is in maintenance. Enforced only while the link is active: calls through it are refused and parley shows the maintenance screen."},"context":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LinkContextEntry"},"description":"Visitor context handed to the agent when a call arrives through this link."},"searchCrm":{"type":"boolean","description":"Read this caller's facts from the org's CRM when a call arrives through this link."},"hideForm":{"type":"boolean","description":"Calls through this link skip the pre-call form. An agent that verifies email before the call still shows it. Reassigning the link turns this off, along with the identity it relied on."},"identityEmail":{"type":"string","nullable":true,"example":"dana@acme.com","description":"The person this link was made for. Resolves the CRM without the caller filling in the form."},"metadata":{"type":"object","additionalProperties":true,"example":{"notify_emails":["dan@acme.com"]},"description":"Hidden key/value map, never shown to the agent. `notify_emails` lists who is emailed after each call through this link."},"pinnedConfigVersionId":{"type":"string","nullable":true,"format":"uuid","example":"0b7c3f1e-5a2d-4c8e-9f10-3e2b6a7d8c91","description":"Internal links only. A published version of this agent that every call through the link serves, whatever the agent publishes later. A request that names another `configId` still runs that one, as a test."},"pinnedEnv":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"example":"locked-0123456789abcdef0123456789abcdef01234567","description":"Internal links only. The runtime every call through the link runs on: a catalog environment name, `locked-<sha>` or `rev-<sha>`, as a version's `env` pin takes."},"createdByAuthId":{"type":"string","nullable":true,"description":"Who made the link; null when unknown."},"createdAt":{"type":"string","example":"2026-01-01T00:00:00.000Z"}},"required":["ref","name","status","kind","maintenanceMode","context","searchCrm","hideForm","identityEmail","metadata","pinnedConfigVersionId","pinnedEnv","createdByAuthId","createdAt"]},"LinkContextEntry":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"example":"name"},"value":{"type":"string","minLength":1,"maxLength":512,"example":"Marcos"}},"required":["name","value"]},"OrgDeploymentLinkListResponse":{"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/OrgDeploymentLink"}}},"required":["links"]},"OrgDeploymentLink":{"allOf":[{"$ref":"#/components/schemas/DeploymentLink"},{"type":"object","properties":{"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":42},"agentName":{"type":"string","example":"Support Bot"}},"required":["agentId","agentName"]}]},"AssignableDeploymentLinkListResponse":{"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/AssignableDeploymentLink"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page, or null on the last page."},"total":{"type":"integer","minimum":0,"description":"Every assignable link visible to the caller, ignoring `q`."},"matched":{"type":"integer","minimum":0,"description":"Assignable links matching `q`; equals `total` when `q` is not set."}},"required":["links","nextCursor","total","matched"]},"AssignableDeploymentLink":{"allOf":[{"$ref":"#/components/schemas/DeploymentLink"},{"type":"object","properties":{"agentName":{"type":"string","example":"Support Bot"},"reactivate":{"type":"boolean","description":"True for this agent's own `redirect` links: picking one brings it back instead of moving it from another agent."}},"required":["agentName","reactivate"]}]},"DeploymentLinkResponse":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/DeploymentLink"}},"required":["link"]},"CreateDeploymentLinkBody":{"type":"object","properties":{"alias":{"type":"string","minLength":1,"maxLength":64,"example":"spring-launch"},"name":{"type":"string","minLength":1,"maxLength":200,"example":"Spring launch"},"assignRef":{"type":"string","minLength":1,"example":"lnk_4f8c2a_old-owner"},"context":{"type":"array","items":{"$ref":"#/components/schemas/LinkContextEntry"},"maxItems":20},"searchCrm":{"type":"boolean","example":true},"hideForm":{"type":"boolean","example":true},"identityEmail":{"type":"string","format":"email","example":"dana@acme.com"},"metadata":{"type":"object","additionalProperties":true,"description":"Hidden key/value map, never shown to the agent or the visitor. It is merged into post-call integration `metadata` (agent < link < call), except `notify_emails`, which only the link or agent sets: a call-level value is dropped. Set `notify_emails` to a list of up to 25 addresses to email after each call through this link, when an email integration has `includeLinkRecipients` on.","example":{"notify_emails":["dan@acme.com"],"campaign":"q4-outbound"}},"kind":{"type":"string","enum":["customer","internal"],"example":"customer","description":"`customer`: for the customer's callers. `internal`: Sable's own, for staff, sales and scripts; only callers with `agents:configure` create, change or see one."},"pinnedConfigVersionId":{"type":"string","format":"uuid","example":"0b7c3f1e-5a2d-4c8e-9f10-3e2b6a7d8c91","description":"Internal links only. A published version of this agent that every call through the link serves, whatever the agent publishes later. A request that names another `configId` still runs that one, as a test."},"pinnedEnv":{"type":"string","minLength":1,"maxLength":255,"example":"locked-0123456789abcdef0123456789abcdef01234567","description":"Internal links only. The runtime every call through the link runs on: a catalog environment name, `locked-<sha>` or `rev-<sha>`, as a version's `env` pin takes."}}},"UpdateDeploymentLinkBody":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled","redirect"],"example":"disabled"},"kind":{"type":"string","enum":["customer","internal"],"example":"customer","description":"`customer`: for the customer's callers. `internal`: Sable's own, for staff, sales and scripts; only callers with `agents:configure` create, change or see one."},"maintenanceMode":{"type":"boolean","example":true},"name":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"example":"Spring launch"},"context":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LinkContextEntry"},"maxItems":20},"searchCrm":{"type":"boolean","example":true},"hideForm":{"type":"boolean","example":true},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Hidden key/value map, never shown to the agent or the visitor. It is merged into post-call integration `metadata` (agent < link < call), except `notify_emails`, which only the link or agent sets: a call-level value is dropped. Set `notify_emails` to a list of up to 25 addresses to email after each call through this link, when an email integration has `includeLinkRecipients` on.","example":{"notify_emails":["dan@acme.com"],"campaign":"q4-outbound"}},"pinnedConfigVersionId":{"type":"string","nullable":true,"format":"uuid","example":"0b7c3f1e-5a2d-4c8e-9f10-3e2b6a7d8c91","description":"Internal links only. A published version of this agent that every call through the link serves, whatever the agent publishes later. A request that names another `configId` still runs that one, as a test."},"pinnedEnv":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"example":"locked-0123456789abcdef0123456789abcdef01234567","description":"Internal links only. The runtime every call through the link runs on: a catalog environment name, `locked-<sha>` or `rev-<sha>`, as a version's `env` pin takes."}}},"RecordLinkArrivalResponse":{"type":"object","properties":{"agentPublicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a"}},"required":["agentPublicId"]},"RecordLinkArrivalBody":{"type":"object","properties":{"browserId":{"type":"string","minLength":1,"maxLength":128,"example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["browserId"]},"RefreshLinkContextResponse":{"type":"object","properties":{"status":{"type":"string","enum":["resolved","no_identity","no_match","multiple_matches","no_account","provider_error","timeout","no_connection","no_mappings","crm_disabled","redirect"]}},"required":["status"]},"RefreshLinkContextBody":{"type":"object","properties":{}},"AccountTaskListResponse":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether tasks run in this environment."},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/AccountTask"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/AccountTaskResult"}}},"required":["enabled","tasks","results"]},"AccountTask":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"example":"AI credits"},"instructions":{"type":"string","minLength":1,"maxLength":1000,"example":"Report the AI credits remaining on this workspace."},"startUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri","description":"Page to open first, on the same site as each profile's Check URL. Null opens the Check URL."},"alertWhen":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"example":"fewer than 3,000 credits left","description":"Plain-language condition on the answer that alerts Sable. Null never alerts."},"rerouteCalls":{"type":"boolean","description":"While a profile's answer meets alertWhen, a call that lets Sable pick a profile gets another one, if one is free that is neither alerting nor found signed out. Applies in organizations that skip signed-out profiles. A Figma demo-file pool chooses its own profile and ignores this."},"intervalHours":{"type":"integer","minimum":1,"maximum":168,"example":24},"enabled":{"type":"boolean"},"id":{"type":"number"},"reported":{"type":"boolean","description":"An outside check reports each profile's result with `PUT /account-task-results/{accountId}`, and Sable's sign-in check does not run the task. The check decides whether a value alerts; `alertWhen` is the wording its alerts quote. Set when the task is created."},"runRequestedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["name","instructions","startUrl","alertWhen","rerouteCalls","intervalHours","enabled","id","reported","runRequestedAt","createdAt","updatedAt"]},"AccountTaskResult":{"type":"object","properties":{"taskId":{"type":"number"},"accountId":{"type":"number"},"skipped":{"type":"boolean","description":"This profile doesn't run the task."},"status":{"type":"string","nullable":true,"enum":["answered","unknown",null],"description":"Null until the task first runs."},"reason":{"type":"string","nullable":true,"example":"answered","description":"Machine-readable reason code."},"value":{"anyOf":[{"type":"number"},{"type":"boolean"},{"type":"string"},{"nullable":true}]},"evidence":{"type":"string","nullable":true,"description":"The page text the value was read from."},"alerting":{"type":"boolean","nullable":true,"description":"Whether the answer meets the task's alertWhen."},"ranAt":{"type":"string","nullable":true,"format":"date-time"},"unknownStreak":{"type":"integer"}},"required":["taskId","accountId","skipped","status","reason","value","evidence","alerting","ranAt","unknownStreak"]},"AccountTaskResponse":{"type":"object","properties":{"task":{"$ref":"#/components/schemas/AccountTask"}},"required":["task"]},"CreateAccountTaskBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"example":"AI credits"},"instructions":{"type":"string","minLength":1,"maxLength":1000,"example":"Report the AI credits remaining on this workspace."},"startUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri","description":"Page to open first, on the same site as each profile's Check URL. Null opens the Check URL."},"alertWhen":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"example":"fewer than 3,000 credits left","description":"Plain-language condition on the answer that alerts Sable. Null never alerts."},"rerouteCalls":{"type":"boolean","description":"Defaults to false."},"intervalHours":{"type":"integer","minimum":1,"maximum":168,"example":24,"description":"Defaults to 24."},"enabled":{"type":"boolean","description":"Defaults to true."},"orgId":{"type":"number"},"reported":{"type":"boolean","description":"Defaults to false."}},"required":["name","instructions","orgId"],"additionalProperties":false},"UpdateAccountTaskBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"example":"AI credits"},"instructions":{"type":"string","minLength":1,"maxLength":1000,"example":"Report the AI credits remaining on this workspace."},"startUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri","description":"Page to open first, on the same site as each profile's Check URL. Null opens the Check URL."},"alertWhen":{"type":"string","nullable":true,"minLength":1,"maxLength":200,"example":"fewer than 3,000 credits left","description":"Plain-language condition on the answer that alerts Sable. Null never alerts."},"rerouteCalls":{"type":"boolean","description":"While a profile's answer meets alertWhen, a call that lets Sable pick a profile gets another one, if one is free that is neither alerting nor found signed out. Applies in organizations that skip signed-out profiles. A Figma demo-file pool chooses its own profile and ignores this."},"intervalHours":{"type":"integer","minimum":1,"maximum":168,"example":24},"enabled":{"type":"boolean"}},"additionalProperties":false},"AccountTaskResultResponse":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/AccountTaskResult"}},"required":["result"]},"AccountTaskSkipBody":{"type":"object","properties":{"skipped":{"type":"boolean"}},"required":["skipped"],"additionalProperties":false},"AccountTaskReportBody":{"oneOf":[{"type":"object","properties":{"taskId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"A task created with `reported`."},"observedAt":{"type":"string","format":"date-time","description":"When the check read the value. A retry sends the same time. A report no newer than the profile's stored result changes nothing, and one read before the task was last edited is refused."},"status":{"type":"string","enum":["answered"]},"value":{"anyOf":[{"type":"number"},{"type":"boolean"},{"type":"string","maxLength":200}]},"alerting":{"type":"boolean","description":"Whether the value meets the task's alertWhen, as the check judges it."},"evidence":{"type":"string","minLength":1,"maxLength":500,"description":"What the value was read from."}},"required":["taskId","observedAt","status","value","alerting"],"additionalProperties":false},{"type":"object","properties":{"taskId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"A task created with `reported`."},"observedAt":{"type":"string","format":"date-time","description":"When the check read the value. A retry sends the same time. A report no newer than the profile's stored result changes nothing, and one read before the task was last edited is refused."},"status":{"type":"string","enum":["unknown"]},"reason":{"type":"string","pattern":"^[a-z0-9_]{1,60}$","example":"not_found","description":"Machine-readable reason code."}},"required":["taskId","observedAt","status","reason"],"additionalProperties":false}]},"AccountSignInReportResponse":{"type":"object","properties":{"health":{"$ref":"#/components/schemas/AccountHealth"}},"required":["health"]},"AccountHealth":{"type":"object","properties":{"accountId":{"type":"number","example":1},"method":{"type":"string","example":"browser","description":"Check that produced this observation."},"status":{"type":"string","enum":["healthy","signed_out","unknown"],"description":"`healthy` = the app page opened signed in; `signed_out` = it showed a login page; `unknown` = the check could not run or the page proved nothing."},"reason":{"type":"string","example":"login_redirect","description":"Machine-readable reason code."},"checkedAt":{"type":"string","format":"date-time"},"lastHealthyAt":{"type":"string","nullable":true,"format":"date-time"},"failureStreak":{"type":"integer","description":"Consecutive signed-out observations."},"hosts":{"type":"array","items":{"type":"string"},"example":["app.vanta.com"],"description":"Host of the page checked."}},"required":["accountId","method","status","reason","checkedAt","lastHealthyAt","failureStreak","hosts"]},"AccountSignInReportBody":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","signed_out"],"description":"`healthy` = signed in; `signed_out` = signed out. A check that could not tell reports nothing, and its last reading stops counting after two hours."},"reason":{"type":"string","pattern":"^[a-z0-9_]{1,60}$","example":"session_expired","description":"Machine-readable reason code."},"observedAt":{"type":"string","format":"date-time","description":"When the check looked. A retry sends the same time. A report no newer than the stored one changes nothing."}},"required":["status","reason","observedAt"],"additionalProperties":false},"AccountCleanupListResponse":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/AccountCleanupTask"}},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"number"},"assignment":{"type":"object","properties":{"taskId":{"type":"number"},"mode":{"type":"string","enum":["dry_run","live"]}},"required":["taskId","mode"]}},"required":["accountId","assignment"]}}},"required":["tasks","accounts"]},"AccountCleanupTask":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"example":"HubSpot demo reset"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"example":"Move any deals, contacts and notes the agent created during the call to trash."},"protectedItems":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50,"example":["Acme Corp","Q3 pipeline"],"description":"Names the cleanup must never touch, such as the demo's seeded records."},"enabled":{"type":"boolean"},"id":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["name","instructions","protectedItems","enabled","id","createdAt","updatedAt"]},"AccountCleanupTaskResponse":{"type":"object","properties":{"task":{"$ref":"#/components/schemas/AccountCleanupTask"}},"required":["task"]},"CreateAccountCleanupTaskBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"example":"HubSpot demo reset"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"example":"Move any deals, contacts and notes the agent created during the call to trash."},"protectedItems":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50,"example":["Acme Corp","Q3 pipeline"],"description":"Defaults to none."},"enabled":{"type":"boolean","description":"Defaults to true."},"orgId":{"type":"number"}},"required":["name","instructions","orgId"],"additionalProperties":false},"UpdateAccountCleanupTaskBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"example":"HubSpot demo reset"},"instructions":{"type":"string","minLength":1,"maxLength":2000,"example":"Move any deals, contacts and notes the agent created during the call to trash."},"protectedItems":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50,"example":["Acme Corp","Q3 pipeline"],"description":"Names the cleanup must never touch, such as the demo's seeded records."},"enabled":{"type":"boolean"}},"additionalProperties":false},"AccountCleanupResponse":{"type":"object","properties":{"assignment":{"$ref":"#/components/schemas/AccountCleanupAssignment"},"runs":{"type":"array","items":{"$ref":"#/components/schemas/AccountCleanupRun"},"description":"The latest runs, newest first."},"liveReadyTaskIds":{"type":"array","items":{"type":"integer"},"description":"Tasks that can go live on this profile: a dry run here planned the task as it reads now."}},"required":["assignment","runs","liveReadyTaskIds"]},"AccountCleanupAssignment":{"type":"object","nullable":true,"properties":{"accountId":{"type":"number"},"taskId":{"type":"number"},"mode":{"type":"string","enum":["dry_run","live"],"description":"`dry_run` proposes a plan after each call for review and changes nothing. `live` carries the plan out and verifies it; it needs a planned dry run of the task on the profile first."},"updatedAt":{"type":"string","format":"date-time"}},"required":["accountId","taskId","mode","updatedAt"]},"AccountCleanupRun":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"taskId":{"type":"number","nullable":true,"description":"Null once the task is deleted."},"taskName":{"type":"string"},"mode":{"type":"string","enum":["dry_run","live"]},"status":{"type":"string","enum":["in_call","running","planned","cleaning","verifying","clean","failed"],"description":"`planned`: a dry run proposed `plan`. `clean`: a live run was verified. `failed`: the run stopped; a failed live run alerts Sable. Calls use the profile again either way."},"instructions":{"type":"string"},"changeList":{"type":"string","nullable":true,"description":"What the call did, as the cleanup agent saw it."},"plan":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AccountCleanupStep"}},"execution":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AccountCleanupStepResult"}},"verification":{"$ref":"#/components/schemas/AccountCleanupVerification"},"actions":{"type":"integer","nullable":true,"description":"Changes a live run made in the app."},"failureReason":{"type":"string","nullable":true,"example":"signed_out"},"callStartedAt":{"type":"string","format":"date-time"},"callEndedAt":{"type":"string","nullable":true,"format":"date-time"},"startedAt":{"type":"string","nullable":true,"format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","accountId","taskId","taskName","mode","status","instructions","changeList","plan","execution","verification","actions","failureReason","callStartedAt","callEndedAt","startedAt","finishedAt"]},"AccountCleanupStep":{"type":"object","properties":{"action":{"type":"string"},"target":{"type":"string"},"evidence":{"type":"string","description":"The object's URL or ID, as the page showed it."},"changeIndex":{"type":"integer","nullable":true,"description":"The change-list entry this undoes; null for an object found created after the call started."}},"required":["action","target","evidence","changeIndex"]},"AccountCleanupStepResult":{"type":"object","properties":{"step":{"type":"integer","description":"1-based position in the plan."},"outcome":{"type":"string","enum":["changed","not_needed","failed","not_reported"]},"note":{"type":"string"}},"required":["step","outcome","note"]},"AccountCleanupVerification":{"type":"object","nullable":true,"properties":{"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"verdict":{"type":"string","enum":["undone","remains"]},"evidence":{"type":"string","description":"Text the verifier was shown that proves the verdict."}},"required":["step","verdict","evidence"]}},"protectedItems":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"present":{"type":"boolean"},"evidence":{"type":"string"}},"required":["item","present","evidence"]}}},"required":["steps","protectedItems"]},"AccountCleanupAssignmentResponse":{"type":"object","properties":{"assignment":{"$ref":"#/components/schemas/AccountCleanupAssignment"}},"required":["assignment"]},"PutAccountCleanupAssignmentBody":{"type":"object","properties":{"taskId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"mode":{"type":"string","enum":["dry_run","live"],"description":"Defaults to dry_run."}},"required":["taskId"],"additionalProperties":false},"AccountListResponse":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"nextCursor":{"type":"string","nullable":true,"description":"Present when `limit` is sent. Null on the last page."},"total":{"type":"integer","minimum":0,"description":"Present when `limit` is sent. Accounts matching `q` and `status`."},"totalInOrg":{"type":"integer","minimum":0,"description":"Present when `limit` is sent. Every non-deleted account in the organization."}},"required":["accounts"]},"AccountResponse":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"}},"required":["account"]},"CreateAccountBody":{"type":"object","properties":{"orgId":{"type":"number"},"alias":{"type":"string","minLength":1,"maxLength":128,"example":"demo-user"}},"required":["alias"],"additionalProperties":false},"AccountStatusesResponse":{"type":"object","properties":{"statuses":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AccountStatus"},"description":"Status by account id. Ids outside the caller's organization, deleted or unknown are omitted, not errors."}},"required":["statuses"]},"AccountStatus":{"type":"object","properties":{"status":{"type":"string","enum":["uninitialized","free","claimed","shared"],"description":"`uninitialized` = no profile tar saved; `free` = a tar exists and no live claim lock; `claimed` = a session holds the claim lock; `shared` = a shareable account (reusable by N concurrent sessions, never locked)."},"claim":{"type":"object","nullable":true,"properties":{"sandboxClaim":{"type":"string"},"expiresAt":{"type":"string","description":"ISO timestamp the lock auto-expires at"}},"required":["sandboxClaim","expiresAt"]}},"required":["status"]},"AccountHealthListResponse":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether sign-in checks run in this environment."},"health":{"type":"array","items":{"$ref":"#/components/schemas/AccountHealth"}},"pending":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"number"},"state":{"type":"string","enum":["checking","waiting_for_call","waiting_for_browser","busy"],"description":"Check now with no result yet: `checking` = running; `waiting_for_call` / `waiting_for_browser` = gave way and retries for ten minutes; `busy` = gave up after that."}},"required":["accountId","state"]},"description":"Check now requests without a result yet."}},"required":["enabled","health","pending"]},"AccountHealthAlertDestinationResponse":{"type":"object","properties":{"destination":{"$ref":"#/components/schemas/AccountHealthAlertDestination"}},"required":["destination"]},"AccountHealthAlertDestination":{"type":"object","nullable":true,"properties":{"teamId":{"type":"string","example":"T012AB3C4","description":"Slack workspace of the org's Aidan install."},"teamName":{"type":"string"},"channelId":{"type":"string","example":"C024BE91L"},"channelName":{"type":"string"},"installStatus":{"type":"string","enum":["active","reauthorization_required","revoked"],"description":"Alerts pause until Aidan is reconnected when this is not `active`."},"lastErrorCode":{"type":"string","nullable":true,"description":"Why the last delivery failed; cleared by the next successful one."},"lastErrorAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["teamId","teamName","channelId","channelName","installStatus","lastErrorCode","lastErrorAt"]},"SetAccountHealthAlertDestinationBody":{"type":"object","properties":{"orgId":{"type":"number"},"teamId":{"type":"string","minLength":1,"maxLength":32,"description":"Slack workspace id of the org's Aidan install."},"channelId":{"type":"string","pattern":"^[CG][A-Z0-9]{2,}$","example":"C024BE91L"}},"required":["teamId","channelId"],"additionalProperties":false},"UpdateAccountBody":{"type":"object","properties":{"alias":{"type":"string","minLength":1,"maxLength":128},"signinActions":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}},{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"},"condition":{"anyOf":[{"type":"string"},{"type":"object","properties":{"state":{"type":"string"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"timeout":{"type":"number"}},"additionalProperties":true}]},"then":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}},"else":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"url":{"type":"string"},"urlPattern":{"type":"string"},"timeout":{"type":"number"},"locator":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"value":{"type":"string"},"key":{"type":"string"},"waitAfter":{"type":"boolean"},"state":{"type":"string"},"expression":{"type":"string"}},"required":["action"],"additionalProperties":true}}},"required":["action"],"additionalProperties":true}}]},"variables":{"$ref":"#/components/schemas/AccountVariables"},"isShareable":{"type":"boolean"},"loginUsername":{"type":"string","nullable":true,"maxLength":512},"loginPassword":{"type":"string","nullable":true,"minLength":1,"maxLength":512},"usesGoogleWorkspaceLogin":{"type":"boolean"},"isProduction":{"type":"boolean"},"healthCheck":{"$ref":"#/components/schemas/AccountHealthCheck"}},"additionalProperties":false},"FinalizeAccountProfileBody":{"type":"object","properties":{},"additionalProperties":false},"AccountProfileDownloadUrlResponse":{"type":"object","properties":{"downloadUrl":{"type":"string","example":"https://storage.googleapis.com/..."},"expiresInSeconds":{"type":"number","example":300}},"required":["downloadUrl","expiresInSeconds"]},"AccountSnapshotBody":{"type":"object","properties":{"session":{"type":"string","minLength":1,"description":"nickel session token returned by /accounts/{id}/nickel-claim","example":"nickel-abc123:1700000000:zzz"},"controlToken":{"type":"string","minLength":1,"description":"nickel control token returned by /accounts/{id}/nickel-claim. Used to authenticate the pod /save-profile RPC through the exchange's control proxy before the resulting tar is uploaded.","example":"nickel-abc123:zzz"},"cell":{"type":"string","nullable":true,"description":"The cell returned by /accounts/{id}/nickel-claim. The save-profile + account/save round-trip is pinned to `<cell>.<exchange-host>`. Omit/null for a pre-cell exchange (falls back to the anycast base).","example":"us-west1-b"}},"required":["session","controlToken"],"additionalProperties":false},"AccountHealthCheckResponse":{"type":"object","properties":{"result":{"type":"string","enum":["checked","queued","recent"],"description":"`checked` = recorded now; `queued` = the saved profile changed and is being read; `recent` = checked within the last minute, so the stored result stands."},"health":{"allOf":[{"$ref":"#/components/schemas/AccountHealth"},{"nullable":true}]}},"required":["result","health"]},"AccountNickelClaimResponse":{"type":"object","properties":{"session":{"type":"string"},"controlToken":{"type":"string"},"rdToken":{"type":"string"},"iceServers":{"type":"array","items":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"}},"username":{"type":"string"},"credential":{"type":"string"}},"required":["urls","username","credential"]}},"cell":{"type":"string","nullable":true,"example":"us-west1-b","description":"The cell the session lives in; clients pin subsequent calls to `<cell>.<exchange-host>`."},"exchangeUrl":{"type":"string","format":"uri","description":"Server-derived cell-pinned exchange URL for this claim."},"releaseToken":{"type":"string","description":"Opaque receipt for POST /accounts/{id}/nickel-unclaim."},"releaseExpiresAt":{"type":"string","format":"date-time","description":"Maximum release receipt lifetime (three hours)."}},"required":["session","controlToken","rdToken","iceServers","exchangeUrl","releaseToken","releaseExpiresAt"]},"AccountNickelUnclaimResponse":{"type":"object","properties":{"status":{"type":"string","enum":["accepted"]}},"required":["status"]},"AccountNickelUnclaimBody":{"type":"object","properties":{"session":{"type":"string","minLength":1,"maxLength":2048},"cell":{"type":"string","nullable":true,"pattern":"^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$"},"releaseToken":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque release receipt returned by this account's nickel-claim. Never use the shared exchange token."}},"required":["session","releaseToken"],"additionalProperties":false},"AccountLockHeartbeatResponse":{"type":"object","properties":{"lockExpiresAt":{"type":"string","description":"ISO timestamp the lock now expires at after renewal."}},"required":["lockExpiresAt"]},"AccountLockBody":{"type":"object","properties":{"room":{"type":"string","minLength":1,"maxLength":128,"example":"room-1a2b3c4d","description":"Key the claim lock was acquired under: the LiveKit room name, or the key a switch claim returned."}},"required":["room"]},"AccountLockReleaseResponse":{"type":"object","properties":{"released":{"type":"boolean","description":"True if a lock was cleared; false if none was held by the room."}},"required":["released"]},"AccountClaimResponse":{"type":"object","properties":{"key":{"type":"string","example":"room-1a2b3c4d/agt_HzmKnZTmjHjv6Z88wN6RK","description":"The lock key to renew and release the claim under (`/account-locks/heartbeat`, `/account-locks/release`)."},"accountId":{"type":"string","description":"The claimed account; absent when none is bound."},"accountLockRequired":{"type":"boolean","description":"True when the account is exclusive and locked."}},"required":["key","accountLockRequired"]},"AccountClaimBody":{"allOf":[{"$ref":"#/components/schemas/AccountLockBody"},{"type":"object","properties":{"room":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[^/]+$","example":"room-1a2b3c4d","description":"The LiveKit room of the call that switched into the agent; it has no slash."},"org":{"type":"string","minLength":1,"maxLength":64,"example":"org_Nt9ij5Umpee6aKv78FECK","description":"The agent's org."}},"required":["org"]}]},"CallSigninReportResponse":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","signed_out","unknown"]},"reason":{"type":"string"},"credentialsAvailable":{"type":"boolean","description":"The page is signed out and the account has a saved login for its origin."}},"required":["status","reason","credentialsAvailable"]},"CallSigninReportBody":{"type":"object","properties":{"room":{"type":"string","minLength":1,"maxLength":128,"example":"room-1a2b3c4d","description":"Key the claim lock was acquired under: the LiveKit room name, or the key a switch claim returned."},"accountId":{"type":"string","minLength":1,"maxLength":64,"example":"acc_u7q52hBmj2YgE5VXk6Tjc","description":"Public id of the account the room's browser restored (its `nickelAccountId`)."},"page":{"$ref":"#/components/schemas/CallSigninPage"},"loaded":{"type":"boolean","description":"Whether the page finished loading before it was observed."},"observedAt":{"type":"string","format":"date-time","description":"When the call observed the page. A report older than the account's latest sign-in result is ignored."}},"required":["room","accountId","page","loaded"]},"CallSigninPage":{"type":"object","properties":{"href":{"type":"string","maxLength":2048,"format":"uri","description":"Origin and path of the page, without query or fragment."},"readyState":{"type":"string","maxLength":32},"passwordField":{"type":"boolean"},"identifierForm":{"type":"boolean"},"federatedLogin":{"type":"boolean"},"loginFrame":{"type":"boolean"},"signinPrompt":{"type":"boolean"},"embeddedFrame":{"type":"boolean"},"challenge":{"type":"boolean"},"textLength":{"type":"integer","minimum":0},"httpStatus":{"type":"integer","nullable":true}},"required":["href","readyState","passwordField","identifierForm","federatedLogin","loginFrame","signinPrompt","embeddedFrame","challenge","textLength","httpStatus"]},"CallSigninCredentialsResponse":{"type":"object","properties":{"origin":{"type":"string","description":"The only HTTPS origin the values may be filled on."},"username":{"type":"string"},"password":{"type":"string"}},"required":["origin","username","password"]},"CallSigninCredentialsBody":{"type":"object","properties":{"room":{"type":"string","minLength":1,"maxLength":128,"example":"room-1a2b3c4d","description":"Key the claim lock was acquired under: the LiveKit room name, or the key a switch claim returned."},"accountId":{"type":"string","minLength":1,"maxLength":64,"example":"acc_u7q52hBmj2YgE5VXk6Tjc","description":"Public id of the account the room's browser restored (its `nickelAccountId`)."},"href":{"type":"string","maxLength":2048,"format":"uri","description":"The login page the saved values will be filled on."}},"required":["room","accountId","href"]},"SetAgentCallCapsBody":{"type":"object","properties":{"dailyCallsPerCaller":{"type":"integer","nullable":true,"minimum":0,"maximum":2147483647},"dailyCallsPerEmailDomain":{"type":"integer","nullable":true,"minimum":0,"maximum":2147483647}},"required":["dailyCallsPerCaller","dailyCallsPerEmailDomain"],"additionalProperties":false},"PinnedList":{"type":"object","properties":{"people":{"type":"array","items":{"$ref":"#/components/schemas/PinnedRecord"}}},"required":["people"],"additionalProperties":false},"PinnedRecord":{"type":"object","properties":{"email":{"type":"string"},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","minLength":1,"maxLength":500},"visibility":{"type":"string","enum":["verified","email"]},"updated_by":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","text","visibility","updated_by","updated_at"],"additionalProperties":false}},"research_suppressed":{"type":"boolean"}},"required":["email","facts","research_suppressed"],"additionalProperties":false},"PutPinnedBody":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","minLength":1,"maxLength":500},"visibility":{"type":"string","enum":["verified","email"],"default":"verified"}},"required":["text"],"additionalProperties":false},"maxItems":20},"research_suppressed":{"type":"boolean"}},"required":["email","facts","research_suppressed"],"additionalProperties":false},"SlideRenderResponse":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public https address of the rendered slide; it ends in `.png`."},"kind":{"type":"string","enum":["still"],"description":"What the slide plays as. Only stills are rendered today."}},"required":["url","kind"]},"SlideRenderBody":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"maxLength":128,"example":"agt_8dM2aJAds7G2DsxGceFXd","description":"The agent whose brand the slide is drawn in; its organization is derived from it, never supplied."},"title":{"type":"string","minLength":1,"maxLength":200,"example":"What Sable can do","description":"The slide's heading."},"brief":{"type":"string","maxLength":4000,"default":"","example":"Journeys structure the conversation; Persona shapes delivery; Knowledge grounds live answers","description":"What a bullets slide says: points separated by semicolons or new lines. For freeform, the facts the slide may use, and nothing else."},"layout":{"type":"string","enum":["bullets","comparison","freeform"],"default":"bullets","description":"bullets lists the brief's points; comparison sets left against right in two columns; freeform lets a model lay the slide out from the brief's facts, falling back to bullets when its slide does not fit."},"intent":{"type":"string","maxLength":500,"example":"Contrast Sable with prebuilt-demo tools on how each handles a buyer's question","description":"For freeform: what the slide should get across, which guides its layout."},"left":{"type":"string","maxLength":2000,"example":"Prepared demos: fixed screens; manual editing to improve","description":"A comparison's left column: a heading, a colon, then points separated by semicolons."},"right":{"type":"string","maxLength":2000,"example":"Sable: leads a live conversation; answers contextual questions","description":"A comparison's right column, written the same way."}},"required":["agentId","title"],"description":"Lengths are counted in characters (Unicode code points). What else a slide needs depends on its layout: a comparison needs non-blank left and right, a freeform slide a non-blank brief.","oneOf":[{"properties":{"layout":{"type":"string","enum":["bullets"]}}},{"properties":{"layout":{"type":"string","enum":["comparison"]},"left":{"type":"string","pattern":"\\S"},"right":{"type":"string","pattern":"\\S"}},"required":["layout","left","right"]},{"properties":{"layout":{"type":"string","enum":["freeform"]},"brief":{"type":"string","pattern":"\\S"}},"required":["layout","brief"]}]},"SlidePackUploadUrlResponse":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["exists"]},"url":{"type":"string","format":"uri","description":"The address to pin as `pack.url`."},"gcsPath":{"type":"string"}},"required":["status","url","gcsPath"],"description":"The pack is already stored; nothing needs uploading."},{"type":"object","properties":{"status":{"type":"string","enum":["upload"]},"url":{"type":"string","format":"uri","description":"The address to pin as `pack.url`."},"gcsPath":{"type":"string"},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Send exactly these headers with the PUT."}},"required":["url","method","headers"],"description":"A 412 from the PUT means the pack was stored meanwhile."}},"required":["status","url","gcsPath","upload"]}]},"SlidePackUploadUrlBody":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}$","example":"acme-tour","description":"The pack's name; usually the agent's slug."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The archive's sha256, which the config pins and the platform checks when it loads the pack."},"byteSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":8388608}},"required":["name","sha256","byteSize"]},"CallOpeningResponse":{"allOf":[{"$ref":"#/components/schemas/CallSlideResponse"},{"type":"object","properties":{"opening":{"type":"boolean","enum":[true]}},"required":["opening"]}]},"CallSlideResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The slide's id, which a later request names in based_on."},"url":{"type":"string","format":"uri","description":"Public https address of the slide's page; it ends in `.html`."},"made":{"type":"string","enum":["template","designed"],"description":"template: one of the pack's templates, filled; designed: a body the model laid out in the brand."},"template":{"type":"string","description":"The selected composition, or the template filled when made is template."}},"required":["id","url","made"]},"CallSlideBody":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120,"example":"Plans compared","description":"The slide's name in a few words."},"prompt":{"type":"string","minLength":1,"maxLength":4000,"example":"Compare the two plans; Starter: 3 seats, $20; Team: 10 seats, $80","description":"What the slide should show, then each fact, name and number it may use."},"effort":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"Touches only a slide the model designs: low shows it fewer examples, high adds a second pass that checks the body and fixes it."},"template":{"type":"string","enum":["opening"],"description":"Opening composition using the call’s verified company context and agent theme."},"language":{"type":"string","enum":["af","ar","hy","az","be","bs","bg","ca","zh","hr","cs","da","nl","en","et","fi","fr","gl","de","el","he","hi","hu","is","id","it","ja","kn","kk","ko","lv","lt","mk","ms","mr","mi","ne","no","fa","pl","pt","ro","ru","sr","sk","sl","es","sw","sv","tl","ta","th","tr","uk","ur","vi","cy","bn","te","yue"],"description":"Active conversation language; omitted requests retain the configured language."},"based_on":{"type":"string","format":"uuid","description":"A slide made earlier in this call to revise: the new one keeps everything the prompt does not change."}},"required":["title","prompt"]},"BrandLookup":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string","nullable":true},"colors":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"name":{"type":"string","nullable":true},"usage":{"type":"string","nullable":true}},"required":["hex","name","usage"]}},"logos":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"kind":{"type":"string","description":"logo, icon, symbol or other"},"backgrounds":{"type":"array","items":{"type":"string","enum":["light","dark"]},"description":"Backgrounds the logo reads on; empty when the provider does not say"},"format":{"type":"string","nullable":true},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true}},"required":["url","kind","backgrounds","format","width","height"]}},"fonts":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"role":{"type":"string","nullable":true},"weight":{"type":"number","nullable":true}},"required":["family","role","weight"]}},"sources":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["brandfetch","rainbrand"]},"status":{"type":"string","enum":["found","not_found","rate_limited","error","disabled","pending"],"description":"rate_limited: the provider refused the request for quota or rate. pending: still looking; ask again. disabled: the provider is not configured"}},"required":["provider","status"]}}},"required":["domain","name","colors","logos","fonts","sources"]},"BrandOverride":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\r\\n]*$"},"primary":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"logo":{"type":"string","description":"Logo for light backgrounds"},"dark_logo":{"type":"string","description":"Logo for dark backgrounds"}},"additionalProperties":false,"description":"A Sable admin's correction to a domain's looked-up brand. Each field set replaces the provider's; fields left out keep it. Applies to every org's calls."},"PublicCertificate":{"type":"object","properties":{"ref":{"type":"string"},"recipientName":{"type":"string"},"recipientCompany":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":true},"organizationName":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"},"design":{"type":"object","properties":{"background":{"type":"string"},"width":{"type":"number","minimum":0,"exclusiveMinimum":true},"height":{"type":"number","minimum":0,"exclusiveMinimum":true},"filename":{"type":"string"},"slots":{"type":"array","items":{"type":"object","additionalProperties":true}},"cta":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"}},"required":["label","description","icon"]}},"required":["background","width","height","filename","slots","cta"]}},"required":["ref","recipientName","recipientCompany","agentName","organizationName","issuedAt","design"]},"BrowserListResponse":{"type":"object","properties":{"browsers":{"type":"array","items":{"$ref":"#/components/schemas/Browser"}}},"required":["browsers"]},"Browser":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a"},"orgId":{"type":"number","example":1},"url":{"type":"string","format":"uri","example":"https://us-west1-34-83-119-75.nickel.withsable.com:9000"},"turnHost":{"type":"string","nullable":true,"example":null},"turnUser":{"type":"string","nullable":true,"example":null},"turnPass":{"type":"string","nullable":true,"example":null},"region":{"type":"string","nullable":true,"example":"us-west1"},"signinVariables":{"type":"object","nullable":true,"additionalProperties":{"type":"string"},"example":null,"description":"Set when allocated; cleared when freed"},"accountId":{"type":"number","nullable":true,"example":null},"agentId":{"type":"number","nullable":true,"example":null},"agentSlug":{"type":"string","nullable":true,"example":null,"description":"Slug of the bound agent (when agentId is set), for client-side linking"},"holdId":{"type":"string","nullable":true,"format":"uuid","example":null,"description":"Non-null while reserved by a browser hold"},"effectivelyFree":{"type":"boolean","example":true,"description":"True iff the row is not bound to an agent AND has no active hold (no hold_id, or the pointed-at hold has expired). Mirrors the allocation-time definition of 'free' so UIs don't have to re-derive it."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":"string","nullable":true}},"required":["id","orgId","url","turnHost","turnUser","turnPass","region","signinVariables","accountId","agentId","agentSlug","holdId","effectivelyFree","createdAt","updatedAt","deletedAt"]},"BrowserResponse":{"type":"object","properties":{"browser":{"$ref":"#/components/schemas/Browser"}},"required":["browser"]},"CreateBrowserBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"url":{"type":"string","format":"uri"},"turnHost":{"type":"string","nullable":true},"turnUser":{"type":"string","nullable":true},"turnPass":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"accountId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["url"],"additionalProperties":false},"UpdateBrowserBody":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"turnHost":{"type":"string","nullable":true},"turnUser":{"type":"string","nullable":true},"turnPass":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"signinVariables":{"type":"object","nullable":true,"additionalProperties":{"type":"string"}},"accountId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true}},"additionalProperties":false},"HoldResponse":{"type":"object","properties":{"holdId":{"type":"string","format":"uuid"},"expiresAt":{"type":"string"},"browsers":{"type":"array","items":{"$ref":"#/components/schemas/Browser"}}},"required":["holdId","expiresAt","browsers"]},"HoldBrowsersBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"count":{"type":"integer","minimum":1,"maximum":100}},"required":["count"],"additionalProperties":false},"AgentBrowsersListResponse":{"type":"object","properties":{"browsers":{"type":"array","items":{"$ref":"#/components/schemas/Browser"}}},"required":["browsers"]},"CommitHoldBody":{"type":"object","properties":{"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["agentId"],"additionalProperties":false},"CallList":{"type":"object","properties":{"next_cursor":{"type":"string","nullable":true},"suggestion":{"type":"string"},"summary_hint":{"type":"object","properties":{"total_returned":{"type":"integer"},"has_more":{"type":"boolean"},"completion_rate_in_batch":{"type":"number"}},"required":["total_returned","has_more","completion_rate_in_batch"]},"calls":{"type":"array","items":{"$ref":"#/components/schemas/CallRow"}},"filters_applied":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"search":{"type":"string"},"link_refs":{"type":"array","items":{"type":"string"}},"customer_domains":{"type":"array","items":{"type":"string"}},"notify_email":{"type":"string"},"min_duration_seconds":{"type":"number"},"agent_id_numeric":{"type":"integer","nullable":true},"completed":{"type":"boolean"},"verdict":{"type":"string","enum":["good","acceptable","needs_work","failed"]},"moment_name":{"type":"string"},"room_name":{"type":"string"},"source":{"type":"string","enum":["human","agent","all"]},"agent_ids":{"type":"array","items":{"type":"integer"}},"scope":{"nullable":true},"limit":{"type":"number"},"cursor":{"type":"string"}}}},"required":["next_cursor","summary_hint","calls","filters_applied"]},"CallRow":{"type":"object","properties":{"session_id":{"type":"integer"},"external_session_id":{"type":"string"},"livekit_room_name":{"type":"string","nullable":true},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","nullable":true,"format":"date-time"},"duration_seconds":{"type":"number","nullable":true},"completed":{"type":"boolean"},"message_count":{"type":"integer"},"final_moment":{"type":"string","nullable":true},"participant":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true},"company":{"type":"string","nullable":true}},"required":["name","email","external_user_id","company"]},"verdict":{"type":"string","nullable":true,"enum":["good","acceptable","needs_work","failed",null]},"outro_rating":{"type":"number","nullable":true},"source":{"type":"string","enum":["human","agent"]},"summary":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"link_ref":{"type":"string","nullable":true},"link_label":{"type":"string","nullable":true},"has_user_messages":{"type":"boolean"}},"required":["session_id","external_session_id","livekit_room_name","started_at","ended_at","duration_seconds","completed","message_count","final_moment","participant","verdict","outro_rating","source","summary","agent_name","link_ref","link_label","has_user_messages"]},"CallSearch":{"type":"object","properties":{"next_cursor":{"type":"string","nullable":true},"suggestion":{"type":"string"},"summary_hint":{"type":"object","properties":{"total_returned":{"type":"integer"},"has_more":{"type":"boolean"},"distinct_sessions":{"type":"integer"}},"required":["total_returned","has_more","distinct_sessions"]},"query_interpreted":{"type":"string"},"filters_applied":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"query":{"type":"string"},"role":{"type":"string","enum":["user","agent","any"]},"verdict":{"type":"string","enum":["good","acceptable","needs_work","failed"]},"moment_name":{"type":"string"},"source":{"type":"string","enum":["human","agent","all"]}},"required":["query"]},"hits":{"type":"array","items":{"type":"object","properties":{"session_id":{"type":"integer"},"external_session_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"verdict":{"type":"string","nullable":true,"enum":["good","acceptable","needs_work","failed",null]},"moment_name":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"rank":{"type":"number"},"match":{"type":"object","properties":{"role":{"type":"string","enum":["user","agent"]},"content":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"message_id":{"type":"string"},"content_highlighted":{"type":"string"}},"required":["role","content","created_at","message_id","content_highlighted"]},"context":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","agent"]},"content":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"position":{"type":"string","enum":["before","after"]}},"required":["role","content","created_at","position"]}},"participant":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true}},"required":["name","email","external_user_id"]}},"required":["session_id","external_session_id","started_at","verdict","moment_name","agent_name","rank","match","context","participant"]}}},"required":["next_cursor","summary_hint","query_interpreted","filters_applied","hits"]},"CallPatterns":{"type":"object","properties":{"found":{"type":"string","enum":["yes","partial","no"]},"hits":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"calls":{"type":"integer"},"examples":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"sessionId":{"type":"integer"},"startedAt":{"type":"string"},"agentName":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true}},"required":["callId","sessionId","startedAt","agentName","summary"]}}},"required":["text","calls","examples"]}},"summarized":{"type":"boolean"}},"required":["found","hits","summarized"]},"CallPatternsAvailability":{"type":"object","properties":{"available":{"type":"boolean"}},"required":["available"]},"CallStats":{"type":"object","properties":{"filters":{"type":"object","properties":{"search":{"type":"string"},"link_refs":{"type":"array","items":{"type":"string"}},"customer_domains":{"type":"array","items":{"type":"string"}},"notify_email":{"type":"string"},"min_duration_seconds":{"type":"number"},"agent_ids":{"type":"array","nullable":true,"items":{"type":"integer"}},"group_by":{"type":"string","enum":["verdict","final_moment","day","completed","source","agent","link"]},"suggestion":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"agent_id_numeric":{"type":"integer","nullable":true},"completed":{"type":"boolean"},"verdict":{"type":"string","enum":["good","acceptable","needs_work","failed"]},"source":{"type":"string","enum":["human","agent","all"]},"time_zone":{"type":"string"}},"required":["agent_ids","agent_id_numeric","source","time_zone"]},"overall":{"type":"object","properties":{"total_calls":{"type":"integer"},"completed_calls":{"type":"integer"},"completion_rate":{"type":"number"},"avg_duration_seconds":{"type":"number","nullable":true},"p50_duration_seconds":{"type":"number","nullable":true},"p95_duration_seconds":{"type":"number","nullable":true},"stddev_duration_seconds":{"type":"number","nullable":true},"variance_duration_seconds":{"type":"number","nullable":true},"avg_message_count":{"type":"number"},"no_transcript_calls":{"type":"integer"},"nobody_joined_calls":{"type":"integer"},"unique_emails":{"type":"integer"},"verdict_breakdown":{"type":"object","properties":{"good":{"type":"integer"},"acceptable":{"type":"integer"},"needs_work":{"type":"integer"},"failed":{"type":"integer"},"unevaluated":{"type":"integer"}},"required":["good","acceptable","needs_work","failed","unevaluated"]},"human_calls":{"type":"integer"},"agent_calls":{"type":"integer"}},"required":["total_calls","completed_calls","completion_rate","avg_duration_seconds","p50_duration_seconds","p95_duration_seconds","stddev_duration_seconds","variance_duration_seconds","avg_message_count","no_transcript_calls","nobody_joined_calls","unique_emails","verdict_breakdown","human_calls","agent_calls"]},"groups":{"type":"array","nullable":true,"items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"},"completed":{"type":"integer"},"completion_rate":{"type":"number"},"avg_duration_seconds":{"type":"number","nullable":true},"p50_duration_seconds":{"type":"number","nullable":true},"unique_emails":{"type":"integer"},"nobody_joined":{"type":"integer"}},"required":["key","count","completed","completion_rate","avg_duration_seconds","p50_duration_seconds","unique_emails","nobody_joined"]}},"groups_truncated":{"type":"boolean","enum":[true]},"groups_left_out":{"type":"integer"}},"required":["filters","overall","groups"]},"CallCount":{"type":"object","properties":{"filters":{"type":"object","properties":{"search":{"type":"string"},"link_refs":{"type":"array","items":{"type":"string"}},"customer_domains":{"type":"array","items":{"type":"string"}},"notify_email":{"type":"string"},"min_duration_seconds":{"type":"number"},"agent_ids":{"type":"array","nullable":true,"items":{"type":"integer"}},"group_by":{"type":"string","enum":["verdict","final_moment","day","completed","source","agent","link"]},"suggestion":{"type":"string"}},"required":["agent_ids"]},"overall":{"type":"object","properties":{"total_calls":{"type":"integer"}},"required":["total_calls"]}},"required":["filters","overall"]},"CallDetail":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/CallRow"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","agent"]},"content":{"type":"string"},"moment_name":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"ms_since_start":{"type":"number"}},"required":["id","role","content","moment_name","created_at","ms_since_start"]}},"messages_truncated":{"type":"boolean"},"next_messages_cursor":{"type":"string","nullable":true},"eval":{"type":"object","properties":{"verdict":{"type":"string","nullable":true,"enum":["good","acceptable","needs_work","failed",null]},"verdict_attribution":{"type":"string","nullable":true,"enum":["agent_fault","journey_fault","infrastructure","mixed",null]},"evaluator_model":{"type":"string","nullable":true},"rubric_version":{"type":"string","nullable":true},"duration_seconds":{"type":"number","nullable":true},"detail_summary":{"type":"object","nullable":true,"properties":{"top_findings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"severity":{"type":"string"},"note":{"type":"string"}},"required":["category","severity","note"]}},"rubric_scores":{"type":"object","additionalProperties":{"type":"number"}},"latency":{"type":"object","properties":{"turns":{"type":"integer"},"perceived_median_ms":{"type":"number","nullable":true},"perceived_p95_ms":{"type":"number","nullable":true},"perceived_max_ms":{"type":"number","nullable":true},"processing_median_ms":{"type":"number","nullable":true},"first_response_ms":{"type":"number","nullable":true},"perceived_ms_by_turn":{"type":"array","items":{"type":"number"}},"slowest_turns":{"type":"array","items":{"type":"object","properties":{"turn_index":{"type":"integer","nullable":true},"perceived_ms":{"type":"number"},"raw_gap_ms":{"type":"number","nullable":true},"processing_ms":{"type":"number","nullable":true},"excluded_wait_reasons":{"type":"array","items":{"type":"string"}},"tool_calls":{"type":"array","items":{"type":"string"}},"user_text":{"type":"string"},"agent_text":{"type":"string"}},"required":["turn_index","perceived_ms","raw_gap_ms","processing_ms","excluded_wait_reasons","tool_calls"]}}},"required":["turns","perceived_median_ms","perceived_p95_ms","perceived_max_ms","processing_median_ms","first_response_ms","perceived_ms_by_turn","slowest_turns"]}},"required":["top_findings"]}},"required":["verdict","verdict_attribution","evaluator_model","rubric_version","duration_seconds","detail_summary"]},"outro_feedback":{"type":"object","nullable":true,"properties":{"chips":{"type":"object","properties":{"question":{"type":"string"},"selected":{"type":"array","items":{"type":"string"}}},"required":["question","selected"]},"poll":{"type":"object","properties":{"question":{"type":"string"},"selected":{"type":"string"}},"required":["question","selected"]},"text":{"type":"object","properties":{"question":{"type":"string"},"value":{"type":"string"}},"required":["question","value"]},"rating":{"type":"integer","minimum":0,"maximum":10},"rating_scale_max":{"type":"integer","minimum":1,"maximum":10,"description":"Upper bound of the rating scale used (1–10). Absent in legacy submissions (assume 10)."},"rating_question":{"type":"string","nullable":true,"description":"The outro rating question shown to the participant at submission time (branding.outro_rating_question or its default). Absent in legacy submissions."},"responses":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"]}},"submitted_at":{"nullable":true}}},"timings":{"type":"object","nullable":true,"properties":{"turns":{"type":"array","items":{"type":"object","properties":{"at_s":{"type":"number"},"response_ms":{"type":"number","nullable":true},"model_calls":{"type":"integer"},"stages":{"type":"object","additionalProperties":{"type":"number"}}},"required":["at_s","response_ms","model_calls","stages"]}},"turns_truncated":{"type":"boolean"},"response_median_ms":{"type":"number","nullable":true},"response_max_ms":{"type":"number","nullable":true}},"required":["turns","turns_truncated","response_median_ms","response_max_ms"]}},"required":["session","messages","messages_truncated","next_messages_cursor"]},"CallQuestions":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"theme":{"type":"string","nullable":true},"answer":{"type":"string","nullable":true},"askedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["question","theme","answer","askedAt"]}}},"required":["questions"]},"ResolvedCallInsightsScope":{"type":"object","properties":{"kind":{"type":"string","enum":["filtered","exact","focused_deployment","organization"]},"matchingCount":{"type":"integer","minimum":0},"addressableCount":{"type":"integer","minimum":0},"queryReadyCount":{"type":"integer","minimum":0},"unindexedSessionIds":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"maxItems":10000},"sessionIds":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"maxItems":10000},"submissionKey":{"type":"string","format":"uuid"},"scopeGrant":{"type":"string","minLength":1,"maxLength":4096}},"required":["kind","matchingCount","addressableCount","queryReadyCount","unindexedSessionIds","sessionIds","submissionKey","scopeGrant"],"additionalProperties":false},"CallInsightsError":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"code":{"type":"string","example":"scope_too_large"},"message":{"type":"string","example":"This call scope is too large; narrow the Calls filters"}},"required":["code","message"]}]},"ResolveCallInsightsScope":{"type":"object","properties":{"invocationId":{"type":"string","format":"uuid"},"question":{"type":"string"},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["filtered"]},"filter":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":512},"agentIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"maxItems":50},"agentNames":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":50},"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["human","agent","all"]},"customerDomains":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":50},"minSec":{"type":"integer","minimum":0},"maxSec":{"type":"integer","minimum":0},"billingCategories":{"type":"array","items":{"type":"string","enum":["billable","production","pending","internal","incomplete","empty","sable_team"]},"maxItems":5},"websiteCallType":{"type":"string","enum":["include","exclude","only"]},"includeInternal":{"type":"boolean"},"joinMethods":{"type":"array","items":{"type":"string","enum":["web","zoom","google_meet"]},"minItems":1,"maxItems":3}},"required":["source"],"additionalProperties":false}},"required":["kind","filter"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["exact"]},"externalSessionIds":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"minItems":1,"maxItems":10000}},"required":["kind","externalSessionIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["focused_deployment"]},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","agentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["organization"]}},"required":["kind"],"additionalProperties":false}]}},"required":["invocationId","question","scope"],"additionalProperties":false},"CreatedCallInsightsQuery":{"type":"object","properties":{"operation":{"$ref":"#/components/schemas/CallInsightsOperation"},"operationBinding":{"type":"string","minLength":1,"maxLength":4096}},"required":["operation","operationBinding"],"additionalProperties":false},"CallInsightsOperation":{"type":"object","properties":{"format":{"type":"number","enum":[1]},"operation":{"oneOf":[{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["query"]},"tenant_id":{"type":"string","pattern":"^org_[1-9][0-9]*$"},"created_at":{"type":"string","format":"date-time"},"asset_count":{"type":"integer","minimum":0,"maximum":10000},"state":{"type":"string","enum":["queued"]},"started_at":{"nullable":true},"finished_at":{"nullable":true},"failure":{"nullable":true}},"required":["operation_id","kind","tenant_id","created_at","asset_count","state","started_at","finished_at","failure"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["query"]},"tenant_id":{"type":"string","pattern":"^org_[1-9][0-9]*$"},"created_at":{"type":"string","format":"date-time"},"asset_count":{"type":"integer","minimum":0,"maximum":10000},"state":{"type":"string","enum":["running"]},"started_at":{"type":"string","format":"date-time"},"finished_at":{"nullable":true},"failure":{"nullable":true}},"required":["operation_id","kind","tenant_id","created_at","asset_count","state","started_at","finished_at","failure"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["query"]},"tenant_id":{"type":"string","pattern":"^org_[1-9][0-9]*$"},"created_at":{"type":"string","format":"date-time"},"asset_count":{"type":"integer","minimum":0,"maximum":10000},"state":{"type":"string","enum":["succeeded"]},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":"string","format":"date-time"},"failure":{"nullable":true}},"required":["operation_id","kind","tenant_id","created_at","asset_count","state","started_at","finished_at","failure"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["query"]},"tenant_id":{"type":"string","pattern":"^org_[1-9][0-9]*$"},"created_at":{"type":"string","format":"date-time"},"asset_count":{"type":"integer","minimum":0,"maximum":10000},"state":{"type":"string","enum":["failed"]},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":"string","format":"date-time"},"failure":{"type":"object","properties":{"code":{"type":"string","enum":["query_failed","result_verification_failed"]},"message":{"type":"string","minLength":1,"maxLength":4096}},"required":["code","message"],"additionalProperties":false}},"required":["operation_id","kind","tenant_id","created_at","asset_count","state","started_at","finished_at","failure"],"additionalProperties":false}]}},"required":["format","operation"],"additionalProperties":false},"CreateCallInsightsQuery":{"type":"object","properties":{"question":{"type":"string"},"submissionKey":{"type":"string","format":"uuid"},"sessionIds":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"minItems":1,"maxItems":10000},"scopeGrant":{"type":"string","minLength":1,"maxLength":4096}},"required":["question","submissionKey","sessionIds","scopeGrant"],"additionalProperties":false},"CallInsightsOperationBindingBody":{"type":"object","properties":{"operationBinding":{"type":"string","minLength":1,"maxLength":4096}},"required":["operationBinding"],"additionalProperties":false},"CallInsightsResult":{"oneOf":[{"type":"object","properties":{"format":{"type":"number","enum":[1]},"operation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["query"]},"tenant_id":{"type":"string","pattern":"^org_[1-9][0-9]*$"},"admission_snapshot_id":{"type":"string","format":"uuid"},"asset_count":{"type":"integer","minimum":0,"maximum":10000},"answer":{"type":"string","minLength":1,"maxLength":24576},"citations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0,"exclusiveMinimum":true},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","start_ms","end_ms","text"],"additionalProperties":false},{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"location":{"type":"string","enum":["interval"]},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0,"exclusiveMinimum":true},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","location","start_ms","end_ms","text"],"additionalProperties":false},{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"location":{"type":"string","enum":["point"]},"at_ms":{"type":"integer","minimum":0},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","location","at_ms","text"],"additionalProperties":false},{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"location":{"type":"string","enum":["whole_call"]},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","location","text"],"additionalProperties":false}]},"maxItems":32768},"analyzed_count":{"type":"integer","minimum":0,"maximum":10000},"analyzed_session_ids":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"maxItems":10000},"excluded_sessions":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"maxItems":10000}},"required":["format","operation_id","kind","tenant_id","admission_snapshot_id","asset_count","answer","citations"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"number","enum":[2]},"operation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["query"]},"tenant_id":{"type":"string","pattern":"^org_[1-9][0-9]*$"},"admission_snapshot_id":{"type":"string","format":"uuid"},"asset_count":{"type":"integer","minimum":0,"maximum":10000},"answer":{"type":"string","minLength":1,"maxLength":24576},"citations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0,"exclusiveMinimum":true},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","start_ms","end_ms","text"],"additionalProperties":false},{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"location":{"type":"string","enum":["interval"]},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0,"exclusiveMinimum":true},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","location","start_ms","end_ms","text"],"additionalProperties":false},{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"location":{"type":"string","enum":["point"]},"at_ms":{"type":"integer","minimum":0},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","location","at_ms","text"],"additionalProperties":false},{"type":"object","properties":{"session_id":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"location":{"type":"string","enum":["whole_call"]},"text":{"type":"string"},"speaker_role":{"type":"string","enum":["user","assistant"]}},"required":["session_id","location","text"],"additionalProperties":false}]},"maxItems":32768},"analyzed_count":{"type":"integer","minimum":0,"maximum":10000},"analyzed_session_ids":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"maxItems":10000},"excluded_sessions":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"maxItems":10000},"output":{"type":"object","properties":{"port":{"type":"string","enum":["answer"]},"schema_name":{"type":"string","minLength":1,"maxLength":256},"schema":{"nullable":true},"empty":{"type":"boolean"},"selection":{"type":"object","properties":{"kind":{"type":"string","enum":["calls"]},"count":{"type":"integer","minimum":0,"maximum":10000},"session_ids":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"maxItems":10000}},"required":["kind","count","session_ids"],"additionalProperties":false},"grouping_coverage":{"type":"object","properties":{"status":{"type":"string","enum":["complete","approximate"]},"total_candidate_items":{"type":"integer","minimum":0},"assigned_items":{"type":"integer","minimum":0},"unmatched_items":{"type":"integer","minimum":0},"ambiguous_items":{"type":"integer","minimum":0},"discovered_groups":{"type":"integer","minimum":0},"counts_final":{"type":"boolean"}},"required":["status","total_candidate_items","assigned_items","unmatched_items","ambiguous_items","discovered_groups","counts_final"],"additionalProperties":false},"occurrences":{"type":"array","items":{"type":"object","properties":{"ordinal":{"type":"integer","minimum":0},"value":{"nullable":true},"citation_indices":{"type":"array","items":{"type":"integer","minimum":0},"maxItems":32768}},"required":["ordinal","value","citation_indices"],"additionalProperties":false},"maxItems":65535}},"required":["port","schema_name","empty","occurrences"],"additionalProperties":false}},"required":["format","operation_id","kind","tenant_id","admission_snapshot_id","asset_count","answer","citations","output"],"additionalProperties":false}]},"CallInsightsResultReadBody":{"type":"object","properties":{"operationBinding":{"type":"string","minLength":1,"maxLength":4096},"sessionIds":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^RM_[A-Za-z0-9]+$"},"minItems":1,"maxItems":10000}},"required":["operationBinding","sessionIds"],"additionalProperties":false},"PutCallLifecycleResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"callId":{"type":"string","format":"uuid"},"lastSeenAt":{"type":"string","format":"date-time"},"namedEndReasons":{"type":"boolean","enum":[true],"description":"Advertises that end_reason accepts any snake_case name, so a runtime may send names other than human_left."}},"required":["success","callId","lastSeenAt","namedEndReasons"]},"CallLifecycleSnapshotV1":{"type":"object","properties":{"schema_version":{"type":"number","enum":[1]},"call_id":{"type":"string","format":"uuid"},"organization_public_id":{"type":"string","minLength":1,"maxLength":255},"agent_public_id":{"type":"string","minLength":1,"maxLength":255},"config_id":{"type":"string","nullable":true,"format":"uuid"},"correlation_id":{"type":"string","nullable":true,"minLength":1,"maxLength":1024},"connected_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","nullable":true,"format":"date-time"},"end_reason":{"type":"string","nullable":true,"pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Why the runtime observed the call end, as a snake_case name such as human_left or session_ceiling. Names a newer runtime adds are accepted.","example":"human_left"},"provider":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":128},"session_id":{"type":"string","nullable":true,"minLength":1,"maxLength":1024},"room_name":{"type":"string","nullable":true,"minLength":1,"maxLength":1024},"url":{"type":"string","nullable":true,"minLength":1,"maxLength":1024}},"required":["kind","session_id","room_name"]},"opening_handed_over":{"type":"boolean","description":"Only on a call that opened with another agent (`opening`), once the call ended: whether that agent handed the call over to the starting agent. Absent on every other call, and from runtimes that predate it."}},"required":["schema_version","call_id","organization_public_id","agent_public_id","config_id","connected_at","ended_at","end_reason","provider"]},"CartesiaVoiceCatalogResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"available":{"type":"boolean"},"error":{"type":"string"},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"language":{"type":"string"},"country":{"type":"string"},"gender":{"type":"string","enum":["masculine","feminine","gender_neutral"]},"accents":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string"},"native":{"type":"boolean"}},"required":["locale","native"]}}},"required":["id","name","description","language","accents"]}}},"required":["configured","available","voices"]},"CartesiaPreviewResponse":{"type":"object","properties":{"audio":{"type":"string"},"contentType":{"type":"string"}},"required":["audio","contentType"]},"CartesiaPreviewBody":{"type":"object","properties":{"voice_id":{"type":"string","minLength":1,"maxLength":128},"text":{"type":"string","minLength":1,"maxLength":300},"language":{"type":"string"}},"required":["voice_id","text"]},"DeepgramPreviewResponse":{"type":"object","properties":{"audio":{"type":"string"},"contentType":{"type":"string"}},"required":["audio","contentType"]},"DeepgramPreviewBody":{"type":"object","properties":{"model":{"type":"string","enum":["flux-hannah-en","flux-kit-en","flux-alexis-en","flux-cliff-en","flux-sienna-en","flux-cole-en","flux-brooke-en","flux-colin-en","flux-gemma-en","flux-haley-en","flux-heather-en","flux-miles-en","flux-sean-en","flux-bree-en","flux-brittany-en","flux-bruce-en","flux-conor-en","flux-donovan-en","flux-drew-en","flux-elise-en","flux-jack-en","flux-kai-en","flux-kelsey-en","flux-maeve-en","flux-marcelo-en","flux-marcus-en","flux-meena-en","flux-meghan-en","flux-naveen-en","flux-paige-en","flux-priya-en","flux-rufus-en","flux-sharon-en","flux-tanner-en","flux-wade-en","flux-wes-en"]},"text":{"type":"string","minLength":1,"maxLength":300}},"required":["model","text"]},"RimeVoiceCatalogResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"available":{"type":"boolean"},"error":{"type":"string"},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"modelId":{"type":"string","enum":["coda","mistv3"]},"name":{"type":"string"},"description":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"gender":{"type":"string","enum":["Female","Male","Non-binary"]}},"required":["id","modelId","name","description","languages"]}}},"required":["configured","available","voices"]},"RimePreviewResponse":{"type":"object","properties":{"audio":{"type":"string"},"contentType":{"type":"string"}},"required":["audio","contentType"]},"RimePreviewBody":{"type":"object","properties":{"voice_id":{"type":"string","minLength":1,"maxLength":128},"model":{"type":"string","enum":["coda","mistv3"]},"text":{"type":"string","minLength":1,"maxLength":300}},"required":["voice_id","model","text"]},"MinimaxVoiceCatalogResponse":{"type":"object","properties":{"configured":{"type":"boolean"},"available":{"type":"boolean"},"error":{"type":"string"},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name","description"]}}},"required":["configured","available","voices"]},"MinimaxPreviewResponse":{"type":"object","properties":{"audio":{"type":"string"},"contentType":{"type":"string"}},"required":["audio","contentType"]},"MinimaxPreviewBody":{"type":"object","properties":{"voice_id":{"type":"string","minLength":1,"maxLength":128},"text":{"type":"string","minLength":1,"maxLength":300}},"required":["voice_id","text"]},"GooglePreviewResponse":{"type":"object","properties":{"audio":{"type":"string"},"contentType":{"type":"string"}},"required":["audio","contentType"]},"GooglePreviewBody":{"type":"object","properties":{"model":{"type":"string","enum":["gemini-3.8-flash-lite-tts","gemini-3.8-flash-tts"]},"voice_id":{"type":"string","enum":["Achernar","Achird","Algenib","Algieba","Alnilam","Aoede","Autonoe","Callirrhoe","Charon","Despina","Enceladus","Erinome","Fenrir","Gacrux","Iapetus","Kore","Laomedeia","Leda","Orus","Puck","Pulcherrima","Rasalgethi","Sadachbia","Sadaltager","Schedar","Sulafat","Umbriel","Vindemiatrix","Zephyr","Zubenelgenubi"]},"text":{"type":"string","minLength":1,"maxLength":300}},"required":["model","voice_id","text"]},"SessionAnalyticsResponse":{"type":"object","properties":{"links":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string","nullable":true},"inProduction":{"type":"boolean","description":"The link's agent is deployed to production."},"agentHealth":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["healthy","degraded","unhealthy","unknown"]},"score":{"type":"number","nullable":true,"minimum":0,"maximum":100},"validUntil":{"type":"string","format":"date-time"}},"required":["status","score"],"description":"Current agent health for the link's agent, independent of link readiness."},"agentName":{"type":"string"},"ref":{"type":"string","nullable":true},"name":{"type":"string"},"archived":{"type":"boolean"},"sessions":{"type":"integer"},"users":{"type":"integer"},"avgTimeMinutes":{"type":"number","nullable":true},"avgTurns":{"type":"number","nullable":true},"satisfactionPct":{"type":"number","nullable":true},"sales":{"type":"object","nullable":true,"properties":{"owner":{"type":"string"},"knownIssues":{"type":"string"},"recommended":{"type":"boolean"},"updatedBy":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}},"required":["owner","knownIssues","recommended","updatedBy","updatedAt"]},"salesUnavailable":{"type":"boolean"},"readiness":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","degraded","unhealthy","unknown"]},"reasons":{"type":"array","items":{"type":"string"}},"testedAt":{"type":"string","nullable":true,"format":"date-time"},"overridden":{"type":"boolean"},"testerName":{"type":"string","nullable":true},"testerKind":{"type":"string","enum":["hitl","ds"]},"override":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["healthy","degraded","unhealthy"]},"updatedBy":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}},"required":["status"]},"validUntil":{"type":"string","nullable":true,"format":"date-time"}},"required":["status","reasons","testedAt","overridden"]}},"required":["agentId","agentName","ref","name","archived","sessions","users","avgTimeMinutes","avgTurns","satisfactionPct","readiness"]}},"dashboardUrl":{"type":"string","nullable":true,"format":"uri"}},"required":["rows","dashboardUrl"],"description":"Per-link analytics and current readiness, Sable admins only; omitted in role preview."},"stats":{"$ref":"#/components/schemas/SessionStats"},"timeSeries":{"$ref":"#/components/schemas/TimeSeries"},"range":{"$ref":"#/components/schemas/ResolvedRange"},"previousRange":{"type":"object","nullable":true,"properties":{"startDate":{"type":"string","format":"date-time","example":"2024-07-04T09:12:33.000Z"},"endDate":{"type":"string","format":"date-time","example":"2026-08-06T22:31:00.000Z"}},"required":["startDate","endDate"],"description":"Exact bounds used for period growth, or null for all-time. Older API versions omit this field."},"groupBy":{"type":"string","enum":["daily","weekly","monthly","quarterly"],"description":"Effective time-series grouping after the requested bucket is fitted to the resolved range."},"capabilities":{"type":"object","properties":{"billingClassification":{"type":"boolean"}},"required":["billingClassification"]}},"required":["stats","timeSeries","range","groupBy","capabilities"]},"SessionStats":{"type":"object","properties":{"totalSessions":{"type":"integer","example":153},"avgSessionTimeMinutes":{"type":"number","example":21.5},"avgTurnsPerSession":{"type":"number","example":6.7},"identity":{"$ref":"#/components/schemas/IdentityStats"},"csat":{"$ref":"#/components/schemas/CsatStats"},"growth":{"$ref":"#/components/schemas/Growth"}},"required":["totalSessions","avgSessionTimeMinutes","avgTurnsPerSession","identity","csat","growth"]},"IdentityStats":{"type":"object","properties":{"uniqueUsers":{"type":"integer","example":61,"description":"Distinct participants behind the sessions in scope, counted only where the participant carries an identifying key (email or external id). Participants are deduplicated per organization on those keys, so one person using two work addresses counts twice, and a repeat visitor counts once however many sessions they ran."},"anonymousSessions":{"type":"integer","example":65,"description":"Sessions in scope with no participant, or one carrying neither an email nor an external id. A participant with no key cannot be deduplicated (NULLs don't collide in the unique index), so the runtime creates a fresh row per session — counting those as users would make `uniqueUsers` approach `totalSessions` and stop answering the question. The sessions behind `uniqueUsers` are the other `totalSessions - anonymousSessions`; `uniqueUsers` counts the distinct people among them, so it is normally smaller than that remainder."},"uniqueCustomerDomains":{"type":"integer","example":14,"description":"Distinct email domains among the participants in scope, excluding consumer mailbox providers (gmail.com, outlook.com, …) — those are people rather than nameable customers, and bucketing them would add an indistinguishable +1. Internal domains follow the `includeInternal` scope flag: excluded by default, counted when internal traffic is included."}},"required":["uniqueUsers","anonymousSessions","uniqueCustomerDomains"]},"CsatStats":{"type":"object","nullable":true,"properties":{"avgRating":{"type":"number","example":4.42,"description":"Mean participant rating over the period, expressed on the `scaleMax` scale (2 decimal places)."},"scaleMax":{"type":"integer","example":5,"description":"The rating scale the average is expressed on — the most common scale among rated sessions in scope (legacy submissions count as 10)."},"ratedSessions":{"type":"integer","example":128,"description":"Sessions in scope whose outro feedback carried a rating. The denominator of `avgRating`."},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/RatingCount"},"description":"How those ratings are spread, one entry per integer rating on `scaleMax`, ascending. Ratings given on another scale are counted in the bucket they round to here, so the counts sum to `ratedSessions`. Buckets nobody picked are present at `0` — the breakdown is a bar per rating, and omitting them would close the gap. A `0` bucket appears only when someone rated 0, since outros number from 1. Empty when the breakdown aggregate failed — the headline above it still stands.","example":[{"rating":1,"sessions":2},{"rating":2,"sessions":4},{"rating":3,"sessions":11},{"rating":4,"sessions":46},{"rating":5,"sessions":65}]}},"required":["avgRating","scaleMax","ratedSessions","distribution"],"description":"Null when no session in scope was rated — callers should hide the CSAT surface entirely."},"RatingCount":{"type":"object","properties":{"rating":{"type":"integer","example":4,"description":"A rating on the `scaleMax` scale."},"sessions":{"type":"integer","minimum":0,"example":46,"description":"Sessions in scope that left this rating."}},"required":["rating","sessions"]},"Growth":{"type":"object","properties":{"sessions":{"type":"string","example":"+12.5%"},"avgTime":{"type":"string","example":"+5.2%"},"turns":{"type":"string","example":"+1.6%"},"csat":{"type":"string","example":"+0.18 pts","description":"Absolute change in average rating vs the prior period, in rating points on the same scale as `csat.scaleMax` — carries a `pts` unit because the sibling growth fields are percentages. Empty when there is nothing to compare against."}},"required":["sessions","avgTime","turns","csat"]},"TimeSeries":{"type":"object","properties":{"sessions":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/BillingTimeSeriesDataPoint"},{"$ref":"#/components/schemas/TimeSeriesDataPoint"}]},"example":[{"period":"W1","periodStart":"2026-08-10T00:00:00.000Z","periodEndExclusive":"2026-08-17T00:00:00.000Z","value":102,"billable":84,"notBillable":16,"internal":12,"empty":0,"incomplete":0,"sableTeam":4,"pending":2}]},"avgTime":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"example":[{"period":"W1","value":20},{"period":"W2","value":21}]},"turns":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"example":[{"period":"W1","value":6.2},{"period":"W2","value":6.7}]},"csat":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"description":"Average rating per bucket on the `stats.csat.scaleMax` scale, over the same periods as `sessions` so the axes align. A bucket nobody rated carries `null`, never `0` — a zero would assert the worst possible score. Empty when nothing in range was rated, and also when the series read failed — `csatUnavailable` tells the two apart.","example":[{"period":"W1","value":4.24},{"period":"W2","value":null},{"period":"W3","value":4.42}]},"csatUnavailable":{"type":"boolean","description":"`true` when the rating series could not be read, so an empty `csat` is a failed read rather than an unrated range. Absent when the series loaded.","example":true}},"required":["sessions","avgTime","turns","csat"]},"BillingTimeSeriesDataPoint":{"allOf":[{"$ref":"#/components/schemas/TimeSeriesDataPoint"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"example":125,"description":"All sessions in the bucket. Reconciles exactly to `billable + notBillable + pending`."},"periodStart":{"type":"string","format":"date-time","example":"2026-08-10T00:00:00.000Z","description":"Exact inclusive start of this bucket, clamped to the resolved Analytics range."},"periodEndExclusive":{"type":"string","format":"date-time","example":"2026-08-17T00:00:00.000Z","description":"Exact exclusive end of this bucket, clamped to the resolved Analytics range."},"billable":{"type":"integer","minimum":0,"example":84,"description":"Finished external or anonymous calls with connection evidence or a recorded end and nonblank agent speech, excluding internal, test, automated, and Sable-team traffic. Eligible legacy calls without a deployment are included."},"notBillable":{"type":"integer","minimum":0,"example":39,"description":"Explicitly excluded count. Canonically reconciles to `internal + sableTeam + empty`."},"internal":{"type":"integer","minimum":0,"example":12,"description":"Sessions whose participant email matches an organization domain."},"empty":{"type":"integer","minimum":0,"example":0,"description":"Finished calls without connection evidence or a recorded end, or finished calls without nonblank agent speech. Not billable. Unfinished calls remain pending unless an internal or tester classification applies."},"incomplete":{"type":"integer","minimum":0,"example":0,"deprecated":true,"description":"Deprecated alias of `empty`, kept for clients deployed before the rename."},"sableTeam":{"type":"integer","minimum":0,"example":4,"description":"Tester sessions, including participants on `@sable.ai` or `@withsable.com`, reserved test domains, and applicable Prolific or named tester addresses."},"pending":{"type":"integer","minimum":0,"example":2,"description":"Calls still in progress. Billing settles when the call ends."}},"required":["periodStart","periodEndExclusive","billable","notBillable","internal","empty","incomplete","sableTeam","pending"]}],"description":"Session volume split by billing status. `value = billable + notBillable + pending`, and `notBillable = internal + sableTeam + empty`."},"TimeSeriesDataPoint":{"type":"object","properties":{"period":{"type":"string","example":"W1"},"value":{"type":"number","nullable":true,"example":125}},"required":["period","value"]},"ResolvedRange":{"type":"object","properties":{"startDate":{"type":"string","format":"date-time","example":"2024-07-04T09:12:33.000Z"},"endDate":{"type":"string","format":"date-time","example":"2026-08-06T22:31:00.000Z"}},"required":["startDate","endDate"],"description":"The window these figures actually cover, after the requested range was resolved. Worth returning because it is not always derivable by the caller: `allTime` asks for everything and the server answers with the org's first session, so this is the only place that date is exposed."},"GlobalAnalyticsResponse":{"allOf":[{"$ref":"#/components/schemas/SessionAnalyticsResponse"},{"type":"object","properties":{"agentHealth":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["ready","stale"]},"computedAt":{"type":"string","format":"date-time"},"dashboardUrl":{"type":"string","format":"uri"},"agents":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string"},"agentName":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"score":{"type":"number","nullable":true,"minimum":0,"maximum":100},"status":{"type":"string","enum":["healthy","degraded","unhealthy","unknown"]},"mainIssues":{"type":"array","items":{"type":"string"},"maxItems":3},"testedAt":{"type":"string","nullable":true,"format":"date-time"},"validUntil":{"type":"string","format":"date-time"}},"required":["agentId","agentName","organizationId","organizationName","score","status","mainIssues","testedAt"]}}},"required":["status","computedAt","dashboardUrl","agents"]}]},"sentiment":{"$ref":"#/components/schemas/SentimentAnalyticsResponse"},"totalOrganizations":{"type":"integer","example":42,"description":"Live (non-deleted) organizations."},"activeOrganizations":{"type":"integer","example":17,"description":"Organizations with at least one session in the window."},"previousActiveOrganizations":{"type":"integer","example":15},"activeOrganizationsGrowth":{"type":"string","example":"+13.3%"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAnalyticsRow"}}},"required":["agentHealth","sentiment","totalOrganizations","activeOrganizations","previousActiveOrganizations","activeOrganizationsGrowth","organizations"]}]},"SentimentAnalyticsResponse":{"type":"object","properties":{"positive":{"$ref":"#/components/schemas/SentimentSlice"},"neutral":{"$ref":"#/components/schemas/SentimentSlice"},"negative":{"$ref":"#/components/schemas/SentimentSlice"},"totalAnalyzed":{"type":"integer","example":1240,"description":"Sessions in scope with a completed sentiment analysis."}},"required":["positive","neutral","negative","totalAnalyzed"]},"SentimentSlice":{"type":"object","properties":{"count":{"type":"integer","example":646},"pct":{"type":"number","example":52,"description":"Whole-number share of analyzed sessions."}},"required":["count","pct"]},"OrganizationAnalyticsRow":{"type":"object","properties":{"orgId":{"type":"integer","example":12},"publicId":{"type":"string","example":"org_8f3k2"},"name":{"type":"string","example":"Acme"},"totalSessions":{"type":"integer","example":153},"previousSessions":{"type":"integer","example":120,"description":"Sessions in the prior window of equal length; 0 for `allTime`."},"sessionsGrowth":{"type":"string","example":"+27.5%","description":"Empty for `allTime`."},"avgSessionTimeMinutes":{"type":"number","example":21.5},"avgTurnsPerSession":{"type":"number","example":6.7},"uniqueUsers":{"type":"integer","example":61},"csatAvgRating":{"type":"number","nullable":true,"example":4.3,"description":"On the org's own dominant scale (`csatScaleMax`); null when nothing in scope was rated."},"csatScaleMax":{"type":"integer","example":5},"ratedSessions":{"type":"integer","example":40},"sentiment":{"$ref":"#/components/schemas/SentimentAnalyticsResponse"},"sessionsSeries":{"type":"array","items":{"type":"integer"},"example":[12,30,44,67]}},"required":["orgId","publicId","name","totalSessions","previousSessions","sessionsGrowth","avgSessionTimeMinutes","avgTurnsPerSession","uniqueUsers","csatAvgRating","csatScaleMax","ratedSessions","sentiment","sessionsSeries"]},"GlobalSessionCountsResponse":{"type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"integer","example":12},"publicId":{"type":"string","example":"org_8f3k2"},"name":{"type":"string","example":"Acme"},"totalSessions":{"type":"integer","example":153}},"required":["orgId","publicId","name","totalSessions"]}}},"required":["organizations"]},"StageAnalyticsResponse":{"type":"object","properties":{"attributedSessions":{"type":"integer","example":847,"description":"Sessions in scope carrying moment attribution — the `percentage` denominator. Lower than `totalSessions` for ranges predating moment recording."},"stages":{"type":"array","items":{"$ref":"#/components/schemas/StageDataPoint"},"description":"Most popular moment first. Configured moments no session reached are included at 0.","example":[{"momentId":0,"stage":"Introduce yourself","count":812,"percentage":95.9},{"momentId":1,"stage":"Run an example batch","count":623,"percentage":73.6},{"momentId":2,"stage":"Detect a parallel division","count":412,"percentage":48.6}]},"totalSessions":{"type":"integer","example":847,"description":"Sessions in scope, attributed or not. `attributedSessions` is the percentage denominator."}},"required":["attributedSessions","stages","totalSessions"]},"StageDataPoint":{"type":"object","properties":{"momentId":{"type":"integer","example":0,"description":"Lowest journey moment index in this bar — its representative when several moments merged. A moment index is a position in the config the session ran, so inserting or removing a moment shifts later indices."},"members":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","example":"m_8f21c4","description":"The moment's `_uid` — what `POST /analytics/moments/labels` addresses. Empty on a journey saved before moments carried one, which cannot be named until it is re-saved."},"goal":{"type":"string","description":"This moment's own goal, whole and unmodified."},"name":{"type":"string","nullable":true,"description":"This moment's own stored display name, or null."}},"required":["uid","goal","name"]},"description":"The moments charted by this bar, ascending by index. A bar is a projection and a name belongs to a moment, so the editor works on these: every goal stays visible, and two moments sharing a bar can be named apart to split it again."},"momentIds":{"type":"array","items":{"type":"integer"},"example":[5,6,7],"description":"Every configured moment index charted by this bar. More than one when a journey runs the same moment on several paths and gives each copy the same title; `count` is distinct sessions across all of them, so a session that reached two copies counts once."},"stage":{"type":"string","example":"Knowledge base","description":"What the bar is captioned with: the display name set on this moment, else its goal. A display name is presentation only — it rides on `instructions.moments[].analytics_name`, a key no runtime surface reads, so it changes this chart and the exported report and nothing the agent or the caller sees."},"goal":{"type":"string","example":"Guide the user through setting up their knowledge base and indexing a first source","description":"The moment's configured goal, whole and unmodified — what `stage` falls back to when no display name is set, and what the chart shows on hover so a renamed bar stays traceable. Empty when the moment configures no goal."},"customName":{"type":"string","nullable":true,"example":"Knowledge base","description":"The display name stored for this moment, or null when none is set. `stage` already resolves the fallback; this is here so the editor can tell a named moment from one showing its goal."},"count":{"type":"integer","example":812,"description":"Distinct sessions that reached the moment."},"percentage":{"type":"number","example":95.9,"description":"Share of sessions in scope that reached the moment, to one decimal."}},"required":["momentId","members","momentIds","stage","goal","customName","count","percentage"]},"EngagementAnalyticsResponse":{"type":"object","properties":{"insights":{"type":"array","items":{"$ref":"#/components/schemas/EngagementInsightResult"}},"totalSessions":{"type":"integer"}},"required":["insights","totalSessions"]},"EngagementInsightResult":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["rule","llm"]},"matched":{"type":"integer","example":1159},"pct":{"type":"number","example":93,"description":"Whole-number share of sessions in scope."}},"required":["id","name","description","kind","matched","pct"]},"EngagementInsightsConfigResponse":{"type":"object","properties":{"insights":{"type":"array","items":{"$ref":"#/components/schemas/EngagementInsightConfig"}}},"required":["insights"]},"EngagementInsightConfig":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["rule","llm"]},"rule":{"$ref":"#/components/schemas/EngagementRule"},"prompt":{"type":"string","nullable":true},"sortOrder":{"type":"integer"}},"required":["id","name","description","kind","rule","prompt","sortOrder"]},"EngagementRule":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["min_duration_seconds","min_user_messages"]},"value":{"type":"integer","minimum":1,"maximum":86400}},"required":["type","value"]},"CreateEngagementInsightBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["rule","llm"]},"rule":{"$ref":"#/components/schemas/EngagementRule"},"prompt":{"type":"string","minLength":1,"maxLength":500}},"required":["name","kind"]},"ReplaceEngagementInsightsBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"insights":{"type":"array","items":{"$ref":"#/components/schemas/ReplaceEngagementInsightItem"},"maxItems":50}},"required":["insights"]},"ReplaceEngagementInsightItem":{"type":"object","properties":{"id":{"type":"integer","nullable":true},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":200},"kind":{"type":"string","enum":["rule","llm"]},"rule":{"$ref":"#/components/schemas/EngagementRule"},"prompt":{"type":"string","minLength":1,"maxLength":500}},"required":["id","name","kind"]},"ResetEngagementInsightsBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"}}},"DeleteFeedbackResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"UpdateEngagementInsightBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":200},"sortOrder":{"type":"integer","minimum":0}}},"AnalyticsDeploymentsResponse":{"type":"object","properties":{"deployments":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsDeployment"}}},"required":["deployments"]},"AnalyticsDeployment":{"type":"object","properties":{"id":{"type":"integer","example":254},"slug":{"type":"string","example":"decagon-agent-2"},"name":{"type":"string","example":"Decagon agent"},"deployEnvironment":{"type":"string","example":"production"},"isDeleted":{"type":"boolean","description":"Soft-deleted agent that still owns sessions the dashboard counts."},"sessions":{"type":"integer","description":"Sessions in scope within `timeRange`, or all-time when it is omitted.","example":340}},"required":["id","slug","name","deployEnvironment","isDeleted","sessions"]},"CustomerDomainsResponse":{"type":"object","properties":{"domains":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDomain"},"description":"Selectable domains, most active first. Reflects every active filter EXCEPT `customerDomains` itself, so the list can always offer something new to add."}},"required":["domains"]},"CustomerDomain":{"type":"object","properties":{"domain":{"type":"string","example":"adobe.com"},"sessions":{"type":"integer","example":49,"description":"Sessions in scope from this domain."}},"required":["domain","sessions"]},"QuestionThemesResponse":{"type":"object","properties":{"themes":{"type":"array","items":{"$ref":"#/components/schemas/QuestionTheme"}},"totalQuestions":{"type":"integer","description":"Questions across every visible theme in scope, not just the returned top themes. Excludes hidden themes, so it reconciles with what the customer can see."}},"required":["themes","totalQuestions"]},"QuestionTheme":{"type":"object","properties":{"themeId":{"type":"integer","example":42,"description":"Stable theme id; survives a rename, so it is what links and drill-downs key on."},"theme":{"type":"string","example":"Database setup"},"count":{"type":"integer","example":241},"samples":{"type":"array","items":{"$ref":"#/components/schemas/QuestionThemeSample"},"description":"The newest few questions in this theme, for the preview rows under it."}},"required":["themeId","theme","count","samples"]},"QuestionThemeSample":{"type":"object","properties":{"id":{"type":"integer"},"question":{"type":"string","example":"How do I connect my Postgres instance?"},"participantName":{"type":"string","nullable":true},"sessionId":{"type":"integer"},"askedAt":{"type":"string","format":"date-time"},"occurrences":{"type":"integer","description":"How many times this same question was asked in scope (>= 1).","example":27},"questionMessageId":{"type":"string","nullable":true,"example":"80421","description":"Transcript message the question was asked on, so opening the session can scroll to it."}},"required":["id","question","participantName","sessionId","askedAt","occurrences","questionMessageId"]},"ThemeQuestionsResponse":{"type":"object","properties":{"theme":{"type":"string","description":"The theme's current name, so a deep link can title itself without the theme list."},"questions":{"type":"array","items":{"$ref":"#/components/schemas/ThemeQuestionRow"}},"nextCursor":{"type":"integer","nullable":true}},"required":["theme","questions","nextCursor"]},"ThemeQuestionRow":{"type":"object","properties":{"id":{"type":"integer"},"question":{"type":"string"},"answer":{"type":"string","nullable":true},"sessionId":{"type":"integer"},"externalSessionId":{"type":"string","nullable":true},"agentName":{"type":"string"},"participantName":{"type":"string","nullable":true},"askedAt":{"type":"string","format":"date-time"},"questionMessageId":{"type":"string","nullable":true,"example":"80421","description":"Transcript message the question was asked on."},"answerMessageId":{"type":"string","nullable":true,"example":"80421","description":"Transcript message where the agent's answer begins."}},"required":["id","question","answer","sessionId","externalSessionId","agentName","participantName","askedAt","questionMessageId","answerMessageId"]},"QuestionThemeConfigListResponse":{"type":"object","properties":{"themes":{"type":"array","items":{"$ref":"#/components/schemas/QuestionThemeConfig"}}},"required":["themes"]},"QuestionThemeConfig":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","example":"Agent configuration"},"hidden":{"type":"boolean","description":"Hidden themes are excluded from the card, the page, and the totals."},"instructions":{"type":"string","nullable":true,"description":"Admin-authored guidance passed to the question extractor so it knows what belongs in this theme. Null when unset, which is the default — the model never writes this field.","example":"Cost, plans and discounts only. Invoicing and payment failures belong in Billing."},"questionCount":{"type":"integer","description":"All-time questions on this theme, unscoped by the dashboard filters.","example":40}},"required":["id","name","hidden","instructions","questionCount"]},"QuestionDuplicatesResponse":{"type":"object","properties":{"selected":{"type":"integer","example":6,"description":"Selected rows the org owns."},"withDuplicates":{"type":"integer","example":4,"description":"How many of the selected have at least one identical sibling."},"duplicateCount":{"type":"integer","example":9,"description":"Additional rows that 'all copies' would affect."}},"required":["selected","withDuplicates","duplicateCount"]},"QuestionDuplicatesBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"questionIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1,"maxItems":200,"description":"The selected question row ids. All must belong to the org, or the batch is rejected."}},"required":["questionIds"]},"SetMomentLabelsResponse":{"type":"object","properties":{"applied":{"type":"integer","example":3,"description":"How many moments were actually named. Zero means none of the uids resolved — the journey moved on since the chart was read, and nothing was written."}},"required":["applied"]},"SetMomentLabelsBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The deployment whose journey these moments belong to."},"moments":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","minLength":1,"example":"m_8f21c4","description":"The moment's `_uid`, exactly as the chart returned it in a bar's `members`. Addressing by uid rather than by goal means editing the goal keeps the name on its moment."},"label":{"type":"string","maxLength":80,"example":"Knowledge base","description":"The display name. Blank clears it and the bar goes back to showing its goal."}},"required":["uid","label"]},"maxItems":200,"description":"Applied together in one transaction — a rejected batch writes nothing."}},"required":["agentId","moments"]},"MoveQuestionsResponse":{"type":"object","properties":{"moved":{"type":"integer","example":15},"themeId":{"type":"integer","description":"The theme the questions actually landed on."}},"required":["moved","themeId"]},"MoveQuestionsBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"questionIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1,"maxItems":200,"description":"The selected question row ids. All must belong to the org, or the batch is rejected."},"themeId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Destination theme. A merge alias resolves to its surviving theme."},"includeDuplicates":{"type":"boolean","default":false,"description":"When true, also affect every other question in the same theme with identical text (case- and whitespace-insensitive), all-time and ignoring the dashboard filters. Call the duplicates endpoint first to show the admin the reach."}},"required":["questionIds","themeId"]},"DeleteQuestionsResponse":{"type":"object","properties":{"deleted":{"type":"integer","example":15}},"required":["deleted"]},"DeleteQuestionsBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"questionIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1,"maxItems":200,"description":"The selected question row ids. All must belong to the org, or the batch is rejected."},"includeDuplicates":{"type":"boolean","default":false,"description":"When true, also affect every other question in the same theme with identical text (case- and whitespace-insensitive), all-time and ignoring the dashboard filters. Call the duplicates endpoint first to show the admin the reach."}},"required":["questionIds"]},"QuestionThemeResponse":{"type":"object","properties":{"theme":{"$ref":"#/components/schemas/QuestionThemeConfig"}},"required":["theme"]},"CreateQuestionThemeBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"name":{"type":"string","minLength":1,"maxLength":60,"example":"Security review"}},"required":["name"]},"ReplaceQuestionThemesBody":{"type":"object","properties":{"orgId":{"type":"integer","description":"Organization ID (required for non-admin users)"},"themes":{"type":"array","items":{"$ref":"#/components/schemas/QuestionThemeConfigItem"},"maxItems":500,"description":"The staged edit for existing themes. Renaming one to a name another theme already holds merges the two. Themes absent from the list are left untouched — this is not a delete-by-omission replace."}},"required":["themes"]},"QuestionThemeConfigItem":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"name":{"type":"string","minLength":1,"maxLength":60},"hidden":{"type":"boolean"},"instructions":{"type":"string","nullable":true,"maxLength":500,"description":"Extraction guidance for this theme. Omit to leave it unchanged; null or an empty string clears it. Optional so a platform that predates the field can still save renames and hides."}},"required":["id","name","hidden"]},"FeedbackListResponse":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/SessionFeedbackRow"}},"nextCursor":{"type":"string","nullable":true}},"required":["sessions","nextCursor"]},"SessionFeedbackRow":{"type":"object","properties":{"sessionId":{"type":"integer"},"externalSessionId":{"type":"string","nullable":true},"agentName":{"type":"string"},"participantName":{"type":"string","nullable":true},"participantEmail":{"type":"string","nullable":true},"externalUserId":{"type":"string","nullable":true},"submittedAt":{"type":"string","format":"date-time"},"responseCount":{"type":"integer"},"questionsAsked":{"type":"integer"},"preview":{"type":"string","nullable":true},"sentiment":{"type":"string","nullable":true,"enum":["positive","neutral","negative",null]},"feedback":{"$ref":"#/components/schemas/OutroFeedback"},"certificateRef":{"type":"string","nullable":true,"example":"b1QhSjKqL7mZ2nR4tV6xYw","description":"Public ref of the completion certificate this session earned, or null. Revoked certificates read as null, so the ref always resolves on `GET /certificates/{ref}`."}},"required":["sessionId","externalSessionId","agentName","participantName","participantEmail","externalUserId","submittedAt","responseCount","questionsAsked","preview","sentiment","feedback","certificateRef"]},"OutroFeedback":{"type":"object","properties":{"chips":{"type":"object","properties":{"question":{"type":"string"},"selected":{"type":"array","items":{"type":"string"}}},"required":["question","selected"]},"poll":{"type":"object","properties":{"question":{"type":"string"},"selected":{"type":"string"}},"required":["question","selected"]},"text":{"type":"object","properties":{"question":{"type":"string"},"value":{"type":"string"}},"required":["question","value"]},"rating":{"type":"integer","minimum":0,"maximum":10},"rating_scale_max":{"type":"integer","minimum":1,"maximum":10,"description":"Upper bound of the rating scale used (1–10). Absent in legacy submissions (assume 10)."},"rating_question":{"type":"string","nullable":true,"description":"The outro rating question shown to the participant at submission time (branding.outro_rating_question or its default). Absent in legacy submissions."},"responses":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"]}},"submitted_at":{"type":"string","format":"date-time"}},"required":["submitted_at"]},"CertificatesListResponse":{"type":"object","properties":{"recipients":{"type":"array","items":{"$ref":"#/components/schemas/CertificateRecipientRow"}},"certificates":{"type":"array","items":{"$ref":"#/components/schemas/IssuedCertificateRow"},"description":"Legacy flat certificate page, populated when `view=certificates` (the default). Empty for `view=recipients`."},"nextCursor":{"type":"string","nullable":true},"total":{"type":"integer","nullable":true,"example":42,"description":"Exact number of rows in the requested view: credentials for `view=certificates`, distinct recipients for `view=recipients`. Present on the first page only (no `cursor`)."},"awardsCertificates":{"type":"boolean","nullable":true,"example":true,"description":"Whether any live agent IN SCOPE is configured to award certificates (enabled, with a background — the same two conditions issuance checks). Honours the deployment selection, so filtering to a deployment that awards nothing reports false even when a sibling awards them. True before anyone has earned one, which is what lets the surface exist for a customer who has just switched certificates on. First page only."},"hasAnyIgnoringDateRange":{"type":"boolean","nullable":true,"example":true,"description":"Whether any certificate exists in this scope once the date range is lifted — every other filter (deployment, domains, duration, internal traffic) still applies. Answers 'should this surface exist here at all', which `total` cannot: a scope whose certificates all predate the selected range has `total: 0` and `hasAnyIgnoringDateRange: true`. Deliberately not 'has the org ever issued one': lifting the viewer's own filters too would advertise a list guaranteed to stay empty. First page only, like `total`."}},"required":["recipients","certificates","nextCursor","total","awardsCertificates","hasAnyIgnoringDateRange"]},"CertificateRecipientRow":{"type":"object","properties":{"recipientKey":{"type":"string","example":"participant:42","description":"Stable key for this recipient row within the organization."},"recipientName":{"type":"string"},"recipientCompany":{"type":"string","nullable":true},"participantEmail":{"type":"string","nullable":true},"externalUserId":{"type":"string","nullable":true},"issuedCount":{"type":"integer","minimum":0,"exclusiveMinimum":true},"lastIssuedAt":{"type":"string","format":"date-time"},"issuances":{"type":"array","items":{"$ref":"#/components/schemas/CertificateIssuance"},"minItems":1,"description":"Every in-scope session that issued this recipient a live certificate, newest first."}},"required":["recipientKey","recipientName","recipientCompany","participantEmail","externalUserId","issuedCount","lastIssuedAt","issuances"]},"CertificateIssuance":{"type":"object","properties":{"certificateRef":{"type":"string","example":"b1QhSjKqL7mZ2nR4tV6xYw","description":"Public ref of the credential — the handle `GET /certificates/{ref}` resolves."},"sessionId":{"type":"integer"},"agentName":{"type":"string"},"issuedAt":{"type":"string","format":"date-time"}},"required":["certificateRef","sessionId","agentName","issuedAt"]},"IssuedCertificateRow":{"type":"object","properties":{"certificateRef":{"type":"string"},"sessionId":{"type":"integer"},"agentName":{"type":"string"},"recipientName":{"type":"string"},"recipientCompany":{"type":"string","nullable":true},"participantEmail":{"type":"string","nullable":true},"externalUserId":{"type":"string","nullable":true},"issuedAt":{"type":"string","format":"date-time"}},"required":["certificateRef","sessionId","agentName","recipientName","recipientCompany","participantEmail","externalUserId","issuedAt"]},"AnalyticsReportResponse":{"type":"object","properties":{"url":{"type":"string","description":"Time-limited download link. Unauthenticated by design — anyone holding it can read the report until it expires."},"filename":{"type":"string","example":"analytics-report-acme-2026-08-13.pdf"},"expiresAt":{"type":"string","description":"When the link stops working, ISO-8601."},"expiresInSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true},"reportId":{"type":"string","description":"Opaque id for this generation."},"sections":{"type":"array","items":{"type":"string","enum":["overview","billing","engagement","moments","themes","questions","feedback"]},"description":"Sections the file contains, in report order."},"failedSections":{"type":"array","items":{"type":"string","enum":["overview","billing","engagement","moments","themes","questions","feedback"]},"description":"Sections whose data could not be loaded. They appear in the file as a named gap rather than being omitted, so the reader can tell a failure from an empty range."},"scopeLines":{"type":"array","items":{"type":"string"},"description":"The scope description printed under the report title."}},"required":["url","filename","expiresAt","expiresInSeconds","reportId","sections","failedSections","scopeLines"]},"AnalyticsReportBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization the report covers. Required for non-admin callers."},"timeRange":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d"},"startDate":{"type":"string","example":"2026-07-04T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant. Overrides timeRange when paired with endDate, and the report header prints the custom window instead of the preset."},"endDate":{"type":"string","example":"2026-08-03T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"customRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"example":{"from":"2026-07-04","to":"2026-08-03"},"description":"The window as the user picked it, calendar days, for the report header. Distinct from startDate/endDate on purpose: those are the filter's bounds and the upper one is EXCLUSIVE — the instant starting the day after — so printing them would date the report a day past what was asked for. Omit it and the header falls back to the preset label plus the window the server resolved."},"timeZone":{"type":"string","maxLength":100,"example":"America/Sao_Paulo","description":"IANA zone the period labels and day/week/month buckets are computed in. Defaults to UTC, which dates a chart differently from a non-UTC dashboard."},"groupBy":{"type":"string","enum":["daily","weekly","monthly","quarterly"],"default":"daily","description":"Bucket the session series is grouped by. Printed in the report header and used by the Billing history chart, so it must match the bucket the caller chose."},"agentIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"example":[12],"description":"Deployments to scope to. The Popular moments section needs exactly one — moment ids are per-journey indices, so shares across deployments would blend unrelated moments — and prints a note saying so otherwise."},"momentsDeploymentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":12,"description":"Scopes the Popular moments section to one deployment without narrowing the rest of the report. For an org whose only production deployment resolves on its own, this is how moments stay meaningful while the other sections keep counting every deployment — moment ids are per-journey indices, so that section alone needs a single journey."},"customerDomains":{"type":"array","items":{"type":"string"},"example":["acme.com"],"description":"Narrow to participants on these email domains."},"minSec":{"type":"integer","nullable":true,"minimum":0},"maxSec":{"type":"integer","nullable":true,"minimum":0},"includeInternal":{"type":"boolean","default":false,"description":"Include the organization's own testers. The report header states which way this was set."},"includeSableTraffic":{"type":"boolean","default":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants, so an export matches a dashboard with the tester switch on. Inert for everyone else — the SQL gates it on the server-derived admin flag, never on this field. When it takes effect the report header says so, since a file carrying Sable traffic can be forwarded to the customer."},"billingCategories":{"type":"array","items":{"type":"string","enum":["production","pending","internal","sable_team","empty","incomplete","billable"]},"minItems":1,"example":["production","pending"],"description":"Call type leaves the report counts, with OR semantics — the same selection the dashboard's Call type filter sends, so an export covers the population it was taken from. Omitted means every leaf the caller may see. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it. A narrowed selection is printed in the report header."},"billingContractVersion":{"type":"number","enum":[2],"example":2,"description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"asRole":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin only: render the report as this role sees the dashboard. Rejected with 403 for anyone else, matching the other analytics routes."},"sections":{"type":"array","items":{"type":"string","enum":["overview","billing","engagement","moments","themes","questions","feedback"]},"minItems":1,"example":["overview","themes"],"description":"Sections to include, in report order regardless of the order given. Defaults to all six. Questions and Session feedback carry verbatim participant names and free text."},"metrics":{"type":"array","items":{"type":"string","enum":["sessions","uniqueUsers","customerDomains","anonymous","avgTime","turns","satisfaction"]},"description":"Overview tiles to print. Defaults to all of them; ignored unless the overview section is included."},"feedbackSearch":{"type":"string","description":"Narrows the Session feedback section only. Named in the report header so a filtered file cannot read as a complete one."}}},"EnqueuedAnalyticsReport":{"type":"object","properties":{"jobId":{"type":"string","description":"Poll GET /jobs/{jobId}; the report's link is on the job's result when it completes."}},"required":["jobId"]},"ServiceTokenExchangeResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":300}},"required":["access_token","token_type","expires_in"]},"ServiceTokenExchangeRequest":{"type":"object","properties":{"audience":{"type":"string","enum":["urn:sable:service:parley","urn:sable:service:brain","urn:sable:service:wiki","urn:sable:service:apps-dispatcher","urn:sable:service:kcp"]},"org":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647}],"description":"Org a brain, Wiki, apps-dispatcher or kcp token is signed for, by public id or numeric id; required for builder, apps-dispatcher and kcp tokens"}},"required":["audience"],"additionalProperties":false},"FirewallBypassResponse":{"type":"object","properties":{"value":{"type":"string","minLength":1}},"required":["value"]},"AuthMeResponse":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/AuthMeUser"}},"required":["user"]},"AuthMeUser":{"type":"object","properties":{"id":{"type":"number"},"authId":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"role":{"type":"string"},"customRoleId":{"type":"integer","nullable":true},"isSableAdmin":{"type":"boolean"},"isBetaTester":{"type":"boolean"},"org":{"$ref":"#/components/schemas/AuthOrg"},"permissions":{"type":"array","items":{"type":"string"}},"platformAccess":{"type":"boolean"},"dataScope":{"type":"string","enum":["org","own_links"],"description":"`own_links`: calls and analytics are narrowed to the user's own links; other areas follow role permissions, except call-backed endpoints without scope filtering, which remain denied"},"callsSince":{"type":"string","nullable":true,"description":"Set when the role reads only calls started since this instant (when the user first signed in)"},"onboardingStatus":{"type":"string","nullable":true,"enum":["pending","submitted",null]}},"required":["id","authId","email","name","role","customRoleId","isSableAdmin","isBetaTester","org","permissions","platformAccess","dataScope","callsSince","onboardingStatus"]},"AuthOrg":{"type":"object","nullable":true,"properties":{"id":{"type":"number"},"publicId":{"type":"string"},"name":{"type":"string"},"domains":{"type":"array","nullable":true,"items":{"type":"string"}},"platformUrls":{"type":"array","nullable":true,"items":{"type":"string"}},"hasVm":{"type":"boolean"},"billingVisibleToCustomers":{"type":"boolean","description":"Whether this organization's own users may see billing classification. Off collapses the Call type filter to an Internal team switch; Sable admins keep the full filter either way."}},"required":["id","publicId","name","domains","platformUrls","hasVm","billingVisibleToCustomers"]},"HostedConnectionDetails":{"type":"object","properties":{"configId":{"type":"string","nullable":true,"description":"Configuration version selected for this call, preserved by the launcher and transcript session."},"callId":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","description":"Sable-generated canonical call identity forwarded unchanged to the hosted worker."},"accountLockRequired":{"type":"boolean","description":"The hosted runtime must verify the room owns an exclusive account lock before browser use."},"roomName":{"type":"string","description":"Reserved room name the hosted worker must use."},"workerUrl":{"type":"string","example":"https://staging.sessions.withsable.com","description":"Hosted worker URL — the client connects to it directly (its concierge mints the room)."},"poolHash":{"type":"string","example":"a1b2c3d4","description":"Hash of the routing pool's envs+weights, present only when Brain weighted-routing picked this worker (not an explicit `?env=` pin); parley names the sticky cookie sable_env_<poolHash>."},"runtimeEnvironment":{"type":"string","example":"env_d","description":"The environment that served this session, present only when Brain weighted-routing picked this worker; parley stores it as the sable_env_<poolHash> cookie value so the browser re-pins to the same env."},"accountId":{"type":"string","example":"acc_01961f2a-b3c4-7d5e-8f6a-9b0c1d","description":"Account to attach for this hosted session — its saved browser profile is restored. With hostedSession=true, an exclusive account is locked under roomName and accountLockRequired is true, whether it was auto-picked or named explicitly. A named account whose lock is already live is refused with 409 AccountInUseError; auto-pick with no free exclusive account and no shareable fallback is refused with 409 NoAvailableAccountError. Shareable accounts are never locked. Parley forwards the result as nickelAccountId."},"accountPublicId":{"type":"string","example":"acc_01961f2a-b3c4-7d5e-8f6a-9b0c1d","description":"The validated account selected for this session, omitted when the browser starts clean."},"canonicalPublicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a","description":"Present only when `agentPublicId` resolved through a redirect link — the agent's own public id, so the caller can redirect to the canonical connection-details address."},"resolvedAgentPublicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a","description":"The public id of the agent this call actually resolved to, always present regardless of whether `agentPublicId` was a link ref, a slug, or the agent's own id, and regardless of the link's status."},"personalization":{"type":"object","properties":{"source":{"type":"string","enum":["link","browser","none"]},"reason":{"type":"string","enum":["claimed","claimant_match","window_closed","claimed_by_other","no_arrival","no_context"]},"linkRef":{"type":"string"},"contextLinkRef":{"type":"string"}},"required":["source","reason"]},"verifiesEmail":{"type":"boolean","enum":[true],"description":"Present (true) when the agent verifies visitor emails, so the caller forwards only the proven email, never a typed one."},"placement":{"type":"object","properties":{"region":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"euw2","description":"Cell (cluster) id the call ran in."},"cloudRegion":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"europe-west2","description":"Cloud region of that cell."},"chosenBy":{"type":"string","enum":["explicit","automatic","default"],"description":"What placed the call there: the caller's `?region=`; sable-api, from the caller's nickel region or in place of a cell that is not serving; or the cell the worker already served from."}},"required":["region","cloudRegion","chosenBy"],"description":"The cell this session was placed in. Omitted when no concierge serves the worker url; parley echoes it on create-session."},"callContext":{"type":"string","description":"Opaque. What sable-api decided about this call, sealed so only sable-api can read it. Present only while call tickets are minted; the caller hands it back unchanged to `POST /calls/{callId}/ticket`."}},"required":["configId","callId","workerUrl","resolvedAgentPublicId","personalization"]},"ChosenWorkerCall":{"type":"object","properties":{"callId":{"type":"string","format":"uuid","example":"0b6f1c2e-3d4a-4b5c-8d6e-7f8091a2b3c4","description":"The call id the decision is kept under. The call's session names it, and takes the decision."},"callContext":{"type":"string","description":"The decision, sealed for `POST /calls/{callId}/ticket`, which mints a ticket for the chosen worker only. Present only while call tickets are minted and the call has a served config version. Opaque."}},"required":["callId"]},"ChosenWorkerCallBody":{"type":"object","properties":{"agentPublicId":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a","description":"Agent public ID, slug or link ref, as the call names it."},"worker":{"type":"string","maxLength":2048,"example":"https://concierge.sessions.withsable.com/envs/pool-eu","description":"URL of the worker the caller chose, as call-ui sends the call to it: its origin, and the `/envs/<name>` path when it serves one."},"workerUrl":{"type":"string","maxLength":2048,"example":"https://concierge.sessions.withsable.com/envs/pool-eu","description":"The worker's full URL when `worker` names only its origin, so a sable-api that reads `worker` as an origin still records the call. Read in place of `worker` when present."},"configId":{"type":"string","format":"uuid","description":"The config version the call asks for."},"environment":{"allOf":[{"$ref":"#/components/schemas/DeployEnvironment"},{"description":"The deployment environment the call asks for."}]},"linkRef":{"type":"string","minLength":1,"maxLength":200,"description":"The link the call arrived through, when the agent is named by its id. Checked against the agent."}},"required":["agentPublicId","worker"]},"ConnectionCancelResponse":{"type":"object","properties":{"roomDeleted":{"type":"boolean","description":"False when the room had already closed or never opened."},"lockReleased":{"type":"boolean","description":"False when the room held no account lock."},"resourcesReleased":{"type":"integer","minimum":0,"description":"The number of session resources, such as a leased Figma file, released for this room."}},"required":["roomDeleted","lockReleased","resourcesReleased"]},"ConnectionCancelBody":{"type":"object","properties":{"roomName":{"type":"string","example":"room-abc123"},"serverUrl":{"type":"string","example":"wss://livekit.example.com"},"participantToken":{"type":"string","example":"eyJ..."}},"required":["roomName","serverUrl","participantToken"]},"ReportCallStartFailureResponse":{"type":"object","properties":{"recorded":{"type":"boolean"},"sessionId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"alerted":{"type":"boolean","description":"False when the report was recorded but deliberately not alerted."},"startRefusal":{"$ref":"#/components/schemas/CallStartRefusal"}},"required":["recorded","sessionId","alerted"]},"CallStartRefusal":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,63}$","description":"The runtime boot step that refused the call, such as skills.unreadable or preset.build.failed.","example":"preset.build.failed"},"message":{"type":"string","minLength":1,"maxLength":300,"example":"environment reference \"linear-teams\" is unavailable"}},"required":["code","message"],"description":"Why the runtime exited before it joined the call's room. Present only on a report parley marked staffTestCall, for a call whose runtime reported one."},"ReportCallStartFailureBody":{"type":"object","properties":{"attemptId":{"type":"string","minLength":1,"maxLength":128,"description":"Client-minted id for this connect attempt. One alert per attempt, however many branches report it.","example":"5b0c7a9e-3f0e-4c1e-9d2a-7b6f8e1c2d3a"},"agentPublicId":{"type":"string","minLength":1,"maxLength":200,"example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a"},"stage":{"type":"string","enum":["connection_details","room_connect","agent_never_joined","media_blocked","browser_claim_failed","agent_readiness_timeout","speech_delivery_failed","opening_view_failed","browser_first_frame_timeout","reconnect"],"description":"Where a startup or in-call failure was observed, including a browser first-frame timeout that may be reported before interrupting the call."},"browserTimeoutStatus":{"type":"string","enum":["observed","interrupted"],"description":"For browser_first_frame_timeout: observed records the deadline quietly; interrupted confirms the client entered recovery and may alert. Omission is treated as an observation for older timeout clients."},"phase":{"type":"string","enum":["startup","in_call"]},"outcome":{"type":"string","enum":["failed","abandoned"]},"observedAt":{"type":"string","format":"date-time"},"readinessConfirmedAt":{"type":"string","format":"date-time"},"interactionStartedAt":{"type":"string","format":"date-time"},"abandonmentReason":{"type":"string","enum":["user_cancelled","page_closed"]},"callId":{"type":"string","format":"uuid","description":"Present once connection-details succeeded."},"roomName":{"type":"string","maxLength":200},"httpStatus":{"type":"integer","minimum":100,"maximum":599,"description":"connection-details response status, when that is what failed."},"error":{"type":"string","maxLength":500},"participantEmail":{"type":"string","maxLength":320},"participantName":{"type":"string","maxLength":200},"userAgent":{"type":"string","maxLength":400},"clientContext":{"$ref":"#/components/schemas/ClientContext"},"simulation":{"type":"boolean","enum":[true],"description":"Set by parley's proxy only after verifying simulation intent and call:simulate permission. Classifies even pre-session failures as simulation traffic and excludes them from billing and #prod-alerts."},"staffTestCall":{"type":"boolean","enum":[true],"description":"Set by parley's proxy only after verifying a Sable staff platform session. Marks a staff test call and keeps the failure out of #prod-alerts."}},"required":["attemptId","agentPublicId","stage"]},"ClientContext":{"type":"object","nullable":true,"properties":{"network":{"type":"string","nullable":true,"maxLength":64,"example":"203.0.113.0/24","description":"The client's network as a truncated prefix (IPv4 /24, IPv6 /48). Never the address itself."},"userAgent":{"type":"string","nullable":true,"maxLength":512,"description":"Raw User-Agent, truncated."},"browser":{"type":"string","nullable":true,"maxLength":64,"example":"Chrome"},"browserVersion":{"type":"string","nullable":true,"maxLength":64,"example":"141.0.0.0"},"os":{"type":"string","nullable":true,"maxLength":64,"example":"Mac OS"},"osVersion":{"type":"string","nullable":true,"maxLength":64,"example":"10.15.7","description":"As reported by the User-Agent; Chromium freezes it, so treat it as a hint."},"deviceType":{"type":"string","nullable":true,"maxLength":64,"example":"mobile","description":"Absent for desktop browsers, which do not name a device type."},"country":{"type":"string","nullable":true,"maxLength":2,"example":"US","description":"ISO 3166-1 alpha-2, from the edge."},"region":{"type":"string","nullable":true,"maxLength":3,"example":"CA","description":"ISO 3166-2 subdivision, from the edge."},"city":{"type":"string","nullable":true,"maxLength":128,"example":"San Francisco"}},"description":"The end user's environment as parley's proxy observed it at the edge. Network prefix, user agent, browser, OS and device are for Sable's logs only. Country, region and city are also stored on the session's caller card."},"CallTicket":{"type":"object","properties":{"ticket":{"type":"string","description":"A servicekit service token for the runtime worker, sent beside the call's config."},"expiresAt":{"type":"string","format":"date-time","example":"2026-11-13T12:02:00.000Z"}},"required":["ticket","expiresAt"]},"CallTicketRequest":{"type":"object","properties":{"context":{"type":"string","minLength":1,"maxLength":8192,"description":"The `callContext` connection-details returned for this call, unchanged."},"target":{"type":"string","maxLength":2048,"example":"https://concierge.sessions.withsable.com","description":"The origin of the worker the call is sent to. A worker other than the one sable-api chose puts the call on the test path. A call sent to a worker the caller named gets a ticket for that worker only."},"configSha256":{"type":"string","pattern":"^(?:[0-9a-f]{64})?$","description":"Lowercase hex sha256 of the exact config bytes sent to the worker; empty when none are sent."},"skillsSha256":{"type":"string","pattern":"^(?:[0-9a-f]{64})?$","description":"Lowercase hex sha256 of the exact skills bytes sent to the worker; empty when none are sent."},"overrides":{"type":"object","properties":{"configRef":{"type":"string","minLength":1,"maxLength":512},"model":{"type":"string","minLength":1,"maxLength":256},"preset":{"type":"string","minLength":1,"maxLength":256},"debug":{"type":"boolean"}},"default":{},"additionalProperties":false,"description":"What the call asks for after connection-details. configRef, model and preset put the call on the test path; configRef and model need a Sable staff or simulation caller, debug a staff, org member or simulation caller."}},"required":["context","target","configSha256","skillsSha256"],"additionalProperties":false},"CallVisitorFormBody":{"type":"object","properties":{"browserId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i","description":"The browser that started the call."},"email":{"type":"string","maxLength":254,"format":"email","description":"The typed email. Left out (with nothing else typed), the call gets the profile this browser saved instead."},"name":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":200},"companyDomain":{"type":"string","maxLength":253},"formAnswers":{"type":"object","additionalProperties":{"type":"string","maxLength":200},"description":"Each custom question's label mapped to the visitor's answer."}},"required":["browserId"]},"WaitlistJoined":{"type":"object","properties":{"joined":{"type":"boolean","enum":[true]}},"required":["joined"]},"WaitlistRejected":{"type":"object","properties":{"reason":{"anyOf":[{"type":"string","enum":["invalid_format","disposable","no_mail","personal"]},{"type":"string","enum":["invalid_page"]}]}},"required":["reason"]},"WaitlistJoinBody":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"returnPath":{"type":"string","maxLength":2000,"description":"The call page the visitor was waiting on, as a path on the call site. The email links back to it.","example":"/r/acme-demo"}},"required":["email","returnPath"]},"CrmConnectionResponse":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/CrmConnection"}},"required":["connection"]},"CrmConnection":{"type":"object","nullable":true,"properties":{"id":{"type":"integer"},"publicId":{"type":"string"},"orgId":{"type":"integer"},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"authMethod":{"type":"string","enum":["oauth_redirect","api_key"]},"label":{"type":"string"},"status":{"type":"string","enum":["connected","needs_reauth"]},"statusReasonCode":{"type":"string","nullable":true},"statusReason":{"type":"string","nullable":true},"connectedByUserId":{"type":"integer","nullable":true},"connectedBy":{"$ref":"#/components/schemas/CrmConnectionUser"},"postCallWriteEnabled":{"type":"boolean"},"postCallWriteEnabledAt":{"type":"string","nullable":true},"postCallWriteEnabledByUserId":{"type":"integer","nullable":true},"disconnectedAt":{"type":"string","nullable":true},"lastCheckedAt":{"type":"string","nullable":true},"lastCheckFailedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","publicId","orgId","provider","authMethod","label","status","statusReasonCode","statusReason","connectedByUserId","connectedBy","postCallWriteEnabled","postCallWriteEnabledAt","postCallWriteEnabledByUserId","disconnectedAt","lastCheckedAt","lastCheckFailedAt","createdAt","updatedAt"]},"CrmConnectionUser":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["name","email"]},"CrmConnectionOrgBody":{"type":"object","properties":{"org_id":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"CompleteCrmConnectionBody":{"type":"object","properties":{"org_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"connectionId":{"type":"string","minLength":1,"maxLength":500},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["provider","connectionId"]},"ApiKeyCrmConnectionBody":{"type":"object","properties":{"org_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"provider":{"type":"string","enum":["monaco"]},"apiKey":{"type":"string","minLength":1,"maxLength":500},"label":{"type":"string","minLength":1,"maxLength":120}},"required":["provider","apiKey"]},"RekeyCrmApiKeyConnectionBody":{"type":"object","properties":{"org_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"apiKey":{"type":"string","minLength":1,"maxLength":500}},"required":["apiKey"]},"CrmOAuthStartResponse":{"anyOf":[{"$ref":"#/components/schemas/CrmOAuthUrlResponse"},{"$ref":"#/components/schemas/CrmOAuthConnectionResponse"}]},"CrmOAuthUrlResponse":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"}},"required":["authorizationUrl"]},"CrmOAuthConnectionResponse":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1}},"required":["connectionId"]},"StartCrmOAuthBody":{"type":"object","properties":{"org_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"providerWorkspaceRef":{"type":"string","minLength":1,"maxLength":253}},"required":["provider"]},"ReauthorizeCrmConnectionBody":{"type":"object","properties":{"org_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"connectionId":{"type":"string","minLength":1,"maxLength":500}},"required":["connectionId"]},"CrmFieldsResponse":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/CrmField"}}},"required":["fields"]},"CrmField":{"type":"object","properties":{"role":{"type":"string","enum":["person","company"]},"property":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"isCustom":{"type":"boolean"},"isWritable":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}}},"required":["role","property","label","type","isCustom","isWritable","options"]},"ConnectionUsageResponse":{"type":"object","properties":{"crm":{"type":"object","nullable":true,"properties":{"journeyCount":{"type":"integer","minimum":0,"description":"Every journey that depends on the connection."},"journeys":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionUsingJourney"},"description":"The first few, by name."},"connectionPublicId":{"type":"string"}},"required":["journeyCount","journeys","connectionPublicId"]},"slackWorkspaces":{"type":"array","items":{"type":"object","properties":{"journeyCount":{"type":"integer","minimum":0,"description":"Every journey that depends on the connection."},"journeys":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionUsingJourney"},"description":"The first few, by name."},"teamId":{"type":"string"}},"required":["journeyCount","journeys","teamId"]}}},"required":["crm","slackWorkspaces"]},"ConnectionUsingJourney":{"type":"object","properties":{"publicId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["publicId","name","slug"]},"CrmContextMappingListResponse":{"type":"object","properties":{"mappings":{"type":"array","items":{"$ref":"#/components/schemas/CrmContextMapping"}}},"required":["mappings"]},"CrmContextMapping":{"type":"object","properties":{"id":{"type":"integer"},"agentId":{"type":"integer"},"name":{"type":"string"},"valueTemplate":{"type":"string"},"referencedProperties":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","property_missing"]},"statusReason":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","agentId","name","valueTemplate","referencedProperties","status","statusReason","createdAt","updatedAt"]},"CrmContextMappingResponse":{"type":"object","properties":{"mapping":{"$ref":"#/components/schemas/CrmContextMapping"}},"required":["mapping"]},"CrmContextMappingBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"valueTemplate":{"type":"string","minLength":1,"maxLength":2000}},"required":["name","valueTemplate"]},"CrmContextPreviewResponse":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["resolved"]},"reason":{"nullable":true},"entries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}}},"required":["status","reason","entries"]},{"type":"object","properties":{"status":{"type":"string","enum":["skipped"]},"reason":{"type":"string","enum":["no_match","multiple_matches"]},"entries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}}},"required":["status","reason","entries"]}]},"CrmContextPreviewBody":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]},"EmailTemplate":{"type":"object","properties":{"publicId":{"type":"string"},"orgId":{"type":"integer"},"name":{"type":"string"},"purpose":{"type":"string","enum":["follow_up","post_call"]},"subject":{"type":"string"},"html":{"type":"string"},"variableDefinitions":{"$ref":"#/components/schemas/EmailVariableDefinitions"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"published":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"purpose":{"type":"string","enum":["follow_up","post_call"]},"subject":{"type":"string"},"html":{"type":"string"},"variableDefinitions":{"$ref":"#/components/schemas/EmailVariableDefinitions"}},"required":["name","purpose","subject","html","variableDefinitions"]},"publishedVersion":{"type":"integer"},"publishedAt":{"type":"string","nullable":true},"hasUnpublishedChanges":{"type":"boolean"}},"required":["publicId","orgId","name","purpose","subject","html","variableDefinitions","createdAt","updatedAt","published","publishedVersion","publishedAt","hasUnpublishedChanges"]},"EmailVariableDefinitions":{"type":"object","additionalProperties":{"type":"object","properties":{"defaultValue":{"type":"string","maxLength":50000},"example":{"type":"string","maxLength":50000},"required":{"type":"boolean"}},"additionalProperties":false}},"EmailTemplateInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","enum":["follow_up","post_call"]},"subject":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"variableDefinitions":{"$ref":"#/components/schemas/EmailVariableDefinitions"}},"required":["name","purpose","subject","html"],"additionalProperties":false},"EmailTemplatePatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","enum":["follow_up","post_call"]},"subject":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"variableDefinitions":{"$ref":"#/components/schemas/EmailVariableDefinitions"},"expectedUpdatedAt":{"type":"string","format":"date-time"}},"required":["expectedUpdatedAt"],"additionalProperties":false},"EmailTemplateBinding":{"type":"object","properties":{"purpose":{"type":"string","enum":["follow_up","post_call"]},"agentId":{"type":"integer","nullable":true},"templatePublicId":{"type":"string","nullable":true},"agentSlug":{"type":"string","nullable":true,"description":"Null for the organization default."},"agentName":{"type":"string","nullable":true,"description":"Null for the organization default."},"followUpEnabled":{"type":"boolean","nullable":true,"description":"The agent's follow-up email toggle. When false, the binding is saved but nothing sends until it is turned on. Null for the organization default."},"templateName":{"type":"string","nullable":true,"description":"Null when the binding was cleared."}},"required":["purpose","agentId","templatePublicId","agentSlug","agentName","followUpEnabled","templateName"]},"AdminMemoriesList":{"type":"array","items":{"$ref":"#/components/schemas/MemoryResponse"}},"MemoryResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["user_global","user","org","agent","user_agent"]},"orgId":{"type":"integer","nullable":true},"userId":{"type":"integer","nullable":true},"agentId":{"type":"integer","nullable":true},"path":{"type":"string"},"content":{"type":"string"},"version":{"type":"integer"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","scope","orgId","userId","agentId","path","content","version","updatedAt"]},"RequestComposerUploadUrlResponse":{"type":"object","properties":{"uploadUrl":{"type":"string","example":"https://storage.googleapis.com/...X-Goog-Signature=..."},"publicUrl":{"type":"string","example":"https://storage.googleapis.com/org-assets-bucket/org_abc/attachments/..."},"storagePath":{"type":"string","example":"org_abc/attachments/1731012345-abc123.mp4"},"attachmentId":{"type":"string","example":"att-mh4pk2-l9z3xk"},"headers":{"type":"object","additionalProperties":{"type":"string"},"example":{"Content-Type":"video/mp4","x-goog-content-length-range":"0,524288000"}},"token":{"type":"string"}},"required":["uploadUrl","publicUrl","storagePath","attachmentId","headers","token"]},"RequestComposerUploadUrlBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":28},"fileName":{"type":"string","minLength":1,"maxLength":200,"example":"demo-recording.mp4"},"mimeType":{"type":"string","minLength":1,"maxLength":120,"example":"video/mp4"},"byteSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":35000000}},"required":["orgId","fileName","mimeType","byteSize"]},"CopilotFeedbackSubmitResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"]},"CopilotFeedbackSubmitBody":{"type":"object","properties":{"turnId":{"type":"string","format":"uuid"},"signal":{"type":"string","enum":["explicit","implicit_revert"]},"rating":{"type":"string","enum":["up","down"]},"reasons":{"type":"array","items":{"type":"string","enum":["didnt_follow_instructions","wrong_tool","hallucinated","too_verbose","too_slow","other"]}},"comment":{"type":"string","maxLength":2000},"revertedAffectedUids":{"type":"array","items":{"type":"string"}},"revertedWithinMs":{"type":"integer","minimum":0}},"required":["turnId","signal","rating"]},"MemoryViewResponse":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]},"MemoryViewBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":256,"example":"/memories/user/notes.md"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Required for /memories/agent/* and /memories/user-agent/* writes; ignored otherwise."}},"required":["path"]},"MemoryOkResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"MemoryCreateBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":256,"example":"/memories/user/notes.md"},"content":{"type":"string"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Required for /memories/agent/* and /memories/user-agent/* writes; ignored otherwise."}},"required":["path","content"]},"MemoryStrReplaceBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":256,"example":"/memories/user/notes.md"},"find":{"type":"string"},"replace":{"type":"string"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Required for /memories/agent/* and /memories/user-agent/* writes; ignored otherwise."}},"required":["path","find","replace"]},"MemoryInsertBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":256,"example":"/memories/user/notes.md"},"offset":{"type":"integer","minimum":0},"text":{"type":"string"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Required for /memories/agent/* and /memories/user-agent/* writes; ignored otherwise."}},"required":["path","offset","text"]},"MemoryDeleteBody":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":256,"example":"/memories/user/notes.md"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Required for /memories/agent/* and /memories/user-agent/* writes; ignored otherwise."}},"required":["path"]},"MemoryRenameBody":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":256,"example":"/memories/user/notes.md"},"to":{"type":"string","minLength":1,"maxLength":256,"example":"/memories/user/notes.md"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Required for /memories/agent/* and /memories/user-agent/* writes; ignored otherwise."}},"required":["from","to"]},"CopilotThreadList":{"type":"array","items":{"$ref":"#/components/schemas/CopilotThread"}},"CopilotThread":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","closed","archived"]},"lastMessageAt":{"type":"string","format":"date-time"},"messageCount":{"type":"integer","minimum":0},"orgId":{"type":"integer"},"agentId":{"type":"integer"},"userId":{"type":"string","nullable":true},"sessionHost":{"type":"string","enum":["journey-editing","global-panel"]},"sessionMode":{"type":"string","enum":["editing","knowledge-chat","slack"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","lastMessageAt","messageCount","sessionHost"]},"CopilotThreadMessages":{"type":"array","items":{"$ref":"#/components/schemas/CopilotThreadMessage"}},"CopilotThreadMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"sequenceNumber":{"type":"integer","minimum":0},"content":{"nullable":true},"createdAt":{"type":"string","format":"date-time"},"threadId":{"type":"string","format":"uuid"},"turnId":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","role","sequenceNumber","createdAt"]},"CopilotLastTurnErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CopilotLastTurnError"}},"required":["error"]},"CopilotLastTurnError":{"type":"object","nullable":true,"properties":{"turnId":{"type":"string","format":"uuid"},"code":{"$ref":"#/components/schemas/CopilotTurnErrorCode"},"message":{"type":"string"},"requestId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"}},"required":["turnId","code","message","occurredAt"]},"CopilotTurnErrorCode":{"type":"string","enum":["overloaded","rate_limited","timeout","service_error","bad_request","too_long","refusal","iteration_cap","auth","billing","forbidden","network","stream_interrupted","unknown"]},"CopilotThreadFlat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"integer"},"agentId":{"type":"integer"},"userId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","closed","archived"],"default":"active"},"lastMessageAt":{"type":"string","format":"date-time"},"messageCount":{"type":"integer","minimum":0},"sessionHost":{"type":"string","enum":["journey-editing","global-panel"]},"sessionMode":{"type":"string","enum":["editing","knowledge-chat","slack"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","agentId","userId","title","lastMessageAt","messageCount","sessionHost","createdAt","updatedAt"]},"CreateCopilotThreadBody":{"type":"object","properties":{"agentId":{"type":"integer","nullable":true},"orgId":{"type":"integer","nullable":true},"id":{"type":"string","format":"uuid"},"sessionHost":{"type":"string","enum":["journey-editing","global-panel"]},"sessionMode":{"type":"string","enum":["editing","knowledge-chat","slack"]},"contextId":{"type":"string","maxLength":128,"pattern":"^[A-Z0-9]+:[A-Z0-9]+:\\d+\\.\\d+$"}},"required":["orgId"]},"SuccessResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"SetCopilotThreadTitleBody":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200}},"required":["title"]},"CopilotThreadMessageFlat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"threadId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant"]},"content":{"nullable":true},"turnId":{"type":"string","nullable":true,"format":"uuid"},"createdAt":{"type":"string"}},"required":["id","threadId","role","turnId","createdAt"]},"AppendCopilotMessageBody":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"nullable":true},"turnId":{"type":"string","format":"uuid"},"metadata":{"$ref":"#/components/schemas/CopilotMessageMetadata"}},"required":["role"]},"CopilotMessageMetadata":{"type":"object","properties":{"slackTs":{"type":"string","maxLength":32,"pattern":"^\\d+\\.\\d+$"},"slackUserId":{"type":"string","pattern":"^[UW][A-Z0-9]+$"}},"additionalProperties":false},"CopilotTurnIngestBody":{"type":"object","properties":{"turnId":{"type":"string","format":"uuid"},"threadId":{"type":"string","format":"uuid"},"userId":{"type":"string"},"agentId":{"type":"integer","nullable":true},"orgId":{"type":"integer","nullable":true}},"required":["turnId","orgId"],"additionalProperties":true},"DeploymentPreviewStartedResponse":{"type":"object","properties":{"sourceSha":{"type":"string","pattern":"^[0-9a-f]{40}$"},"publicationSequence":{"type":"string","pattern":"^[1-9]\\d*$"},"publicationToken":{"type":"string","format":"uuid"}},"required":["sourceSha","publicationSequence","publicationToken"]},"DeploymentPreviewStart":{"type":"object","properties":{"sourceSha":{"type":"string","pattern":"^[0-9a-f]{40}$"},"publicationSequence":{"type":"string","pattern":"^[1-9]\\d*$"}},"required":["sourceSha","publicationSequence"],"additionalProperties":false},"DeploymentPreviewStoredResponse":{"type":"object","properties":{"sourceSha":{"type":"string"}},"required":["sourceSha"]},"DeploymentPreviewEnvelope":{"type":"object","properties":{"sourceSha":{"type":"string","pattern":"^[0-9a-f]{40}$"},"bundle":{"type":"object","properties":{"config":{"type":"object","additionalProperties":true},"skills":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"publicId":{"type":"string","minLength":1},"type":{"type":"string","enum":["browser"]},"markdown":{"type":"string"}},"required":["publicId","type","markdown"],"additionalProperties":false}}},"required":["skills"],"additionalProperties":false}},"required":["config","skills"],"additionalProperties":false}},"required":["sourceSha","bundle"],"additionalProperties":false},"DeploymentPreviewReady":{"type":"object","properties":{"sourceSha":{"type":"string","pattern":"^[0-9a-f]{40}$"},"publicationSequence":{"type":"string","pattern":"^[1-9]\\d*$"},"publicationToken":{"type":"string","format":"uuid"},"agentPublicIds":{"type":"array","items":{"type":"string","pattern":"^agt_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$"},"maxItems":500}},"required":["sourceSha","publicationSequence","publicationToken","agentPublicIds"],"additionalProperties":false},"DeploymentPreviewDeletedResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"DsOwner":{"type":"object","properties":{"slackUserId":{"type":"string","nullable":true,"example":"U0BT87K5J2J"}},"required":["slackUserId"]},"CallFinalizedResponse":{"type":"object","properties":{"sessionId":{"type":"string","example":"session_abc123"},"gradingEvaluationId":{"type":"string","nullable":true}},"required":["sessionId","gradingEvaluationId"]},"CreateEvalBody":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"example":"session_abc123"},"agent":{"type":"string"},"agentVersion":{"type":"string"},"orgId":{"anyOf":[{"type":"string"},{"type":"number"}]},"tour":{"type":"string","example":"settings-walkthrough"},"triggerType":{"type":"string","enum":["production","synthetic","ci","nightly"],"example":"production"},"durationSeconds":{"type":"integer","minimum":0,"maximum":604800,"example":120},"userTurnCount":{"type":"integer","minimum":0,"example":6},"userSpeechSeconds":{"type":"number","minimum":0,"example":24.5},"artifactsPath":{"type":"string","example":"session_abc123/"},"scenario":{"type":"string","enum":["script","agent","tour"],"example":"tour"},"scenarioCondition":{"type":"string","example":"happy path"},"scenarioSourceSessionId":{"type":"string","example":"430552ea-1234-5678-9abc-def012345678"}},"required":["sessionId","triggerType"]},"FindingsSearchReadiness":{"type":"object","properties":{"ready":{"type":"boolean"}},"required":["ready"]},"TranscriptTranslationResponse":{"type":"object","properties":{"targetLanguage":{"type":"string"},"translations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceLanguage":{"type":"string","nullable":true},"translatedText":{"type":"string","nullable":true}},"required":["id","sourceLanguage","translatedText"]}},"failedIds":{"type":"array","items":{"type":"string"}}},"required":["targetLanguage","translations","failedIds"]},"TranslateReviewTranscriptBody":{"type":"object","properties":{"targetLanguage":{"type":"string","minLength":2,"maxLength":35,"example":"en","description":"BCP 47 tag of the language to render the transcript in. Regional variants and extensions fold to the language (`en-US` → `en`); a script other than the language's usual one is kept (`sr-Latn`), and Chinese always keeps its script (`zh-TW` → `zh-Hant`)."},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"speaker":{"type":"string","enum":["caller","agent","operator"]},"text":{"type":"string","maxLength":8000}},"required":["id","speaker","text"]},"minItems":1,"maxItems":100},"context":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"speaker":{"type":"string","enum":["caller","agent","operator"]},"text":{"type":"string","maxLength":8000}},"required":["id","speaker","text"]},"maxItems":6}},"required":["targetLanguage","messages"]},"GradingEvaluationListResponse":{"type":"object","properties":{"evaluations":{"type":"array","items":{"$ref":"#/components/schemas/GradingEvaluationListItem"}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["evaluations","nextCursor","hasMore"]},"GradingEvaluationListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sessionId":{"type":"string"},"agentId":{"type":"integer"},"participantSnapshot":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"company":{"type":"string","nullable":true}},"required":["name","email","externalId"]},"passed":{"type":"boolean","nullable":true},"overallScore":{"type":"string","nullable":true},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","sessionId","agentId","participantSnapshot","passed","overallScore","status","createdAt"]},"GradingEvaluation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"integer"},"sessionId":{"type":"string"},"participantId":{"type":"integer","nullable":true},"participantSnapshot":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"company":{"type":"string","nullable":true}},"required":["name","email","externalId"]},"agentId":{"type":"integer"},"rubricId":{"type":"string","format":"uuid"},"rubricSnapshot":{"type":"object","properties":{"name":{"type":"string"},"passMark":{"type":"number","nullable":true},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"maxPoints":{"type":"number","minimum":0,"exclusiveMinimum":true},"required":{"type":"boolean","default":false},"isGate":{"type":"boolean"},"gateMinScore":{"type":"number","minimum":0,"maximum":1}},"required":["key","label","description","maxPoints"]}},"config":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"type":"number","minimum":0,"maximum":1},"samples":{"type":"integer","minimum":1,"maximum":5,"default":1},"coverageFloor":{"type":"number","minimum":0,"maximum":1,"default":0.8},"instructions":{"type":"string","maxLength":20000},"calibrationAnchors":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"targetScore":{"type":"number","minimum":0,"maximum":100},"note":{"type":"string"}},"required":["label","summary","targetScore"]},"maxItems":5},"roundPoints":{"type":"boolean"},"vision":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"maxFrames":{"type":"integer","minimum":1,"maximum":40,"default":12}}}}}},"required":["name","passMark","criteria","config"]},"overallScore":{"type":"string","nullable":true},"passed":{"type":"boolean","nullable":true},"coverage":{"type":"string","nullable":true},"status":{"type":"string"},"results":{"type":"array","nullable":true,"items":{"type":"object","properties":{"key":{"type":"string"},"reasoning":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"integer"},"timestampS":{"type":"number"},"quote":{"type":"string"}},"required":["messageId","timestampS","quote"]}},"score":{"type":"number","nullable":true,"minimum":0,"maximum":1},"points":{"type":"number"},"gateTripped":{"type":"boolean"}},"required":["key","reasoning","evidence","score","points","gateTripped"]}},"gateFailures":{"type":"array","nullable":true,"items":{"type":"string"}},"judgeMeta":{"type":"object","nullable":true,"properties":{"model":{"type":"string"},"promptHash":{"type":"string"},"tokenUsage":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"}}},"latencyMs":{"type":"number"},"errors":{"type":"array","items":{"type":"string"}}}},"summary":{"type":"string","nullable":true},"attemptNumber":{"type":"integer"},"humanOverridden":{"type":"boolean"},"overrideScore":{"type":"string","nullable":true},"overrideBy":{"type":"integer","nullable":true},"overrideAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","sessionId","participantId","participantSnapshot","agentId","rubricId","rubricSnapshot","overallScore","passed","coverage","status","results","gateFailures","judgeMeta","summary","attemptNumber","humanOverridden","overrideScore","overrideBy","overrideAt","createdAt","updatedAt"]},"ReapStuckGradingResponse":{"type":"object","properties":{"reapedCount":{"type":"integer","example":2},"reapedIds":{"type":"array","items":{"type":"string","format":"uuid"},"example":["550e8400-e29b-41d4-a716-446655440000"]},"cutoff":{"type":"string","example":"2026-04-10T18:30:00.000Z"},"thresholdMinutes":{"type":"integer","example":30}},"required":["reapedCount","reapedIds","cutoff","thresholdMinutes"]},"GradingRubric":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"gradingType":{"type":"string","nullable":true},"passMark":{"type":"string","nullable":true},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"maxPoints":{"type":"number","minimum":0,"exclusiveMinimum":true},"required":{"type":"boolean","default":false},"isGate":{"type":"boolean"},"gateMinScore":{"type":"number","minimum":0,"maximum":1}},"required":["key","label","description","maxPoints"]}},"config":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"type":"number","minimum":0,"maximum":1},"samples":{"type":"integer","minimum":1,"maximum":5,"default":1},"coverageFloor":{"type":"number","minimum":0,"maximum":1,"default":0.8},"instructions":{"type":"string","maxLength":20000},"calibrationAnchors":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"targetScore":{"type":"number","minimum":0,"maximum":100},"note":{"type":"string"}},"required":["label","summary","targetScore"]},"maxItems":5},"roundPoints":{"type":"boolean"},"vision":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"maxFrames":{"type":"integer","minimum":1,"maximum":40,"default":12}}}}},"createdBy":{"type":"integer","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":"string","nullable":true}},"required":["id","orgId","name","description","gradingType","passMark","criteria","config","createdBy","createdAt","updatedAt","deletedAt"]},"CreateGradingRubricBody":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"gradingType":{"type":"string"},"passMark":{"type":"number","nullable":true,"minimum":0,"maximum":100},"criteria":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"maxPoints":{"type":"number","minimum":0,"exclusiveMinimum":true},"required":{"type":"boolean","default":false},"isGate":{"type":"boolean"},"gateMinScore":{"type":"number","minimum":0,"maximum":1}},"required":["key","label","description","maxPoints"]}},"config":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"type":"number","minimum":0,"maximum":1},"samples":{"type":"integer","minimum":1,"maximum":5,"default":1},"coverageFloor":{"type":"number","minimum":0,"maximum":1,"default":0.8},"instructions":{"type":"string","maxLength":20000},"calibrationAnchors":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"targetScore":{"type":"number","minimum":0,"maximum":100},"note":{"type":"string"}},"required":["label","summary","targetScore"]},"maxItems":5},"roundPoints":{"type":"boolean"},"vision":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"maxFrames":{"type":"integer","minimum":1,"maximum":40,"default":12}}}},"default":{}}},"required":["name","criteria"]},"GradingRubricListResponse":{"type":"object","properties":{"rubrics":{"type":"array","items":{"$ref":"#/components/schemas/GradingRubric"}}},"required":["rubrics"]},"GradingRubricStatsResponse":{"type":"object","properties":{"graded":{"type":"integer","minimum":0,"example":128},"avgScore":{"type":"number","nullable":true,"example":82.4},"passRate":{"type":"number","nullable":true,"minimum":0,"maximum":1,"example":0.73},"needsReview":{"type":"integer","minimum":0,"example":4}},"required":["graded","avgScore","passRate","needsReview"]},"DeleteGradingRubricResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"unboundAgents":{"type":"integer","minimum":0}},"required":["id","unboundAgents"]},"BindGradingRubricBody":{"type":"object","properties":{"rubricId":{"type":"string","nullable":true,"format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["rubricId"]},"SubmitGradingResultsBody":{"type":"object","properties":{"overallScore":{"type":"string","nullable":true},"passed":{"type":"boolean","nullable":true},"coverage":{"type":"string","nullable":true},"status":{"type":"string","enum":["complete","needs_review","failed","skipped"]},"results":{"type":"array","nullable":true,"items":{"type":"object","properties":{"key":{"type":"string"},"reasoning":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"integer"},"timestampS":{"type":"number"},"quote":{"type":"string"}},"required":["messageId","timestampS","quote"]}},"score":{"type":"number","nullable":true,"minimum":0,"maximum":1},"points":{"type":"number"},"gateTripped":{"type":"boolean"}},"required":["key","reasoning","evidence","score","points","gateTripped"]}},"gateFailures":{"type":"array","nullable":true,"items":{"type":"string"}},"judgeMeta":{"type":"object","nullable":true,"properties":{"model":{"type":"string"},"promptHash":{"type":"string"},"tokenUsage":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"}}},"latencyMs":{"type":"number"},"errors":{"type":"array","items":{"type":"string"}}}},"summary":{"type":"string","nullable":true}},"required":["overallScore","passed","coverage","status"]},"SubmitGradingFailureBody":{"type":"object","properties":{"errorMessage":{"type":"string","minLength":1}},"required":["errorMessage"]},"HealthResponse":{"type":"object","properties":{"status":{"type":"string","example":"ok"}},"required":["status"]},"JobResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"$ref":"#/components/schemas/JobStatus"},"progressPct":{"type":"number","nullable":true},"progressLabel":{"type":"string","nullable":true},"result":{"nullable":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"executionRef":{"type":"string","nullable":true},"createdAt":{"type":"string"},"startedAt":{"type":"string","nullable":true},"finishedAt":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":true},"traceId":{"type":"string","nullable":true},"steps":{"type":"array","items":{"$ref":"#/components/schemas/JobStepResponse"}}},"required":["id","type","status","progressPct","progressLabel","error","executionRef","createdAt","startedAt","finishedAt","title","metadata","traceId"]},"JobStatus":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"JobStepResponse":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"number"},"name":{"type":"string"},"kind":{"type":"string","enum":["run","await","vendor_call"]},"status":{"type":"string","enum":["pending","running","succeeded","failed","skipped"]},"input":{"nullable":true},"output":{"nullable":true},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"attemptCount":{"type":"number"},"provider":{"type":"string","nullable":true},"vendorRef":{"type":"string","nullable":true},"startedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true}},"required":["id","seq","name","kind","status","errorCode","errorMessage","attemptCount","provider","vendorRef","startedAt","endedAt"]},"JobListResponse":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/JobResponse"}}},"required":["jobs"]},"KnowledgeSourceNamesResponse":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"name":{"type":"string"}},"required":["sourceId","name"]}}},"required":["sources"]},"KnowledgeBaseSourceStatus":{"type":"object","properties":{"source_id":{"type":"string"},"name":{"type":"string"},"sourceType":{"type":"string"},"updated":{"type":"string"},"ingestion":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","ready","partial","failed","unknown"]},"raw_status":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true},"error":{"type":"string","nullable":true}},"required":["status","raw_status","outcome","error"]},"index":{"type":"object","properties":{"state":{"type":"string","enum":["available","not_indexed","empty","not_checked"]},"chunks_count":{"type":"integer","nullable":true,"minimum":0},"checked_at":{"type":"string","nullable":true}},"required":["state","chunks_count","checked_at"]}},"required":["source_id","name","sourceType","updated","ingestion","index"]},"SourceActionRequest":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (required for Sable admins)"},"sourceType":{"type":"string","enum":["document","website","text","video","github"],"example":"document"},"name":{"type":"string","minLength":1,"pattern":"^[^/\\\\]+$","example":"product-manual.pdf"}},"required":["sourceType","name"]},"KnowledgeBaseMediaItemResponse":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"filePath":{"type":"string","nullable":true}},"required":["id","filePath"]},"KnowledgeSourceUsageResponse":{"type":"object","properties":{"days":{"type":"integer"},"sources":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string","example":"fd86e09c54464ac6"},"callCount":{"type":"integer","description":"Calls whose knowledge searches returned this source"},"usedCallCount":{"type":"integer","description":"Of those, calls where it reached the agent as evidence"},"lastReturnedAt":{"type":"string"}},"required":["sourceId","callCount","usedCallCount","lastReturnedAt"]}}},"required":["days","sources"]},"Source":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"path":{"type":"string"},"size":{"type":"number"},"created":{"type":"string"},"updated":{"type":"string"},"metadata":{"nullable":true},"languages":{"type":"array","nullable":true,"items":{"type":"string"}},"maxPages":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"crawlMode":{"type":"string","nullable":true,"enum":["url","sitemap",null]},"source_id":{"type":"string","nullable":true}},"required":["name","type","path","size","updated","languages","maxPages","crawlMode","source_id"]},"ListSourcesResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"next_cursor":{"type":"string","nullable":true}},"required":["items","next_cursor"]},"ListCrawledPagesResponse":{"type":"object","properties":{"domain":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CrawledPageWithAssets"}}},"required":["domain","items"]},"CrawledPageWithAssets":{"type":"object","properties":{"origin":{"type":"string","example":"https://demandbase.com/products/abm/"},"title":{"type":"string","example":"Demandbase ABM Platform"},"path":{"type":"string","example":"org_xyz/default/_crawl/demandbase.com/products/abm.md"},"updated":{"type":"string","example":"2025-12-01T12:00:00Z"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/CrawledPageAsset"}},"assets_truncated":{"type":"boolean"},"assets_extract_error":{"type":"boolean"}},"required":["origin","title","path","updated","assets","assets_truncated","assets_extract_error"]},"CrawledPageAsset":{"type":"object","properties":{"url":{"type":"string","example":"https://demandbase.com/wp-content/uploads/hero.png"},"kind":{"type":"string","example":"image"},"alt":{"type":"string","example":"Demandbase ABM platform overview"},"ctx":{"type":"string","example":"Account-based marketing for B2B teams"},"h":{"type":"array","items":{"type":"string"},"example":["Home","Hero"]}},"required":["url","kind","alt","ctx","h"]},"ListCrawledPagesPaginatedResponse":{"type":"object","properties":{"domain":{"type":"string","example":"minecraft.wiki"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/CrawledPageSummary"}},"totalCount":{"type":"integer","nullable":true,"minimum":0,"example":42,"description":"Null when no search filter is active (avoids O(n) GCS scan). With a search filter, the true count of matches across the whole crawl — `pages` may be a smaller window because results are capped at 500. Compare totalCount to pages.length to detect truncation."},"nextCursor":{"type":"string","nullable":true,"example":"abc123"}},"required":["domain","pages","totalCount","nextCursor"]},"CrawledPageSummary":{"type":"object","properties":{"origin":{"type":"string","example":"https://minecraft.wiki/wiki/Creeper"},"title":{"type":"string","example":"Creeper"},"updated":{"type":"string","example":"2026-05-06T16:06:40Z"},"assetCount":{"type":"integer","minimum":0,"example":5}},"required":["origin","title","updated","assetCount"]},"CrawledPagePreviewResponse":{"type":"object","properties":{"origin":{"type":"string","example":"https://minecraft.wiki/wiki/Creeper"},"title":{"type":"string","example":"Creeper"},"content":{"type":"string","example":"# Creeper\n\nA creeper is a hostile mob..."},"truncated":{"type":"boolean","example":false},"updated":{"type":"string","example":"2026-05-06T16:06:40Z"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/CrawledPageAsset"}}},"required":["origin","title","content","truncated","updated","assets"]},"UploadResponse":{"type":"object","properties":{"storagePath":{"type":"string"},"name":{"type":"string"}},"required":["storagePath","name"]},"AddWebsiteResponse":{"type":"object","properties":{"storagePath":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"},"type":{"type":"string"}},"required":["storagePath","name","domain","type"]},"AddWebsiteRequest":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (required for Sable admins)"},"url":{"type":"string","format":"uri","example":"https://docs.example.com"},"name":{"type":"string","example":"Example Docs"},"type":{"type":"string","enum":["url","sitemap"],"default":"url","example":"url"},"languages":{"type":"array","items":{"type":"string"},"example":["en","de"],"description":"Languages to keep (sitemap crawls only)"},"maxPages":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100000,"example":10000,"description":"Page cap for sitemap crawls"},"crawler":{"type":"string","enum":["cloudflare","firecrawl"],"example":"firecrawl","description":"Which crawler strategy to use for sitemap crawls. Defaults to firecrawl."},"brandingDisabled":{"type":"boolean","example":false,"description":"Skip Firecrawl branding extraction on the seed URL. Defaults to false (branding extracted)."},"onboardingRequestId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["url"]},"AddYoutubeResponse":{"type":"object","properties":{"jobId":{"type":"string"},"videoId":{"type":"string"},"name":{"type":"string"}},"required":["jobId","videoId","name"]},"AddYoutubeRequest":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (required for Sable admins)"},"url":{"type":"string","example":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},"name":{"type":"string","example":"Product walkthrough"},"onboardingRequestId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["url"]},"AddGithubResponse":{"type":"object","properties":{"storagePath":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"}},"required":["storagePath","name","repo"]},"AddGithubRequest":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (required for Sable admins)"},"repo":{"type":"string","pattern":"^[\\w.-]+\\/[\\w.-]+$","example":"acme-corp/docs"},"installationId":{"type":"string","pattern":"^[1-9]\\d{0,19}$","example":"12345678"},"ref":{"type":"string","example":"main"},"paths":{"type":"array","items":{"type":"string","minLength":1},"example":["docs/**/*.md"]},"name":{"type":"string","example":"Acme Docs"}},"required":["repo","installationId"]},"UploadUrlResponse":{"type":"object","properties":{"uploadUrl":{"type":"string"},"fileName":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["uploadUrl","fileName","headers"]},"UploadUrlRequest":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (required for Sable admins)"},"fileName":{"type":"string","minLength":1,"example":"product-manual.pdf"},"contentType":{"type":"string","minLength":1,"example":"application/pdf"},"fileSize":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1048576,"description":"File size in bytes"},"displayName":{"type":"string","example":"Product Manual"},"onboardingRequestId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["fileName","contentType","fileSize"]},"IngestFromUrlRequest":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (required for Sable admins)"},"url":{"type":"string","format":"uri","example":"https://storage.googleapis.com/org-assets-bucket/org_abc/attachments/123-xyz.mp4"},"fileName":{"type":"string","minLength":1,"example":"demo-walkthrough.mp4"},"mimeType":{"type":"string","minLength":1,"example":"video/mp4"},"displayName":{"type":"string","example":"Demo Walkthrough"}},"required":["url","fileName","mimeType"]},"SearchResponse":{"type":"object","properties":{"org":{"type":"string"},"kb":{"type":"string"},"query":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}}},"required":["org","kb","query","results"]},"SearchResult":{"type":"object","properties":{"rank":{"type":"number"},"score":{"type":"number"},"title":{"type":"string"},"section_path":{"type":"string"},"url":{"type":"string"},"text":{"type":"string"},"chunk_index":{"type":"number"},"total_chunks":{"type":"number"},"source_id":{"type":"string","nullable":true,"example":"fd86e09c54464ac6"}},"required":["rank","score","title","section_path","url","text","chunk_index","total_chunks","source_id"]},"SearchRequest":{"type":"object","properties":{"query":{"type":"string","minLength":1,"example":"How do I reset my password?"},"topK":{"type":"integer","minimum":1,"maximum":50,"default":5,"example":5},"source_id":{"type":"string","minLength":1,"example":"fd86e09c54464ac6"},"domain":{"type":"string","minLength":1,"example":"www.example.com"}},"required":["query"]},"SourceInfoResponse":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string","enum":["video","document","website","github","unknown"]},"origin_url":{"type":"string","nullable":true},"transcript":{"type":"string"},"chunks_count":{"type":"integer","minimum":0},"language":{"type":"string","nullable":true},"truncated":{"type":"boolean"}},"required":["title","type","origin_url","transcript","chunks_count","language","truncated"]},"SourceInfoRequest":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"example":"fd86e09c54464ac6"}},"required":["source_id"]},"LiveCallsResponse":{"type":"object","properties":{"totalCount":{"type":"integer","description":"Every live call, uncapped, including internal ones."},"internalCount":{"type":"integer","description":"Live calls whose participant has a Sable email or whose stored caller is Sable's own, uncapped."},"productionCount":{"type":"integer","description":"Live customer calls on production journeys, uncapped: the calls #prod-alerts announces. Excludes internal calls, staff test calls, eval runs, and test journeys."},"calls":{"type":"array","items":{"$ref":"#/components/schemas/LiveCall"}}},"required":["calls"]},"LiveCall":{"type":"object","properties":{"sessionId":{"type":"number"},"externalSessionId":{"type":"string","nullable":true},"orgPublicId":{"type":"string","nullable":true},"orgName":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":true},"participantName":{"type":"string","nullable":true},"participantEmail":{"type":"string","nullable":true},"startedAt":{"type":"string"},"lastActivityAt":{"type":"string","description":"When the latest transcript turn was saved, or `startedAt` if nobody has spoken yet."},"livekitRoomName":{"type":"string","nullable":true}},"required":["sessionId","externalSessionId","orgPublicId","orgName","agentName","participantName","participantEmail","startedAt","lastActivityAt","livekitRoomName"]},"LiveCallCounts":{"type":"object","properties":{"totalCount":{"type":"integer","description":"Every live call, uncapped, including internal ones."},"internalCount":{"type":"integer","description":"Live calls whose participant has a Sable email or whose stored caller is Sable's own, uncapped."},"productionCount":{"type":"integer","description":"Live customer calls on production journeys, uncapped: the calls #prod-alerts announces. Excludes internal calls, staff test calls, eval runs, and test journeys."}},"required":["totalCount","internalCount","productionCount"]},"AdminLiveCallDetail":{"allOf":[{"$ref":"#/components/schemas/LiveCall"},{"type":"object","properties":{"endedAt":{"type":"string","nullable":true},"status":{"type":"string","enum":["live","ended","unavailable"]},"source":{"type":"string","enum":["human","agent"]},"caller":{"$ref":"#/components/schemas/StoredCaller"},"emailVerification":{"$ref":"#/components/schemas/EmailVerification"}},"required":["endedAt","status","source","caller","emailVerification"]}]},"StoredCaller":{"type":"object","nullable":true,"properties":{"caller":{"type":"string","enum":["customer","org_member","staff","synthetic"]},"proof":{"type":"string","enum":["none","internal_link","org_session","org_email","staff_session","simulation_token"]}},"required":["caller","proof"],"description":"Sable-admin-only. Who placed the call as sable-api decided it, and the proof it verified; null for a call from before the caller was stored."},"EmailVerification":{"type":"object","nullable":true,"properties":{"verifiedBy":{"type":"string","nullable":true},"verifiedAt":{"type":"string","nullable":true}},"required":["verifiedBy","verifiedAt"],"description":"Set when the email on the call is verified; verifiedBy names the teammate who verified it by hand."},"LiveCallAlertsResponse":{"type":"object","properties":{"available":{"type":"boolean","description":"False when no PagerDuty REST key is configured. Treat as 'unknown', NOT as 'no open alerts' — an empty list with available=false means we could not check."},"incidents":{"type":"array","items":{"$ref":"#/components/schemas/LiveCallAlert"}}},"required":["available","incidents"]},"LiveCallAlert":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["triggered","acknowledged"]},"urgency":{"type":"string"},"createdAt":{"type":"string"},"htmlUrl":{"type":"string"},"dedupKey":{"type":"string"}},"required":["id","title","status","urgency","createdAt","htmlUrl","dedupKey"]},"ResolveLiveCallAlertsResponse":{"type":"object","properties":{"available":{"type":"boolean","description":"False when no PagerDuty routing key is configured — nothing was attempted. Distinguishes that from resolved:0, which means the resolves were sent but PagerDuty rejected them."},"resolved":{"type":"number"},"requested":{"type":"number"}},"required":["available","resolved","requested"]},"EndLiveCallResponse":{"type":"object","properties":{"success":{"type":"boolean"},"roomDeleted":{"type":"boolean"}},"required":["success","roomDeleted"]},"LiveCallTranscriptResponse":{"type":"object","properties":{"sessionId":{"type":"number"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/LiveCallTranscriptMessage"}},"health":{"type":"object","properties":{"callId":{"type":"string","nullable":true},"roomName":{"type":"string","nullable":true},"adminBrowserInputAt":{"type":"string","nullable":true},"accountSignedOutAt":{"type":"string","nullable":true},"accountSigninChecked":{"type":"boolean"}},"required":["callId","roomName","adminBrowserInputAt","accountSignedOutAt","accountSigninChecked"]}},"required":["sessionId","messages"]},"LiveCallTranscriptMessage":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["user","agent","admin","admin_as_user"]},"content":{"type":"string"},"momentName":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","role","content","momentName","createdAt"]},"TranslateSessionMessagesBody":{"type":"object","properties":{"targetLanguage":{"type":"string","minLength":2,"maxLength":35,"example":"en","description":"BCP 47 tag of the language to render the transcript in. Regional variants and extensions fold to the language (`en-US` → `en`); a script other than the language's usual one is kept (`sr-Latn`), and Chinese always keeps its script (`zh-TW` → `zh-Hant`)."},"messageIds":{"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"minItems":1,"maxItems":100}},"required":["targetLanguage","messageIds"]},"LiveCallAccountLogin":{"type":"object","nullable":true,"properties":{"publicId":{"type":"string"},"alias":{"type":"string"},"loginUsername":{"type":"string","nullable":true},"hasLoginPassword":{"type":"boolean"},"usesGoogleWorkspaceLogin":{"type":"boolean"}},"required":["publicId","alias","loginUsername","hasLoginPassword","usesGoogleWorkspaceLogin"]},"CobrowseSessionResponse":{"type":"object","properties":{"session":{"type":"object","nullable":true,"additionalProperties":true}},"required":["session"]},"JourneyStateResponse":{"type":"object","properties":{"journeyState":{"type":"object","nullable":true,"additionalProperties":true}},"required":["journeyState"]},"AdminObserveTokenResponse":{"type":"object","properties":{"serverUrl":{"type":"string"},"roomName":{"type":"string"},"identity":{"type":"string"},"participantToken":{"type":"string"}},"required":["serverUrl","roomName","identity","participantToken"]},"LiveCallViewersResponse":{"type":"object","properties":{"viewers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"watching":{"type":"boolean","description":"False when all their panes are in a background tab or idle"}},"required":["id","name","watching"]}}},"required":["viewers"]},"AdminJoinState":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","accepted","denied","canceled","expired"]},"requestId":{"type":"string","nullable":true},"adminName":{"type":"string","nullable":true},"requestedAt":{"type":"number","nullable":true}},"required":["status","requestId","adminName","requestedAt"]},"MemberListResponse":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page, or null on the last page (and always without `limit`)."},"total":{"type":"integer","minimum":0,"description":"Every active member, ignoring `q`."},"matched":{"type":"integer","minimum":0,"description":"Members matching `q`; equals `total` when `q` is not set."}},"required":["members","nextCursor","total","matched"]},"Member":{"type":"object","properties":{"id":{"type":"number","example":42},"orgId":{"type":"number","nullable":true,"example":1},"authId":{"type":"string","nullable":true,"example":"00000000-0000-0000-0000-000000000001"},"email":{"type":"string","nullable":true,"example":"user@example.com"},"name":{"type":"string","nullable":true,"example":"Jane Doe"},"accessMode":{"type":"string","enum":["platform","slack_only"]},"role":{"type":"string","example":"member"},"customRoleId":{"type":"integer","nullable":true,"example":null},"isBetaTester":{"type":"boolean","example":false},"createdAt":{"type":"string","nullable":true,"format":"date-time","example":"2024-01-01T00:00:00Z"},"lastLogin":{"type":"string","nullable":true,"format":"date-time","example":null},"deletedAt":{"type":"string","nullable":true,"format":"date-time","example":null}},"required":["id","orgId","authId","email","name","accessMode","role","customRoleId","isBetaTester","createdAt","lastLogin","deletedAt"]},"CreateMemberBody":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"user@example.com"},"accessMode":{"type":"string","enum":["platform","slack_only"]},"role":{"type":"string","enum":["admin","member"],"example":"member"},"name":{"type":"string","example":"Jane Doe"},"customRoleId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":3}},"required":["email","role"]},"UpdateMemberBody":{"type":"object","properties":{"accessMode":{"type":"string","enum":["platform","slack_only"]},"role":{"type":"string","enum":["admin","member"],"example":"member"},"isBetaTester":{"type":"boolean","example":true},"customRoleId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"example":3}}},"ClaimSessionResponse":{"type":"object","properties":{"session":{"type":"string","example":"sess_..."},"controlToken":{"type":"string","example":"ct_..."},"rdToken":{"type":"string","example":"rd_..."},"iceServers":{"type":"array","items":{"nullable":true},"example":[{"urls":["turn:turn.example.com:3478"]}],"description":"RTCIceServer[] suitable for an RTCPeerConnection config."},"cell":{"type":"string","nullable":true,"example":"us-west1-b","description":"The cell the session lives in. Clients pin every subsequent call to `<cell>.<exchange-host>`. Null when the exchange didn't name one."}},"required":["session","controlToken","rdToken","iceServers","cell"]},"ClaimSessionBody":{"type":"object","properties":{"policies":{"type":"object","properties":{"allow_tabs":{"type":"boolean"},"cdp_max_connections":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}}},"NickelUnclaimBody":{"type":"object","properties":{"session":{"type":"string","example":"sess_..."},"cell":{"type":"string","nullable":true,"example":"us-west1-b","description":"The cell the session lives in; the release is pinned to it. Omit/null for the anycast base."}},"required":["session"]},"FigmaMonitorSessionRow":{"type":"object","properties":{"id":{"type":"number"},"externalSessionId":{"type":"string","nullable":true},"agentName":{"type":"string"},"startedAt":{"type":"string"},"connectedAt":{"type":"string","nullable":true},"closedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true},"durationSeconds":{"type":"integer","nullable":true,"minimum":0},"completed":{"type":"boolean"},"correlationId":{"type":"string","nullable":true},"linkRef":{"type":"string","nullable":true},"placement":{"type":"object","nullable":true,"properties":{"region":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"euw2","description":"Cell (cluster) id the call ran in."},"cloudRegion":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"europe-west2","description":"Cloud region of that cell."},"chosenBy":{"type":"string","enum":["explicit","automatic","default"],"description":"What placed the call there: the caller's `?region=`; sable-api, from the caller's nickel region or in place of a cell that is not serving; or the cell the worker already served from."}},"required":["region","cloudRegion","chosenBy"]},"billing":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["billable","not_billable","pending"]},"reason":{"type":"string","nullable":true,"enum":["internal","sable_team","empty",null]}},"required":["status","reason"]},"lifecycle":{"type":"object","properties":{"connectedAtSource":{"type":"string","nullable":true,"enum":["runtime_snapshot","legacy_browser","legacy_messages",null]},"lastSeenAt":{"type":"string","nullable":true},"endedAtSource":{"type":"string","nullable":true,"enum":["runtime_snapshot","artifact_session",null]},"closureReason":{"type":"string","nullable":true},"checkedAt":{"type":"string","nullable":true},"attempts":{"type":"integer","minimum":0}},"required":["connectedAtSource","lastSeenAt","endedAtSource","closureReason","checkedAt","attempts"],"description":"Sable-admin-only lifecycle evidence. No derived lifecycle state is persisted."}},"required":["id","externalSessionId","agentName","startedAt","connectedAt","closedAt","endedAt","durationSeconds","completed","correlationId","linkRef","placement","billing"],"additionalProperties":false},"AnalyticsAgentsSourcePage":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"boolean"},{"nullable":true}]}},"description":"One flat row per agent, deleted ones included. Columns: agent_id, name, slug, tags (sorted label names joined with `,`), org_id, org_name, live, sable_intro, language, deleted, created_at, updated_at. lib/agent-analytics-row.ts is the allowlist that decides them."},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]},"ListRolesResponse":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/CustomRoleWithCount"}},"presets":{"type":"array","items":{"$ref":"#/components/schemas/RolePreset"}},"grantablePermissions":{"type":"array","items":{"type":"string"}},"baseRoles":{"type":"array","items":{"$ref":"#/components/schemas/BaseRole"},"description":"What the built-in roles grant (the legacy consumer role grants what Admin does), so a client can tell whether a role change removes access."},"nextCursor":{"type":"string","nullable":true,"description":"Opaque cursor for the next page, or null on the last page (and always without `limit`)."},"total":{"type":"integer","minimum":0,"description":"Every custom role in the org, ignoring `q`."},"matched":{"type":"integer","minimum":0,"description":"Custom roles matching `q`; equals `total` when `q` is not set."}},"required":["roles","presets","grantablePermissions","baseRoles","nextCursor","total","matched"]},"CustomRoleWithCount":{"allOf":[{"$ref":"#/components/schemas/CustomRole"},{"type":"object","properties":{"memberCount":{"type":"integer","minimum":0,"example":3,"description":"Active members holding this role. Counted in one grouped query for the whole page."}},"required":["memberCount"]}]},"CustomRole":{"type":"object","properties":{"id":{"type":"number","example":3},"orgId":{"type":"number","example":1},"name":{"type":"string","example":"Analytics viewer"},"permissions":{"type":"array","items":{"type":"string"},"example":["transcripts:read","analytics:read"]},"dataScope":{"type":"string","enum":["org","own_links"],"description":"`own_links`: call reads and analytics cover only links whose post-call recipients include the holder; other areas follow role permissions, except call-backed endpoints without scope filtering, which remain denied"},"callsSinceAccess":{"type":"boolean","description":"Holders read only calls that started after they first signed in, and only Calls and Analytics"},"platformAccess":{"type":"boolean","description":"Holders can sign in to the Sable web platform"},"slackAccess":{"type":"boolean","description":"Holders can use Aidan in Slack"},"createdAt":{"type":"string","example":"2026-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-01-01T00:00:00.000Z"}},"required":["id","orgId","name","permissions","dataScope","callsSinceAccess","platformAccess","slackAccess","createdAt","updatedAt"]},"RolePreset":{"type":"object","properties":{"name":{"type":"string","example":"Viewer"},"description":{"type":"string","example":"Sees everything, edits nothing."},"permissions":{"type":"array","items":{"type":"string"}}},"required":["name","description","permissions"]},"BaseRole":{"type":"object","properties":{"role":{"type":"string","enum":["admin","member","consumer"]},"permissions":{"type":"array","items":{"type":"string"}}},"required":["role","permissions"]},"CreateRoleBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"example":"Analytics viewer"},"permissions":{"type":"array","items":{"type":"string"},"maxItems":64,"example":["transcripts:read","analytics:read"]},"dataScope":{"type":"string","enum":["org","own_links"],"description":"`own_links`: call reads and analytics cover only links whose post-call recipients include the holder; other areas follow role permissions, except call-backed endpoints without scope filtering, which remain denied"},"callsSinceAccess":{"type":"boolean","description":"Holders read only calls that started after they first signed in, and only Calls and Analytics"},"platformAccess":{"type":"boolean"},"slackAccess":{"type":"boolean"}},"required":["name","permissions"]},"UpdateRoleBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"example":"Analytics viewer"},"permissions":{"type":"array","items":{"type":"string"},"maxItems":64,"example":["transcripts:read"]},"dataScope":{"type":"string","enum":["org","own_links"],"description":"`own_links`: call reads and analytics cover only links whose post-call recipients include the holder; other areas follow role permissions, except call-backed endpoints without scope filtering, which remain denied"},"callsSinceAccess":{"type":"boolean","description":"Holders read only calls that started after they first signed in, and only Calls and Analytics"},"platformAccess":{"type":"boolean"},"slackAccess":{"type":"boolean"}}},"ListSsoProvidersResponse":{"type":"object","properties":{"available":{"type":"boolean","description":"False until the organization's apps org serves SignInProvider; nothing can be set up before."},"providers":{"type":"array","items":{"$ref":"#/components/schemas/SsoProvider"}}},"required":["available","providers"]},"SsoProvider":{"type":"object","properties":{"domain":{"type":"string","example":"acme.com"},"providerId":{"type":"string","example":"sso-acme.com"},"connection":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["oidc"]},"issuer":{"type":"string"},"clientId":{"type":"string"}},"required":["type","issuer","clientId"]},{"type":"object","properties":{"type":{"type":"string","enum":["saml"]},"entityId":{"type":"string"},"ssoUrl":{"type":"string"}},"required":["type","entityId","ssoUrl"]}],"description":"Absent until an identity provider is connected for this domain."},"managedBy":{"type":"string","enum":["platform","git"],"description":"Who wrote the domain's SignInProvider: `git` when it comes from the org's repo, which only takes the OIDC client secret from here."},"providerStatus":{"type":"object","properties":{"ready":{"type":"boolean"},"message":{"type":"string"}},"required":["ready","message"],"description":"The provider's check by sable/platform, such as whether the issuer serves OpenID discovery."},"needsClientSecret":{"type":"boolean","description":"An OIDC provider whose client secret Platform doesn't hold."},"domainVerified":{"type":"boolean","description":"Sign-in works only once the DNS record is verified."},"active":{"type":"boolean","description":"People on this domain can sign in with SSO now."},"dnsRecord":{"type":"object","properties":{"type":{"type":"string","enum":["TXT"]},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"]},"serviceProvider":{"type":"object","properties":{"oidcRedirectUri":{"type":"string"},"samlEntityId":{"type":"string"},"samlAcsUrl":{"type":"string"},"samlMetadataUrl":{"type":"string"}},"required":["oidcRedirectUri","samlEntityId","samlAcsUrl","samlMetadataUrl"]}},"required":["domain","providerId","needsClientSecret","domainVerified","active","dnsRecord","serviceProvider"]},"SsoProviderResponse":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/SsoProvider"}},"required":["provider"]},"PutSsoProviderBody":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/SsoConnection"}},"required":["connection"]},"SsoConnection":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["oidc"]},"issuer":{"type":"string","maxLength":2048,"format":"uri","example":"https://acme.okta.com"},"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","maxLength":2048,"description":"Left out on an update to keep the stored secret."}},"required":["type","issuer","clientId"]},{"type":"object","properties":{"type":{"type":"string","enum":["saml"]},"entityId":{"type":"string","minLength":1,"maxLength":2048,"example":"http://www.okta.com/exk123"},"ssoUrl":{"type":"string","maxLength":2048,"format":"uri","example":"https://acme.okta.com/app/acme_sable/exk123/sso/saml"},"certificate":{"type":"string","maxLength":16384,"description":"PEM signing certificate. Left out on an update to keep the stored one."}},"required":["type","entityId","ssoUrl"]}]},"GenerateResponse":{"type":"object","properties":{"generationId":{"type":"string"},"mode":{"$ref":"#/components/schemas/ImageMode"},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/GenerationCandidate"},"minItems":1,"maxItems":4},"modelUsed":{"type":"string"}},"required":["generationId","mode","candidates","modelUsed"]},"ImageMode":{"type":"string","enum":["new","variation","edit"]},"GenerationCandidate":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":3},"tempUrl":{"type":"string","format":"uri"},"gcsPath":{"type":"string"},"mimeType":{"type":"string","enum":["image/png"]}},"required":["index","tempUrl","gcsPath","mimeType"]},"GenerateRequestBody":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":1000},"aspectRatio":{"$ref":"#/components/schemas/AspectRatio"},"mode":{"type":"string","enum":["new","variation"]},"referenceAssetIds":{"type":"array","items":{"type":"string"},"maxItems":4},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["prompt","aspectRatio","mode"]},"AspectRatio":{"type":"string","enum":["1:1","4:3","16:9","9:16"]},"RefineRequestBody":{"type":"object","properties":{"sourceUrl":{"type":"string","format":"uri"},"prompt":{"type":"string","minLength":3,"maxLength":1000},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["sourceUrl","prompt"]},"SaveGeneratedAssetResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/SavedGeneratedAsset"}},"required":["asset"]},"SavedGeneratedAsset":{"type":"object","properties":{"id":{"type":"number"},"publicId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string","nullable":true},"gcsPath":{"type":"string","nullable":true}},"required":["id","publicId","name","type","url","gcsPath"]},"SaveRequestBody":{"type":"object","properties":{"generationId":{"type":"string"},"candidateIndex":{"type":"integer","minimum":0,"maximum":3},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["generationId","candidateIndex","name"]},"GenerateVideoResponse":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"]},"GenerateVideoRequestBody":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":1000},"name":{"type":"string","minLength":1,"maxLength":120},"aspectRatio":{"$ref":"#/components/schemas/VideoAspectRatio"},"resolution":{"$ref":"#/components/schemas/VideoResolution"},"durationSeconds":{"type":"integer","minimum":4,"maximum":15},"referenceAssetIds":{"type":"array","items":{"type":"string"},"maxItems":12},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["prompt","name","aspectRatio","resolution","durationSeconds","referenceAssetIds"]},"VideoAspectRatio":{"type":"string","enum":["16:9","9:16","1:1"]},"VideoResolution":{"type":"string","enum":["720p","1080p"]},"OAuthRegisterClientResponse":{"type":"object","properties":{"client_id":{"type":"string"},"client_name":{"type":"string","nullable":true},"redirect_uris":{"type":"array","items":{"type":"string"}},"grant_types":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_method":{"type":"string","enum":["none"]}},"required":["client_id","client_name","redirect_uris","grant_types","token_endpoint_auth_method"]},"OAuthError":{"type":"object","properties":{"error":{"type":"string","example":"invalid_grant"},"error_description":{"type":"string"}},"required":["error"]},"OAuthRegisterClientBody":{"type":"object","properties":{"client_name":{"type":"string","example":"Claude.ai"},"redirect_uris":{"type":"array","items":{"type":"string","format":"uri"},"default":[],"description":"Required (at least one) whenever grant_types includes authorization_code.","example":["https://claude.ai/api/mcp/auth_callback"]},"grant_types":{"type":"array","items":{"type":"string"},"description":"Any of authorization_code, refresh_token, urn:ietf:params:oauth:grant-type:device_code. Omitted means authorization_code + refresh_token."}}},"OAuthClientResponse":{"type":"object","properties":{"client_id":{"type":"string"},"client_name":{"type":"string","nullable":true},"redirect_uris":{"type":"array","items":{"type":"string"}},"redirect_uri_valid":{"type":"boolean","description":"Present only when the redirect_uri query parameter was supplied."}},"required":["client_id","client_name","redirect_uris"]},"OAuthTokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"number"},"scope":{"type":"string"}},"required":["access_token","refresh_token","token_type","expires_in","scope"]},"OAuthTokenBody":{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:device_code"]},"client_id":{"type":"string"},"code":{"type":"string"},"redirect_uri":{"type":"string"},"code_verifier":{"type":"string"},"refresh_token":{"type":"string"},"device_code":{"type":"string"}},"required":["grant_type","client_id"]},"OAuthDeviceAuthorizationResponse":{"type":"object","properties":{"device_code":{"type":"string"},"user_code":{"type":"string","example":"BCDF-GHJK"},"expires_in":{"type":"number"},"interval":{"type":"number"}},"required":["device_code","user_code","expires_in","interval"]},"OAuthDeviceAuthorizationBody":{"type":"object","properties":{"client_id":{"type":"string"},"scope":{"type":"string","description":"Space-delimited requested scopes, parsed like the authorize flow."}},"required":["client_id"]},"OAuthRevokeBody":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"OAuthCreateAuthorizationCodeResponse":{"type":"object","properties":{"code":{"type":"string"},"scope":{"type":"string","description":"Scopes actually granted, space-delimited. RFC 6749 §4.1.2 requires this when it differs from the request."}},"required":["code","scope"]},"OAuthCreateAuthorizationCodeBody":{"type":"object","properties":{"client_id":{"type":"string"},"org_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"redirect_uri":{"type":"string","format":"uri"},"code_challenge":{"type":"string","minLength":1},"code_challenge_method":{"type":"string","enum":["S256"]},"scope":{"type":"string","description":"Space-delimited requested scopes (RFC 6749 §3.3), e.g. \"conduit cli\". Unknown values are ignored; omitted means \"conduit\", which is what MCP clients get."}},"required":["client_id","redirect_uri","code_challenge","code_challenge_method"]},"OAuthDeviceApproveResponse":{"type":"object","properties":{"client_name":{"type":"string","nullable":true},"scope":{"type":"string"}},"required":["client_name","scope"]},"OAuthDeviceApproveBody":{"type":"object","properties":{"user_code":{"type":"string"},"org_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["user_code"]},"OAuthDeviceLookupBody":{"type":"object","properties":{"user_code":{"type":"string"}},"required":["user_code"]},"OAuthDeviceDenyBody":{"type":"object","properties":{"user_code":{"type":"string"}},"required":["user_code"]},"OAuthGrantListResponse":{"type":"object","properties":{"grants":{"type":"array","items":{"$ref":"#/components/schemas/OAuthGrant"}},"total":{"type":"integer","minimum":0,"description":"Every grant that matches, beyond this page."}},"required":["grants","total"]},"OAuthGrant":{"type":"object","properties":{"id":{"type":"number"},"clientId":{"type":"string"},"clientName":{"type":"string","nullable":true},"scope":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","clientId","clientName","scope","createdAt","lastUsedAt"]},"CreateOnboardingRequestResponse":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/OnboardingRequest"},"organization":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"publicId":{"type":"string"},"name":{"type":"string"}},"required":["id","publicId","name"]},"recipient":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"email":{"type":"string","nullable":true,"format":"email"},"name":{"type":"string","nullable":true},"role":{"type":"string"}},"required":["id","email","name","role"]},"onboardingUrl":{"type":"string","format":"uri"},"invitationMessage":{"type":"string"}},"required":["request","organization","recipient","onboardingUrl","invitationMessage"]},"OnboardingRequest":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"recipientUserId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"createdByUserId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"originalRequestId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"status":{"type":"string","enum":["pending","submitted"]},"walkthroughFileCount":{"type":"integer","minimum":0,"maximum":2147483647},"knowledgeFileCount":{"type":"integer","minimum":0,"maximum":2147483647},"knowledgeUrlCount":{"type":"integer","minimum":0,"maximum":2147483647},"mediaFileCount":{"type":"integer","minimum":0,"maximum":2147483647},"submittedAt":{"type":"string","nullable":true,"format":"date-time"},"slackNotifiedAt":{"type":"string","nullable":true,"format":"date-time"},"confirmationEmailSentAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","recipientUserId","createdByUserId","originalRequestId","status","walkthroughFileCount","knowledgeFileCount","knowledgeUrlCount","mediaFileCount","submittedAt","slackNotifiedAt","confirmationEmailSentAt","createdAt","updatedAt"]},"CreateOnboardingRequestBody":{"anyOf":[{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":42},"customerEmail":{"type":"string","format":"email","example":"owner@acme.com"}},"required":["orgId","customerEmail"],"additionalProperties":false},{"type":"object","properties":{"organizationName":{"type":"string","minLength":1,"maxLength":200,"example":"Acme"},"customerEmail":{"type":"string","format":"email","example":"owner@acme.com"}},"required":["organizationName","customerEmail"],"additionalProperties":false}]},"OnboardingRequestListResponse":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/RecentOnboardingRequest"}}},"required":["requests"]},"RecentOnboardingRequest":{"allOf":[{"$ref":"#/components/schemas/OnboardingRequest"},{"type":"object","properties":{"platformAccess":{"type":"string","enum":["restricted","granted","unavailable"]},"organization":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"publicId":{"type":"string"},"name":{"type":"string"}},"required":["id","publicId","name"]},"recipient":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"email":{"type":"string","nullable":true,"format":"email"},"name":{"type":"string","nullable":true}},"required":["id","email","name"]},"creator":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"email":{"type":"string","nullable":true,"format":"email"},"name":{"type":"string","nullable":true}},"required":["id","email","name"]},"onboardingUrl":{"type":"string","format":"uri"},"invitationMessage":{"type":"string"}},"required":["platformAccess","organization","recipient","creator","onboardingUrl","invitationMessage"]}]},"CurrentOnboardingResponse":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/OnboardingRequest"}},"required":["request"]},"SetOnboardingPlatformAccessResponse":{"type":"object","properties":{"platformAccess":{"type":"string","enum":["restricted","granted"]}},"required":["platformAccess"]},"SetOnboardingPlatformAccessBody":{"type":"object","properties":{"granted":{"type":"boolean"}},"required":["granted"],"additionalProperties":false},"SubmitOnboardingBody":{"type":"object","properties":{"walkthroughFileCount":{"type":"integer","minimum":0,"maximum":2147483647,"example":2},"walkthroughUrlCount":{"type":"integer","minimum":0,"maximum":2147483647,"default":0,"example":1},"knowledgeFileCount":{"type":"integer","minimum":0,"maximum":2147483647,"example":4},"knowledgeUrlCount":{"type":"integer","minimum":0,"maximum":2147483647,"example":2},"mediaFileCount":{"type":"integer","minimum":0,"maximum":2147483647,"example":3}},"required":["walkthroughFileCount","knowledgeFileCount","knowledgeUrlCount","mediaFileCount"],"additionalProperties":false},"OrgAssetUploadUrlResponse":{"type":"object","properties":{"uploadUrl":{"type":"string"},"publicId":{"type":"string"},"gcsPath":{"type":"string"},"publicUrl":{"type":"string"},"finalName":{"type":"string"}},"required":["uploadUrl","publicId","gcsPath","publicUrl","finalName"]},"UploadUrlBody":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"example":"slide-1.png"},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp","video/mp4","video/webm","video/quicktime","application/pdf"],"example":"image/png"},"byteSize":{"type":"integer","minimum":0},"nameStrategy":{"type":"string","enum":["fail","auto-suffix"]}},"required":["fileName","mimeType"]},"OrgAsset":{"type":"object","properties":{"id":{"type":"number"},"publicId":{"type":"string"},"orgId":{"type":"number"},"name":{"type":"string"},"type":{"type":"string","enum":["image","video","document","link","audio"]},"url":{"type":"string","nullable":true},"filePath":{"type":"string","nullable":true},"gcsPath":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":true},"summary":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","publicId","orgId","name","type","url","filePath","gcsPath","metadata","summary","createdAt","updatedAt"]},"CreateOrgAssetBody":{"type":"object","properties":{"publicId":{"type":"string","minLength":1,"example":"01HXYZ..."},"name":{"type":"string","minLength":1,"example":"onboarding-slide-1"},"type":{"type":"string","enum":["image","video","document","link","audio"],"example":"image"},"url":{"type":"string","format":"uri","example":"https://..."},"gcsPath":{"type":"string","example":"{org}/resources/sources/image/{publicId}.png"},"metadata":{"type":"object","additionalProperties":true},"summary":{"type":"string"},"nameStrategy":{"type":"string","enum":["fail","auto-suffix"]},"baseName":{"type":"string","minLength":1,"example":"logo","description":"Truly-original base name (un-suffixed). Used by the server's race-retry loop in nameStrategy='auto-suffix' so a race produces 'logo (3)' not 'logo (2) (2)'. Optional; falls back to `name` for legacy callers."}},"required":["name","type"]},"OrgAssetsUsedByAgentResponse":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/OrgAsset"}}},"required":["assets"]},"PageUploadUrlsResponse":{"type":"object","properties":{"publicId":{"type":"string"},"url":{"type":"string"},"uploads":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string"},"uploadUrl":{"type":"string"},"contentType":{"type":"string"},"maxBytes":{"type":"integer"}},"required":["fileName","uploadUrl","contentType","maxBytes"]}}},"required":["publicId","url","uploads"]},"PageUploadUrlsBody":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","pattern":"^[A-Za-z0-9][\\w\\-.]{0,99}$","example":"slide.js"},"byteSize":{"type":"integer","minimum":0}},"required":["fileName","byteSize"]},"minItems":1,"maxItems":256}},"required":["files"]},"CompletePageUploadBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"example":"Pricing slide"},"nameStrategy":{"type":"string","enum":["fail","auto-suffix"]}},"required":["name"]},"ReplaceUrlResponse":{"type":"object","properties":{"uploadUrl":{"type":"string","format":"uri"},"gcsPath":{"type":"string"},"publicId":{"type":"string"},"publicUrl":{"type":"string","format":"uri"}},"required":["uploadUrl","gcsPath","publicId","publicUrl"]},"ReplaceUrlBody":{"type":"object","properties":{"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp","video/mp4","video/webm","video/quicktime","application/pdf"]},"byteSize":{"type":"integer","minimum":0}},"required":["mimeType"]},"UpdateOrgAssetBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"example":"onboarding-slide-1"},"gcsPath":{"type":"string"},"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp","video/mp4","video/webm","video/quicktime","application/pdf"]}}},"AssetInfoResponse":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"type":"string","enum":["image","video","document","link","audio"]},"summary":{"type":"string","nullable":true},"transcript":{"type":"string"},"chunks_count":{"type":"integer","minimum":0},"url":{"type":"string","nullable":true},"truncated":{"type":"boolean"},"indexing_status":{"type":"string","enum":["indexed","not_indexed","indexing"]}},"required":["id","name","type","summary","transcript","chunks_count","url","truncated","indexing_status"]},"AssetInfoRequest":{"type":"object","properties":{"asset_id":{"type":"string","minLength":1,"example":"1ffe0cf8-5c45-448e-93c2-7f903d38d8e8"}},"required":["asset_id"]},"ReindexOrgAssetsResponse":{"type":"object","properties":{"triggered":{"type":"integer","minimum":0,"example":42},"failed":{"type":"integer","minimum":0,"example":0}},"required":["triggered","failed"]},"LabelListResponse":{"type":"object","properties":{"labels":{"type":"array","items":{"$ref":"#/components/schemas/Label"}}},"required":["labels"]},"LabelResponse":{"type":"object","properties":{"label":{"$ref":"#/components/schemas/Label"}},"required":["label"]},"CreateLabelBody":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,31}$","example":"test"},"color":{"type":"string","nullable":true,"pattern":"^#[0-9a-fA-F]{6}$","example":"#f59e0b"}},"required":["name"],"additionalProperties":false},"UpdateLabelBody":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,31}$","example":"test"},"color":{"type":"string","nullable":true,"pattern":"^#[0-9a-fA-F]{6}$","example":"#f59e0b"}},"additionalProperties":false},"SetAgentLabelsBody":{"type":"object","properties":{"labelIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"maxItems":20}},"required":["labelIds"],"additionalProperties":false},"VoiceLocaleListResponse":{"type":"object","properties":{"locales":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"language":{"type":"string"},"region":{"type":"string","nullable":true},"sample":{"type":"string","nullable":true}},"required":["code","language","region","sample"]}}},"required":["locales"]},"VoiceLookupResponse":{"type":"object","properties":{"voice":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string","nullable":true},"languages":{"type":"object","additionalProperties":{"type":"string","enum":["best","good"]}}},"required":["name","gender","languages"]}},"required":["voice"]},"VoiceLookupBody":{"type":"object","properties":{"provider":{"type":"string","enum":["cartesia","elevenlabs"]},"providerVoiceId":{"type":"string","minLength":1,"maxLength":200}},"required":["provider","providerVoiceId"],"additionalProperties":false},"VoiceListResponse":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/Voice"}}},"required":["voices"]},"Voice":{"type":"object","properties":{"id":{"type":"integer"},"orgId":{"type":"integer","nullable":true},"provider":{"type":"string"},"providerVoiceId":{"type":"string"},"name":{"type":"string"},"gender":{"type":"string","nullable":true},"languages":{"type":"object","additionalProperties":{"type":"string","enum":["best","good"]}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","provider","providerVoiceId","name","gender","languages","createdAt","updatedAt"]},"VoiceResponse":{"type":"object","properties":{"voice":{"$ref":"#/components/schemas/Voice"}},"required":["voice"]},"CreateVoiceBody":{"type":"object","properties":{"orgId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"provider":{"type":"string","enum":["cartesia","elevenlabs"]},"providerVoiceId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"gender":{"type":"string","nullable":true,"enum":["feminine","masculine","neutral",null]},"languages":{"type":"object","additionalProperties":{"type":"string","enum":["best","good"]},"example":{"en-US":"best","en":"good","es-MX":"good"}}},"required":["provider","providerVoiceId","name","languages"],"additionalProperties":false},"UpdateVoiceBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"gender":{"type":"string","nullable":true,"enum":["feminine","masculine","neutral",null]},"languages":{"type":"object","additionalProperties":{"type":"string","enum":["best","good"]},"example":{"en-US":"best","en":"good","es-MX":"good"}}},"additionalProperties":false},"OrgContent":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"publicId":{"type":"string"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"name":{"type":"string"},"type":{"type":"string","enum":["image","video","document","link","audio"]},"sourceKind":{"type":"string","enum":["upload","url","website","generated","transcript"]},"servable":{"type":"boolean"},"gcsPath":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"byteSize":{"type":"integer","nullable":true},"summary":{"type":"string","nullable":true},"metadata":{"$ref":"#/components/schemas/OrgContentMetadataResponse"},"sourceId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":"string","nullable":true}},"required":["id","publicId","orgId","name","type","sourceKind","servable","gcsPath","url","mimeType","byteSize","summary","metadata","sourceId","createdAt","updatedAt","deletedAt"]},"OrgContentMetadataResponse":{"allOf":[{"$ref":"#/components/schemas/OrgContentMetadata"},{"type":"object","properties":{"page":{"type":"object","properties":{"entry":{"type":"string"},"files":{"type":"array","items":{"type":"string"}}},"required":["entry","files"],"description":"An uploaded HTML page: its entry file and every file stored beside it."}}}]},"OrgContentIndexState":{"type":"object","properties":{"kb":{"type":"string"},"status":{"type":"string","enum":["indexing","indexed","not_indexed","failed"]},"vectorStoreId":{"type":"string"},"chunkCount":{"type":"integer","minimum":0},"wordCount":{"type":"integer","minimum":0},"lastIndexedAt":{"type":"string"},"sourceUrl":{"type":"string"},"contentHash":{"type":"string"}},"required":["kb","status"]},"OrgContentMetadata":{"type":"object","properties":{"index":{"$ref":"#/components/schemas/OrgContentIndexState"},"etag":{"type":"string"},"pageTitle":{"type":"string"},"crawlError":{"type":"string"},"lastCrawledAt":{"type":"string"},"video":{"type":"object","properties":{"durationS":{"type":"number","minimum":0},"sceneCount":{"type":"integer","minimum":0}}},"duplicateOfContentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"OrgContentCreateBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"publicId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["image","video","document","link","audio"]},"sourceKind":{"type":"string","enum":["upload","url","website","generated","transcript"],"default":"upload"},"servable":{"type":"boolean"},"gcsPath":{"type":"string","nullable":true,"minLength":1},"url":{"type":"string","nullable":true,"format":"uri"},"mimeType":{"type":"string","nullable":true},"byteSize":{"type":"integer","nullable":true},"metadata":{"$ref":"#/components/schemas/OrgContentMetadata"}},"required":["orgId","name","type","servable","gcsPath","url","mimeType","byteSize"]},"OrgContentPatchBody":{"type":"object","properties":{"name":{"type":"string","minLength":1},"summary":{"type":"string","nullable":true},"metadata":{"$ref":"#/components/schemas/OrgContentMetadataPatch"}}},"OrgContentMetadataPatch":{"type":"object","properties":{"index":{"type":"object","properties":{"kb":{"type":"string"},"status":{"type":"string","enum":["indexing","indexed","not_indexed","failed"]},"vectorStoreId":{"type":"string"},"chunkCount":{"type":"integer","minimum":0},"wordCount":{"type":"integer","minimum":0},"lastIndexedAt":{"type":"string"},"sourceUrl":{"type":"string"},"contentHash":{"type":"string"}}},"etag":{"type":"string"},"pageTitle":{"type":"string"},"crawlError":{"type":"string"},"lastCrawledAt":{"type":"string"},"video":{"type":"object","properties":{"durationS":{"type":"number","minimum":0},"sceneCount":{"type":"integer","minimum":0}}},"duplicateOfContentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}}},"ContentUsageList":{"type":"object","properties":{"usages":{"type":"array","items":{"$ref":"#/components/schemas/ContentUsageRow"}}},"required":["usages"]},"ContentUsageRow":{"type":"object","properties":{"kind":{"type":"string","enum":["org_branding","agent_branding","agent_config","config_version","certificate_design","index_membership"]},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentName":{"type":"string"},"agentSlug":{"type":"string"},"configVersionId":{"type":"string","format":"uuid"},"certificateId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"field":{"type":"string"}},"required":["kind","orgId"]},"OrgContentUploadUrlResponse":{"type":"object","properties":{"publicId":{"type":"string"},"gcsPath":{"type":"string"},"publicUrl":{"type":"string","format":"uri"},"uploadUrl":{"type":"string","format":"uri"},"expiresAt":{"type":"string"}},"required":["publicId","gcsPath","publicUrl","uploadUrl","expiresAt"]},"OrgContentUploadUrlBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"name":{"type":"string","minLength":1},"contentType":{"type":"string"},"byteSize":{"type":"integer","minimum":0},"kb":{"type":"string","default":"resources"}},"required":["orgId","name","contentType","byteSize"]},"ReconcileCallFinalizationsReport":{"type":"object","properties":{"scanned":{"type":"integer","minimum":0},"reconciled":{"type":"integer","minimum":0},"raced":{"type":"integer","minimum":0},"unresolved_closed":{"type":"integer","minimum":0},"invalid_artifacts":{"type":"integer","minimum":0},"storage_failures":{"type":"integer","minimum":0},"legacy_browser_connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"never_connected":{"type":"integer","minimum":0},"result":{"type":"string","enum":["ok","degraded"]}},"required":["scanned","reconciled","raced","unresolved_closed","invalid_artifacts","storage_failures","legacy_browser_connected","expired","never_connected","result"]},"BackfillCallLifecycleReport":{"type":"object","properties":{"scanned":{"type":"integer","minimum":0},"connected_from_messages":{"type":"integer","minimum":0},"connected_from_start":{"type":"integer","minimum":0}},"required":["scanned","connected_from_messages","connected_from_start"]},"PurgeDeletedContentReport":{"type":"object","properties":{"scanned":{"type":"integer","minimum":0},"purged":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["scanned","purged","failed"]},"ReapStuckJobsReport":{"type":"object","properties":{"reaped":{"type":"integer","minimum":0},"jobIds":{"type":"array","items":{"type":"string"}}},"required":["reaped","jobIds"]},"SweepWebhookRetriesReport":{"type":"object","properties":{"swept":{"type":"integer","minimum":0},"delivered":{"type":"integer","minimum":0},"exhausted":{"type":"integer","minimum":0},"deliveryIds":{"type":"array","items":{"type":"string"}}},"required":["swept","delivered","exhausted","deliveryIds"]},"SweepIdleCopilotThreadsReport":{"type":"object","properties":{"closed":{"type":"integer","minimum":0}},"required":["closed"]},"WaitlistReleaseReport":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"integer"},"agentId":{"type":"integer"},"reason":{"type":"string","enum":["nobody_waiting","cooling_down","looks_broken","no_room_since_refusal","room_since_refusal","no_recent_refusal","deleted","already_releasing"]},"send":{"type":"integer","minimum":0},"delivery":{"type":"string","enum":["none","sent","unknown","not_configured","failed"]}},"required":["orgId","agentId","reason","send","delivery"]}},"purged":{"type":"integer","minimum":0}},"required":["agents","purged"]},"SweepWebChatReport":{"type":"object","properties":{"counters":{"type":"integer","minimum":0},"sessions":{"type":"integer","minimum":0}},"required":["counters","sessions"]},"AgentStageDigestReport":{"type":"object","properties":{"status":{"type":"string","enum":["off","already_posted","posted"]},"start":{"type":"string"},"end":{"type":"string"}},"required":["status","start","end"]},"BackfillInsightsReport":{"type":"object","properties":{"scanned":{"type":"integer","minimum":0},"enqueued":{"type":"integer","minimum":0}},"required":["scanned","enqueued"]},"Organization":{"type":"object","properties":{"id":{"type":"number","example":1},"publicId":{"type":"string","example":"org_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4e"},"name":{"type":"string","example":"Acme Corp"},"domains":{"type":"array","nullable":true,"items":{"type":"string"},"example":["acme.com"]},"platformUrls":{"type":"array","nullable":true,"items":{"type":"string"},"example":["https://app.acme.com"]},"livekitConfig":{"type":"object","properties":{"production":{"type":"object","properties":{"agentId":{"type":"string","nullable":true},"agentStatus":{"type":"string","nullable":true},"pinnedForgeVersion":{"type":"string","nullable":true},"deployedVersion":{"type":"string","nullable":true},"deployedCommitHash":{"type":"string","nullable":true},"deployedBranch":{"type":"string","nullable":true}},"required":["agentId","agentStatus","pinnedForgeVersion"]},"test":{"type":"object","properties":{"agentId":{"type":"string","nullable":true},"agentStatus":{"type":"string","nullable":true},"pinnedForgeVersion":{"type":"string","nullable":true},"deployedVersion":{"type":"string","nullable":true},"deployedCommitHash":{"type":"string","nullable":true},"deployedBranch":{"type":"string","nullable":true}},"required":["agentId","agentStatus","pinnedForgeVersion"]}},"required":["production","test"]},"websiteUrl":{"type":"string","nullable":true,"example":"https://acme.com","description":"The organization's own public site, linked from follow-up emails its agents send."},"branding":{"$ref":"#/components/schemas/OrgBranding"},"brandingRaw":{"$ref":"#/components/schemas/OrgBrandingRaw"},"conduitKeyEnabled":{"type":"boolean","example":false,"description":"Whether this organization currently has an Aidan MCP key configured."},"hasVm":{"type":"boolean","example":false,"description":"Product entitlement: org is provisioned for VM / LiveBox (vision + browser tools)."},"billingVisibleToCustomers":{"type":"boolean","example":true,"description":"Whether non-Sable viewers can access billing classifications. Sable admins always retain access."},"accountHealthRouting":{"type":"boolean","example":false,"description":"Whether calls that let Sable pick a saved browser profile skip profiles that are confirmed signed out, while a signed-in one is free."},"orgSlug":{"type":"string","nullable":true,"example":"acme","description":"The slug of the Sable Apps org linked to this organization; its live call events go to that org."},"suspension":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSuspension"},"description":"Each reason the organization is suspended for. While any is set, every agent refuses calls."},"createdAt":{"type":"string","nullable":true,"format":"date-time","example":"2024-01-01T00:00:00Z"},"updatedAt":{"type":"string","nullable":true,"format":"date-time","example":"2024-01-01T00:00:00Z"},"deletedAt":{"type":"string","nullable":true,"format":"date-time","example":null}},"required":["id","publicId","name","domains","platformUrls","livekitConfig","websiteUrl","conduitKeyEnabled","hasVm","billingVisibleToCustomers","accountHealthRouting","orgSlug","suspension","createdAt","updatedAt","deletedAt"]},"OrgBranding":{"type":"object","nullable":true,"properties":{"logo_url":{"type":"string","nullable":true,"default":null},"logo_lockup_url":{"type":"string","nullable":true,"default":null},"logo_alt":{"type":"string","nullable":true,"default":null},"brand_color":{"type":"string","nullable":true,"default":null},"avatar_label":{"type":"string","nullable":true,"default":null},"accent_color":{"type":"string","nullable":true,"default":null},"orb_color":{"type":"string","nullable":true,"default":null},"thinking_color":{"type":"string","nullable":true,"default":null},"agent_control_color":{"type":"string","nullable":true,"default":null},"background_color":{"type":"string","nullable":true,"default":null},"background_image_url":{"type":"string","nullable":true,"default":null,"description":"Background image URL applied behind pre-call surfaces (connecting, login, intro, outro)"},"font_family":{"type":"string","nullable":true,"default":null},"heading_font_family":{"type":"string","nullable":true,"default":null},"watermark_logo_url":{"type":"string","nullable":true,"default":null},"watermark_logo_dark_url":{"type":"string","nullable":true,"default":null},"watermark_logo_light_url":{"type":"string","nullable":true,"default":null},"intro_message":{"type":"string","nullable":true,"default":null},"intro_title":{"type":"string","nullable":true,"default":null,"description":"Intro headline. Rendered in the primary text color. Overrides the agent's intro title."},"intro_cta_text":{"type":"string","nullable":true,"default":null,"description":"Intro CTA button label. Overrides the agent's intro CTA text."},"loading_slides":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LoadingSlide"},"default":null},"busy_eyebrow":{"type":"string","nullable":true,"default":null},"busy_title":{"type":"string","nullable":true,"default":null},"busy_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_label":{"type":"string","nullable":true,"default":null},"busy_return_label":{"type":"string","nullable":true,"default":null},"busy_return_url":{"type":"string","nullable":true,"default":null},"onboarding_steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"},"default":null},"browser_intro_logo":{"type":"boolean","nullable":true,"default":null},"browser_intro_text":{"type":"string","nullable":true,"default":null},"intro_mode":{"type":"string","nullable":true,"enum":["orb","branded",null],"default":null,"description":"Intro experience mode: orb (animated orb) or branded (hero image splash)"},"branded_hero_image_url":{"type":"string","nullable":true,"default":null,"description":"Hero image URL for branded intro mode"},"outro_feedback_enabled":{"type":"boolean","nullable":true,"default":null},"outro_rating_question":{"type":"string","nullable":true,"default":null},"outro_rating_style":{"type":"string","nullable":true,"enum":["stars","numeric",null],"default":null,"description":"Outro rating control style. null defaults to stars."},"outro_rating_scale_max":{"type":"integer","nullable":true,"minimum":1,"maximum":10,"default":null,"description":"Upper bound of the outro rating scale (1–N). null defaults to 5 for stars or 10 for numeric."},"outro_text_questions":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_title":{"type":"string","nullable":true,"default":null},"outro_subtitle":{"type":"string","nullable":true,"default":null},"outro_chip_question":{"type":"string","nullable":true,"default":null},"outro_chips":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_poll_question":{"type":"string","nullable":true,"default":null},"outro_poll_options":{"type":"array","nullable":true,"items":{"type":"string"},"default":null},"outro_return_label":{"type":"string","nullable":true,"default":null},"outro_return_url":{"type":"string","nullable":true,"default":null},"outro_restart_label":{"type":"string","nullable":true,"default":null},"outro_cta_label":{"type":"string","nullable":true,"default":null},"outro_cta_url":{"type":"string","nullable":true,"default":null},"outro_text_field_placeholder":{"type":"string","nullable":true,"default":null},"outro_schedule_label":{"type":"string","nullable":true,"default":null},"outro_schedule_url":{"type":"string","nullable":true,"default":null},"outro_schedule_icon":{"type":"string","nullable":true,"default":null},"outro_schedule_description":{"type":"string","nullable":true,"default":null,"description":"Subtitle text shown under the schedule card on the outro screen."},"outro_share_enabled":{"type":"boolean","nullable":true,"default":null,"description":"Whether the share card is shown on the outro screen. null/true ⇒ shown, false ⇒ hidden."},"outro_share_label":{"type":"string","nullable":true,"default":null},"outro_share_description":{"type":"string","nullable":true,"default":null},"outro_share_url":{"type":"string","nullable":true,"default":null},"outro_share_icon":{"type":"string","nullable":true,"default":null},"outro_submit_label":{"type":"string","nullable":true,"default":null},"outro_thank_you_title":{"type":"string","nullable":true,"default":null},"outro_thank_you_subtitle":{"type":"string","nullable":true,"default":null},"busy_primary_url":{"type":"string","nullable":true,"default":null},"login_heading":{"type":"string","nullable":true,"default":null,"description":"Heading text on the login form (e.g. 'Learn to use'). Shown before the logo pill."},"login_subtitle":{"type":"string","nullable":true,"default":null,"description":"Subtitle / instructions shown below the heading on the login form."},"login_button_label":{"type":"string","nullable":true,"default":null,"description":"Submit button label on the login form. Defaults to 'Proceed'."},"link_preview_title":{"type":"string","nullable":true,"default":null,"description":"Title shown when a call link is unfurled in chat / social previews"},"link_preview_description":{"type":"string","nullable":true,"default":null,"description":"Description shown when a call link is unfurled in chat / social previews"}}},"OrgBrandingRaw":{"type":"object","nullable":true,"additionalProperties":true,"description":"Stored branding blob verbatim (unprojected). May be v1-flat or v2-nested."},"OrganizationSuspension":{"type":"object","properties":{"reason":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","example":"contract-overage","description":"Lowercase words joined by `-`. Each setter names its own reason and lifts only that one."},"setBy":{"type":"string","example":"ops@example.com"},"setAt":{"type":"string","example":"2026-11-24T00:00:00.000Z"}},"required":["reason","setBy","setAt"]},"CreateOrganizationBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"example":"Acme Corp"},"domains":{"type":"array","items":{"type":"string"},"example":["acme.com"]}},"required":["name"]},"UpdateOrganizationBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"example":"Acme Corp"},"domains":{"type":"array","items":{"type":"string"},"example":["acme.com"]},"websiteUrl":{"type":"string","nullable":true,"maxLength":2048,"format":"uri","example":"https://acme.com"}}},"UpdateBrandingBody":{"type":"object","properties":{"branding":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[2]},"styles":{"type":"object","nullable":true,"additionalProperties":{"type":"object","nullable":true,"additionalProperties":true}},"identity":{"type":"object","nullable":true,"properties":{"colors":{"type":"object","nullable":true,"properties":{"brand":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"accent":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"background":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"orb":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"thinking":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"agentControl":{"type":"string","nullable":true,"pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"}},"additionalProperties":false},"logos":{"type":"object","nullable":true,"properties":{"logo":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"lockup":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"alt":{"type":"string","nullable":true,"maxLength":120},"watermark":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"watermarkDark":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"watermarkLight":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"hero":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"}},"additionalProperties":false},"fonts":{"type":"object","nullable":true,"properties":{"body":{"type":"string","nullable":true,"maxLength":120},"heading":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false},"background":{"type":"object","nullable":true,"properties":{"image":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"}},"additionalProperties":false}},"additionalProperties":false},"screens":{"type":"object","nullable":true,"properties":{"login":{"type":"object","nullable":true,"properties":{"heading":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":160},"buttonLabel":{"type":"string","nullable":true,"maxLength":40},"stageImage":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"fields":{"type":"array","nullable":true,"items":{"type":"object","properties":{"type":{"type":"string","enum":["name","company","email","website","text"]},"label":{"type":"string","minLength":1,"maxLength":60},"required":{"type":"boolean"},"workEmailOnly":{"type":"boolean"}},"required":["type","label","required"],"additionalProperties":false},"minItems":1,"maxItems":8}},"additionalProperties":false},"intro":{"type":"object","nullable":true,"properties":{"avatarLabel":{"type":"string","nullable":true,"maxLength":60},"mode":{"type":"string","nullable":true,"enum":["orb","branded",null]},"pageUrl":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"title":{"type":"string","nullable":true,"maxLength":160},"message":{"type":"string","nullable":true,"maxLength":400},"ctaText":{"type":"string","nullable":true,"maxLength":40},"ctaNote":{"type":"string","nullable":true,"maxLength":160}},"additionalProperties":false},"busy":{"type":"object","nullable":true,"properties":{"eyebrow":{"type":"string","nullable":true,"maxLength":40},"title":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":200},"primary":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40}},"additionalProperties":false},"return":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"}},"additionalProperties":false}},"additionalProperties":false},"browser":{"type":"object","nullable":true,"properties":{"introLogo":{"type":"boolean","nullable":true},"introText":{"type":"string","nullable":true,"maxLength":80}},"additionalProperties":false},"tooltips":{"type":"object","nullable":true,"properties":{"steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"},"maxItems":20}},"additionalProperties":false},"outro":{"type":"object","nullable":true,"properties":{"rating":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean","nullable":true},"question":{"type":"string","nullable":true,"maxLength":120},"style":{"type":"string","nullable":true,"enum":["stars","numeric",null]},"scaleMax":{"type":"integer","nullable":true,"minimum":1,"maximum":10},"explanationRequiredBelow":{"type":"integer","nullable":true,"minimum":0,"maximum":10}},"additionalProperties":false},"feedback":{"type":"object","nullable":true,"properties":{"default":{"type":"array","nullable":true,"items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"placeholder":{"type":"string"}},"required":["title"],"additionalProperties":false},"maxItems":5},"buckets":{"type":"array","nullable":true,"items":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"placeholder":{"type":"string"}},"required":["title"],"additionalProperties":false},"minItems":1,"maxItems":5}},"required":["min","max","questions"]}}},"additionalProperties":false},"chips":{"type":"object","nullable":true,"properties":{"question":{"type":"string","nullable":true,"maxLength":120},"options":{"type":"array","nullable":true,"items":{"type":"string"},"maxItems":10}},"additionalProperties":false},"poll":{"type":"object","nullable":true,"properties":{"question":{"type":"string","nullable":true,"maxLength":120},"options":{"type":"array","nullable":true,"items":{"type":"string"},"maxItems":10}},"additionalProperties":false},"title":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":160},"thankYou":{"type":"object","nullable":true,"properties":{"title":{"type":"string","nullable":true,"maxLength":80},"subtitle":{"type":"string","nullable":true,"maxLength":160}},"additionalProperties":false},"submitLabel":{"type":"string","nullable":true,"maxLength":40},"textFieldPlaceholder":{"type":"string","nullable":true,"maxLength":120},"ctas":{"type":"object","nullable":true,"properties":{"return":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"}},"additionalProperties":false},"restart":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40}},"additionalProperties":false},"cta":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":40}},"additionalProperties":false},"schedule":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":60},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"icon":{"type":"string","nullable":true},"description":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false},"share":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean","nullable":true},"label":{"type":"string","nullable":true,"maxLength":60},"description":{"type":"string","nullable":true,"maxLength":120},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"icon":{"type":"string","nullable":true}},"additionalProperties":false},"moreInfo":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":60},"url":{"type":"string","nullable":true,"pattern":"^(?!.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\})https?:\\/\\/\\S+$"},"icon":{"type":"string","nullable":true},"description":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"certificate":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean","nullable":true},"background":{"type":"string","nullable":true,"pattern":"^(https?:\\/\\/\\S+|.*\\{\\{\\s*asset:([A-Za-z0-9_-]+)\\s*\\}\\}.*)$"},"width":{"type":"integer","nullable":true,"minimum":200,"maximum":4096},"height":{"type":"integer","nullable":true,"minimum":200,"maximum":4096},"slots":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":60},"template":{"type":"string","minLength":1,"maxLength":200},"x":{"type":"number","minimum":0,"maximum":100},"y":{"type":"number","minimum":0,"maximum":100},"maxWidth":{"type":"number","minimum":1,"maximum":100},"fontSize":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":400},"fontWeight":{"anyOf":[{"type":"number","enum":[400]},{"type":"number","enum":[600]},{"type":"number","enum":[700]}]},"color":{"type":"string","pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"},"align":{"type":"string","enum":["left","center","right"]},"transform":{"type":"string","enum":["none","uppercase"]},"letterSpacing":{"type":"number","minimum":-10,"maximum":40}},"required":["id","label","template","x","y","maxWidth","fontSize","fontWeight","color","align"],"additionalProperties":false},"maxItems":12},"gate":{"type":"string","nullable":true,"enum":["final-moment","rubric","always","required-moments",null]},"requiredMoments":{"type":"array","nullable":true,"items":{"type":"string","minLength":1,"maxLength":120},"maxItems":50},"filename":{"type":"string","nullable":true,"maxLength":60},"cta":{"type":"object","nullable":true,"properties":{"label":{"type":"string","nullable":true,"maxLength":60},"description":{"type":"string","nullable":true,"maxLength":120}},"additionalProperties":false}},"additionalProperties":false},"linkPreview":{"type":"object","nullable":true,"properties":{"title":{"type":"string","nullable":true,"maxLength":80},"description":{"type":"string","nullable":true,"maxLength":200}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},{"type":"object","properties":{"logo_url":{"type":"string","nullable":true},"logo_lockup_url":{"type":"string","nullable":true},"logo_alt":{"type":"string","nullable":true},"brand_color":{"type":"string","nullable":true},"avatar_label":{"type":"string","nullable":true},"accent_color":{"type":"string","nullable":true},"orb_color":{"type":"string","nullable":true},"thinking_color":{"type":"string","nullable":true},"agent_control_color":{"type":"string","nullable":true},"background_color":{"type":"string","nullable":true},"background_image_url":{"type":"string","nullable":true},"font_family":{"type":"string","nullable":true},"heading_font_family":{"type":"string","nullable":true},"watermark_logo_url":{"type":"string","nullable":true},"watermark_logo_dark_url":{"type":"string","nullable":true},"watermark_logo_light_url":{"type":"string","nullable":true},"intro_message":{"type":"string","nullable":true},"intro_title":{"type":"string","nullable":true},"intro_cta_text":{"type":"string","nullable":true},"loading_slides":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LoadingSlide"}},"busy_eyebrow":{"type":"string","nullable":true},"busy_title":{"type":"string","nullable":true},"busy_subtitle":{"type":"string","nullable":true},"busy_primary_label":{"type":"string","nullable":true},"busy_return_label":{"type":"string","nullable":true},"busy_return_url":{"type":"string","nullable":true},"onboarding_steps":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/OnboardingStep"}},"browser_intro_logo":{"type":"boolean","nullable":true},"browser_intro_text":{"type":"string","nullable":true},"intro_mode":{"type":"string","nullable":true,"enum":["orb","branded",null]},"branded_hero_image_url":{"type":"string","nullable":true},"outro_feedback_enabled":{"type":"boolean","nullable":true},"outro_rating_question":{"type":"string","nullable":true},"outro_rating_style":{"type":"string","nullable":true,"enum":["stars","numeric",null]},"outro_rating_scale_max":{"type":"integer","nullable":true,"minimum":1,"maximum":10},"outro_text_questions":{"type":"array","nullable":true,"items":{"type":"string"}},"outro_title":{"type":"string","nullable":true},"outro_subtitle":{"type":"string","nullable":true},"outro_chip_question":{"type":"string","nullable":true},"outro_chips":{"type":"array","nullable":true,"items":{"type":"string"}},"outro_poll_question":{"type":"string","nullable":true},"outro_poll_options":{"type":"array","nullable":true,"items":{"type":"string"}},"outro_return_label":{"type":"string","nullable":true},"outro_return_url":{"type":"string","nullable":true},"outro_restart_label":{"type":"string","nullable":true},"outro_cta_label":{"type":"string","nullable":true},"outro_cta_url":{"type":"string","nullable":true},"outro_text_field_placeholder":{"type":"string","nullable":true},"outro_schedule_label":{"type":"string","nullable":true},"outro_schedule_url":{"type":"string","nullable":true},"outro_schedule_icon":{"type":"string","nullable":true},"outro_schedule_description":{"type":"string","nullable":true},"outro_share_enabled":{"type":"boolean","nullable":true},"outro_share_label":{"type":"string","nullable":true},"outro_share_description":{"type":"string","nullable":true},"outro_share_url":{"type":"string","nullable":true},"outro_share_icon":{"type":"string","nullable":true},"outro_submit_label":{"type":"string","nullable":true},"outro_thank_you_title":{"type":"string","nullable":true},"outro_thank_you_subtitle":{"type":"string","nullable":true},"busy_primary_url":{"type":"string","nullable":true},"login_heading":{"type":"string","nullable":true},"login_subtitle":{"type":"string","nullable":true},"login_button_label":{"type":"string","nullable":true},"link_preview_title":{"type":"string","nullable":true},"link_preview_description":{"type":"string","nullable":true},"waiting_message":{"nullable":true},"busy_helper_items":{"nullable":true},"busy_panel_title":{"nullable":true},"busy_panel_subtitle":{"nullable":true},"busy_status_title":{"nullable":true},"busy_status_subtitle":{"nullable":true},"busy_status_estimate":{"nullable":true},"busy_wait_title":{"nullable":true},"busy_wait_items":{"nullable":true},"browser_stage_bg":{"nullable":true},"outro_recap_items":{"nullable":true},"login_email_hint":{"nullable":true},"text_primary_color":{"nullable":true},"text_secondary_color":{"nullable":true},"pill_bg_color":{"nullable":true},"pill_text_color":{"nullable":true}},"additionalProperties":false}]}},"required":["branding"]},"UpdateOrganizationEntitlementsBody":{"anyOf":[{"type":"object","properties":{"hasVm":{"type":"boolean","example":true},"billingVisibleToCustomers":{"type":"boolean","example":false},"accountHealthRouting":{"type":"boolean","example":true}},"required":["hasVm"]},{"type":"object","properties":{"hasVm":{"type":"boolean","example":true},"billingVisibleToCustomers":{"type":"boolean","example":false},"accountHealthRouting":{"type":"boolean","example":true}},"required":["billingVisibleToCustomers"]},{"type":"object","properties":{"hasVm":{"type":"boolean","example":true},"billingVisibleToCustomers":{"type":"boolean","example":false},"accountHealthRouting":{"type":"boolean","example":true}},"required":["accountHealthRouting"]}]},"SetOrganizationOrgSlugBody":{"type":"object","properties":{"slug":{"type":"string","nullable":true,"minLength":3,"maxLength":49,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","example":"acme","description":"The linked Sable Apps org's name; null unlinks it."}},"required":["slug"]},"RotateMcpApiKeyResponse":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"},"key":{"type":"string","example":"sbl_mcp_0000000000000000000000000000000000000000000","description":"Plaintext key returned once. Store it before leaving the response."}},"required":["organization","key"]},"RecordingSessionResponse":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/RecordingSession"}},"required":["session"]},"RecordingSession":{"type":"object","properties":{"publicId":{"type":"string","example":"rec_AbCdEf1234567890XYZ12"},"orgId":{"type":"number","example":1},"createdByUserId":{"type":"number","nullable":true,"example":42},"status":{"type":"string","enum":["active","finished","discarded"],"example":"active"},"initialUrl":{"type":"string","nullable":true,"example":"https://www.notion.so/"},"observationCount":{"type":"integer","minimum":0,"example":3},"createdAt":{"type":"string","example":"2026-05-25T00:00:00Z"},"updatedAt":{"type":"string","example":"2026-05-25T00:00:00Z"},"deletedAt":{"type":"string","nullable":true,"example":null}},"required":["publicId","orgId","createdByUserId","status","initialUrl","observationCount","createdAt","updatedAt","deletedAt"]},"CreateRecordingSessionBody":{"type":"object","properties":{"orgId":{"type":"number","example":1,"description":"Override for Sable admins; ignored for regular users."},"initialUrl":{"type":"string","maxLength":2048,"format":"uri","example":"https://www.notion.so/","description":"HTTP(S) URL the recording opens at — surfaced in diagnostics."}},"additionalProperties":false},"ObservationUploadUrlsResponse":{"type":"object","properties":{"observationPublicId":{"type":"string","example":"obs_AbCdEf1234567890XYZ12"},"folder":{"type":"string","example":"org_abc/observations/rec_xyz/obs_def"},"uploads":{"type":"array","items":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/ObservationArtifactKey"},"url":{"type":"string","example":"https://storage.googleapis.com/...&X-Goog-Signature=..."},"headers":{"type":"object","additionalProperties":{"type":"string"},"example":{"Content-Type":"image/jpeg","x-goog-content-length-range":"0,26214400"}}},"required":["key","url","headers"]},"description":"One signed PUT URL per requested artifact slot."}},"required":["observationPublicId","folder","uploads"]},"ObservationArtifactKey":{"type":"string","enum":["before","after","beforeA11y","afterA11y"]},"ObservationUploadUrlsBody":{"type":"object","properties":{"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ObservationArtifactKey"},"maxItems":4,"description":"Which artifact slots the client has bytes for and wants signed PUT URLs."}},"required":["artifacts"],"additionalProperties":false},"ObservationCreatedResponse":{"type":"object","properties":{"observationPublicId":{"type":"string","example":"obs_AbCdEf1234567890XYZ12"},"folder":{"type":"string","example":"org_abc/observations/rec_xyz/obs_def","description":"GCS path prefix under OBSERVATIONS_GCS_BUCKET."}},"required":["observationPublicId","folder"]},"FinalizeObservationBody":{"type":"object","properties":{"observation":{"$ref":"#/components/schemas/ObservationJson"}},"required":["observation"],"additionalProperties":false},"ObservationJson":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"integer"},"sessionId":{"type":"string"},"action":{"type":"object","properties":{"kind":{"type":"string"},"selector":{"type":"string","nullable":true},"x":{"type":"number"},"y":{"type":"number"}},"required":["kind"],"additionalProperties":true},"beforeSelectors":{"type":"array","items":{"type":"string"}},"afterSelectors":{"type":"array","items":{"type":"string"}},"beforeUrl":{"type":"string"},"afterUrl":{"type":"string"},"description":{"type":"string","nullable":true},"skillId":{"type":"string"}},"required":["id","timestamp","sessionId","action","beforeSelectors","afterSelectors"],"additionalProperties":true,"description":"The observation document. Written to observation.json as the commit marker."},"ObservationListResponse":{"type":"object","properties":{"observations":{"type":"array","items":{"type":"object","properties":{"observationPublicId":{"type":"string","example":"obs_AbCdEf1234567890XYZ12"},"observation":{"type":"object","additionalProperties":true}},"required":["observationPublicId","observation"]}}},"required":["observations"]},"ListSessionReviewsResponse":{"type":"object","properties":{"reviews":{"type":"array","items":{"$ref":"#/components/schemas/SessionReview"}}},"required":["reviews"]},"SessionReview":{"type":"object","properties":{"id":{"type":"number","example":45},"sessionId":{"type":"number","example":123},"quotedText":{"type":"string"},"quoteLanguage":{"type":"string","nullable":true},"anchorIds":{"type":"array","items":{"type":"string"}},"anchorOffsetMs":{"type":"number","nullable":true},"currentBehavior":{"type":"string","nullable":true},"desiredBehavior":{"type":"string","nullable":true},"reviewerEmail":{"type":"string","nullable":true},"source":{"type":"string","enum":["reviewer","customer"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"linearEligible":{"type":"boolean"},"linear":{"type":"object","nullable":true,"properties":{"deliveryState":{"type":"string"},"issueId":{"type":"string","nullable":true},"issueIdentifier":{"type":"string","nullable":true},"issueUrl":{"type":"string","nullable":true},"issueStatus":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true}},"required":["deliveryState","issueId","issueIdentifier","issueUrl","issueStatus","assigneeName","syncedAt"]}},"required":["id","sessionId","quotedText","anchorIds","anchorOffsetMs","currentBehavior","desiredBehavior","reviewerEmail","source","createdAt","updatedAt","linearEligible","linear"]},"CreateSessionReviewResponse":{"type":"object","properties":{"review":{"$ref":"#/components/schemas/SessionReview"}},"required":["review"]},"CreateSessionReviewBody":{"type":"object","properties":{"quotedText":{"type":"string","minLength":1,"maxLength":5000,"example":"I can definitely get that set up for you."},"quoteLanguage":{"type":"string","nullable":true,"minLength":2,"maxLength":35},"anchorIds":{"type":"array","items":{"type":"string","maxLength":200,"pattern":"^(msg|tool):.+$"},"maxItems":100,"default":[],"example":["msg:8412"]},"anchorOffsetMs":{"type":"integer","nullable":true,"minimum":0,"maximum":2147483647,"example":83000},"currentBehavior":{"type":"string","maxLength":5000,"example":"Promised a feature we don't ship."},"desiredBehavior":{"type":"string","maxLength":5000,"example":"Should have offered to check with the team."}},"required":["quotedText"]},"CreateCustomerFeedbackResponse":{"type":"object","properties":{"created":{"type":"integer","minimum":0}},"required":["created"]},"CreateCustomerFeedbackBody":{"type":"object","properties":{"submissionId":{"type":"string","format":"uuid"},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"quotedText":{"type":"string","maxLength":5000},"comment":{"type":"string","minLength":1,"maxLength":5000},"callOffsetMs":{"type":"integer","nullable":true,"minimum":0,"maximum":2147483647}},"required":["id","quotedText","comment"]},"minItems":1,"maxItems":50}},"required":["submissionId","comments"]},"SubmitSessionReviewsResponse":{"type":"object","properties":{"submitted":{"type":"boolean"},"reviewCount":{"type":"integer","minimum":0}},"required":["submitted","reviewCount"]},"SubmitSessionReviewsBody":{"type":"object","properties":{"submissionId":{"type":"string","format":"uuid"},"reviewIds":{"type":"array","items":{"type":"integer","minimum":0,"exclusiveMinimum":true},"minItems":1,"maxItems":8}},"required":["submissionId","reviewIds"]},"UpdateSessionReviewBody":{"type":"object","properties":{"currentBehavior":{"type":"string","maxLength":5000},"desiredBehavior":{"type":"string","maxLength":5000}}},"TrackSessionReviewInLinearBody":{"type":"object","properties":{"issueIdentifier":{"type":"string","pattern":"^ENG-[1-9][0-9]*$"}}},"DeleteSessionReviewResponse":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"SessionListResponse":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"nextCursor":{"type":"string","nullable":true}},"required":["sessions","nextCursor"]},"Session":{"type":"object","properties":{"sessionRecordId":{"type":"integer"},"sessionId":{"type":"string","nullable":true},"artifactKey":{"type":"string","nullable":true},"callId":{"type":"string","nullable":true,"format":"uuid"},"agentId":{"type":"integer","nullable":true},"agentPublicId":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":true},"orgId":{"type":"integer","nullable":true},"startedAt":{"type":"string"},"endedAt":{"type":"string","nullable":true},"durationSeconds":{"type":"integer","nullable":true},"evalStatus":{"type":"string","nullable":true,"enum":["pending","running","partial","complete","failed","skipped",null]},"evalVerdict":{"type":"string","nullable":true}},"required":["sessionRecordId","sessionId","artifactKey","callId","agentId","agentPublicId","agentName","orgId","startedAt","endedAt","durationSeconds","evalStatus","evalVerdict"]},"DigitalHumanListResponse":{"type":"object","properties":{"digitalHumans":{"type":"array","items":{"$ref":"#/components/schemas/DigitalHumanLibraryEntry"}}},"required":["digitalHumans"]},"DigitalHumanLibraryEntry":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/DigitalHuman"},{"type":"object","properties":{"kind":{"type":"string","enum":["authorable"]}},"required":["kind"]}]},{"type":"object","properties":{"kind":{"type":"string","enum":["unsupported_replay"]},"id":{"type":"number"},"publicId":{"type":"string"},"orgId":{"type":"number"},"agentId":{"type":"number","nullable":true},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["kind","id","publicId","orgId","agentId","name","createdAt","updatedAt"]}]},"DigitalHumanDefinition":{"type":"object","properties":{"persona":{"$ref":"#/components/schemas/SimulationPersonaSpec"},"scenario":{"type":"string"},"success_criteria":{"type":"array","items":{"$ref":"#/components/schemas/SimulationSuccessCriterion"},"minItems":1},"metrics":{"type":"array","items":{"type":"string"}},"repeat_count":{"type":"integer","minimum":1,"maximum":20},"replay":{"$ref":"#/components/schemas/SimulationCallReplaySpec"}},"required":["persona","success_criteria"],"additionalProperties":false},"SimulationPersonaSpec":{"type":"object","properties":{"system_prompt":{"type":"string","minLength":1,"example":"You are a skeptical ops lead evaluating Monday.com..."},"voice":{"type":"string"},"mode":{"type":"string","enum":["realtime","realtime-agent","fixed-script","thread-replay"]},"model":{"type":"string"},"max_turns":{"type":"integer","minimum":1,"maximum":200},"max_duration_s":{"type":"integer","minimum":1,"maximum":3600},"turns":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"delivery":{"type":"string","enum":["text","audio"]}},"required":["system_prompt"],"additionalProperties":false},"SimulationSuccessCriterion":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$","example":"pricing-accuracy"},"prompt":{"type":"string","minLength":1,"example":"Did the agent state the Pro plan price correctly?"},"requires_visual":{"type":"boolean"},"reference":{"type":"object","additionalProperties":true}},"required":["id","prompt"],"additionalProperties":false},"SimulationCallReplaySpec":{"type":"object","properties":{"source_session_id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"source_config_version_id":{"type":"string","nullable":true,"format":"uuid"},"target_config_version_id":{"type":"string","nullable":true,"format":"uuid"},"source_started_at":{"type":"string","format":"date-time"},"controller_model":{"type":"string","minLength":1},"max_repairs_per_thread":{"type":"integer","minimum":0,"maximum":5},"threads":{"type":"array","items":{"$ref":"#/components/schemas/SimulationReplayThread"},"minItems":1}},"required":["source_session_id","source_config_version_id","target_config_version_id","source_started_at","threads"],"additionalProperties":false},"SimulationReplayThread":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$"},"title":{"type":"string","minLength":1,"maxLength":120},"goal":{"type":"string","minLength":1},"validation_target":{"type":"string","minLength":1},"preconditions":{"type":"array","items":{"$ref":"#/components/schemas/SimulationReplayPrecondition"}},"turns":{"type":"array","items":{"$ref":"#/components/schemas/SimulationReplayTurn"},"minItems":1,"maxItems":100}},"required":["id","title","goal","validation_target","preconditions","turns"],"additionalProperties":false},"SimulationReplayPrecondition":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$"},"kind":{"type":"string","enum":["user_context","agent_context","external_state"]},"assertion":{"type":"string","minLength":1},"evidence":{"type":"object","properties":{"source_turn_indexes":{"type":"array","items":{"type":"integer","minimum":0},"minItems":1}},"required":["source_turn_indexes"],"additionalProperties":false}},"required":["id","kind","assertion","evidence"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*$"},"kind":{"type":"string","enum":["agent_phase"]},"assertion":{"type":"string","minLength":1},"source_turn_index":{"type":"integer","minimum":0},"moment_id":{"type":"integer","nullable":true},"moment_name":{"type":"string","nullable":true,"minLength":1}},"required":["id","kind","assertion","source_turn_index","moment_id","moment_name"],"additionalProperties":false}]},"SimulationReplayTurn":{"type":"object","properties":{"source_turn_index":{"type":"integer","minimum":0},"user_utterance":{"type":"string","minLength":1},"reference_agent_response":{"type":"string","nullable":true,"minLength":1}},"required":["source_turn_index","user_utterance","reference_agent_response"],"additionalProperties":false},"DigitalHuman":{"type":"object","properties":{"id":{"type":"number","example":1},"publicId":{"type":"string","example":"dh_01961f2a-b3c4-7d5e-8f6a-9b0c1d"},"orgId":{"type":"number","example":1},"agentId":{"type":"number","nullable":true,"example":42},"name":{"type":"string","example":"skeptical-ops-lead"},"definition":{"$ref":"#/components/schemas/DigitalHumanDefinition"},"createdAt":{"type":"string","example":"2026-01-01T00:00:00Z"},"updatedAt":{"type":"string","example":"2026-01-01T00:00:00Z"}},"required":["id","publicId","orgId","agentId","name","definition","createdAt","updatedAt"]},"DigitalHumanResponse":{"type":"object","properties":{"digitalHuman":{"$ref":"#/components/schemas/DigitalHuman"}},"required":["digitalHuman"]},"CreateDigitalHumanBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9][a-z0-9-]*$","example":"skeptical-ops-lead"},"definition":{"$ref":"#/components/schemas/DigitalHumanDefinition"}},"required":["name","definition"],"additionalProperties":false},"UpdateDigitalHumanBody":{"type":"object","properties":{"agentId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9][a-z0-9-]*$"},"definition":{"$ref":"#/components/schemas/DigitalHumanDefinition"}},"additionalProperties":false},"DeleteDigitalHumanResponse":{"type":"object","properties":{"digitalHuman":{"$ref":"#/components/schemas/DigitalHumanLibraryEntry"}},"required":["digitalHuman"]},"SimulationRunResponse":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/SimulationRun"}},"required":["run"]},"SimulationRun":{"type":"object","properties":{"id":{"type":"string","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"orgId":{"type":"number"},"agentId":{"type":"number"},"status":{"$ref":"#/components/schemas/SimulationRunStatus"},"digitalHumans":{"type":"array","items":{"$ref":"#/components/schemas/SimulationRunDigitalHumanSnapshot"}},"repeatOverride":{"type":"number","nullable":true},"agentBlobSha":{"type":"string","nullable":true},"artifactsPath":{"type":"string","nullable":true},"suiteReport":{"type":"object","nullable":true,"additionalProperties":true},"progress":{"$ref":"#/components/schemas/SimulationRunProgress"},"errorMessage":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","orgId","agentId","status","digitalHumans","repeatOverride","agentBlobSha","artifactsPath","suiteReport","progress","errorMessage","createdAt","updatedAt"]},"SimulationRunStatus":{"type":"string","enum":["pending","running","complete","failed","canceled"]},"SimulationRunDigitalHumanSnapshot":{"type":"object","properties":{"digitalHumanId":{"type":"number","nullable":true},"publicId":{"type":"string"},"name":{"type":"string"},"definition":{"$ref":"#/components/schemas/DigitalHumanDefinition"}},"required":["digitalHumanId","publicId","name","definition"]},"SimulationRunProgress":{"type":"object","nullable":true,"properties":{"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["total","completed","failed"],"additionalProperties":false},"CreateSimulationRunBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"digitalHumanPublicIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":50},"repeatOverride":{"type":"integer","minimum":1,"maximum":20},"env":{"type":"string","minLength":1,"maxLength":64},"region":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,15}$"}},"required":["agentId","digitalHumanPublicIds"],"additionalProperties":false},"CreateCallReplayRunBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"sessionId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["sessionId"],"additionalProperties":false},"SimulationRunListResponse":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/SimulationRun"}}},"required":["runs"]},"SimulationRunSessionsResponse":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/SimulationRunSession"}}},"required":["sessions"]},"SimulationRunSession":{"type":"object","properties":{"sessionId":{"type":"number","example":123,"description":"journey_sessions.id — the Calls page identifier"},"correlationId":{"type":"string"},"digitalHumanId":{"type":"string","nullable":true,"description":"Digital-human slug parsed from the correlation id"},"runIndex":{"type":"integer","nullable":true,"minimum":1,"description":"1-based repeat index parsed from the correlation id"},"startedAt":{"type":"string"},"endedAt":{"type":"string","nullable":true},"live":{"type":"boolean","description":"true while the session has neither reported an end nor been operationally closed"}},"required":["sessionId","correlationId","digitalHumanId","runIndex","startedAt","endedAt","live"]},"BrainSimulationResultBody":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"status":{"type":"string","enum":["succeeded","failed"]},"error":{"type":"string"},"suiteReport":{"type":"object","additionalProperties":true},"artifactsUri":{"type":"string"},"reportUri":{"type":"string"}},"required":["runId","status"]},"CreateAgentBuildResponse":{"type":"object","properties":{"buildId":{"type":"string"},"status":{"$ref":"#/components/schemas/AgentBuildStatus"},"reused":{"type":"boolean"}},"required":["buildId","status","reused"]},"AgentBuildStatus":{"type":"string","enum":["queued","running","built","needs_review","approved","rejected","failed","stalled"]},"CreateAgentBuildBody":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253},"websiteUrl":{"type":"string","maxLength":2048,"format":"uri"},"company":{"type":"string","minLength":1,"maxLength":80},"instructions":{"type":"string","minLength":1,"maxLength":2000},"email":{"type":"string","maxLength":320,"format":"email"},"answers":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":500},"answer":{"type":"string","maxLength":4000}},"required":["question","answer"]},"maxItems":50,"default":[]},"transcriptRef":{"type":"string","maxLength":2048},"depth":{"type":"string","enum":["simple","medium"],"default":"simple"},"kind":{"type":"string","enum":["media","live"],"default":"media"},"priority":{"type":"string","enum":["visitor","pregen"],"default":"visitor"},"login":{"type":"object","properties":{"username":{"type":"string","minLength":1,"maxLength":320},"password":{"type":"string","minLength":1,"maxLength":1024},"url":{"type":"string","maxLength":2048,"format":"uri","description":"A page only a signed-in user sees, such as the app's home; signed out, it leads to the sign-in"}},"required":["username","password","url"]},"captureSignIn":{"type":"boolean"},"callbackUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["domain","websiteUrl"]},"ListAgentBuildsResponse":{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/AgentBuild"}},"nextCursor":{"type":"string","nullable":true,"description":"Cursor for the next page, or null on the last page."}},"required":["builds","nextCursor"]},"AgentBuild":{"type":"object","properties":{"buildId":{"type":"string"},"status":{"$ref":"#/components/schemas/AgentBuildStatus"},"stage":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"stage":{"type":"string"},"status":{"type":"string","enum":["running","done"]},"startedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true},"minutes":{"type":"number","nullable":true}},"required":["name","stage","status","startedAt","endedAt","minutes"]}},"jobs":{"type":"object","additionalProperties":{"type":"string","enum":["done","failed"]}},"domain":{"type":"string"},"websiteUrl":{"type":"string"},"company":{"type":"string"},"instructions":{"type":"string","nullable":true},"hasLogin":{"type":"boolean","description":"Whether the build was given a demo login"},"captureSignIn":{"type":"boolean","description":"Whether a person signs in on the build's browser profile, in the build org"},"profileId":{"type":"string","nullable":true,"description":"The browser profile (acc_…) made in the build org for the sign-in, once made"},"depth":{"type":"string","enum":["simple","medium"]},"kind":{"type":"string","enum":["media","live"]},"priority":{"type":"string","enum":["visitor","pregen"]},"jobId":{"type":"string","nullable":true},"ownerOrgId":{"type":"string","nullable":true,"description":"The org that owns the build and its job: pass it as `orgId` to `GET /jobs/{id}`"},"orgId":{"type":"string","nullable":true,"description":"The build org's public id, once the job has made it"},"researchOrgId":{"type":"string","nullable":true},"agentId":{"type":"string","nullable":true},"callUrl":{"type":"string","nullable":true},"grade":{"type":"string","nullable":true},"result":{"type":"object","nullable":true,"additionalProperties":true,"description":"The builder's RESULT.json, as `/finish` posted it"},"score":{"nullable":true},"cost":{"type":"object","nullable":true,"properties":{"usd":{"type":"number","nullable":true},"turns":{"type":"number","nullable":true},"durationMs":{"type":"number","nullable":true}},"required":["usd","turns","durationMs"]},"elapsedS":{"type":"number","nullable":true},"error":{"type":"string","nullable":true},"reviewUrl":{"type":"string","nullable":true,"description":"The build's live, read-only studio: only while the build runs, and null when the builder has not reported one"},"brainUrl":{"type":"string","nullable":true},"reviewedBy":{"type":"string","nullable":true},"reviewedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"startedAt":{"type":"string","nullable":true},"lastProgressAt":{"type":"string","nullable":true},"finishedAt":{"type":"string","nullable":true}},"required":["buildId","status","stage","steps","jobs","domain","websiteUrl","company","instructions","hasLogin","captureSignIn","profileId","depth","kind","priority","jobId","ownerOrgId","orgId","researchOrgId","agentId","callUrl","grade","result","cost","elapsedS","error","reviewUrl","brainUrl","reviewedBy","reviewedAt","createdAt","startedAt","lastProgressAt","finishedAt"]},"ReviewAgentBuildBody":{"type":"object","properties":{"note":{"type":"string","maxLength":2000}}},"AgentBuildCallbackResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"kept":{"type":"number"}},"required":["ok"]},"AgentBuildProgressBody":{"type":"object","properties":{"build_id":{"type":"string"},"from":{"type":"integer","minimum":0},"to":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"nullable":true},"maxItems":5000},"jobs":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"elapsed_s":{"type":"number","minimum":0},"review_url":{"type":"string","maxLength":2048}},"required":["build_id","from","to","rows"]},"AgentBuildFinishBody":{"type":"object","properties":{"build_id":{"type":"string"},"result":{"type":"object","properties":{"build_id":{"type":"string"},"status":{"type":"string"},"agent_public_id":{"type":"string","nullable":true},"call_url":{"type":"string","nullable":true},"grade":{"type":"string","nullable":true},"minutes":{"type":"number","nullable":true},"error":{"type":"string","nullable":true}},"required":["status"],"additionalProperties":true},"cost":{"type":"object","nullable":true,"properties":{"total_cost_usd":{"type":"number","nullable":true},"num_turns":{"type":"number","nullable":true},"duration_ms":{"type":"number","nullable":true}},"additionalProperties":true},"score":{"nullable":true},"wiki_dispatch":{"type":"string","nullable":true},"outputs_failed":{"type":"array","items":{"type":"string"}}},"required":["build_id","result"]},"SanityRuntimeSelection":{"type":"object","properties":{"revision":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"source":{"type":"string","enum":["explicit","agent_pin","link_pin","latest"]},"environment":{"type":"string"}},"required":["revision","source"]},"CreateSanityRun":{"type":"object","properties":{"persona":{"type":"object","additionalProperties":true},"frozenBundle":{"type":"object","properties":{"content":{"type":"string","maxLength":2000000},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["content","sha256"],"additionalProperties":false},"runtimeRevision":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"inputProvenance":{"type":"object","additionalProperties":true},"replay":{"type":"object","properties":{"content":{"type":"string","maxLength":2000000},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["content","sha256"],"additionalProperties":false},"policy":{"type":"object","additionalProperties":true},"learnerPolicy":{"type":"object","additionalProperties":true},"delivery":{"type":"string","enum":["accelerated","speech"],"default":"accelerated"},"plannerTier":{"type":"string","enum":["standard","fast","inherit"],"default":"standard"},"preparation":{"type":"string","enum":["none","figma"],"default":"none"},"maxSeconds":{"type":"integer","minimum":60,"maximum":3600,"default":3600},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"expectedEmail":{"type":"string","format":"email"}},"required":["persona","policy","agentId"],"additionalProperties":false},"SanityLiveEvidence":{"type":"object","properties":{"cursor":{"type":"integer","minimum":0,"maximum":100000},"state":{"type":"object","nullable":true,"additionalProperties":true},"chunks":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"integer","minimum":1,"maximum":100000},"url":{"type":"string"}},"required":["cursor","url"]}},"screenshotUrl":{"type":"string"}},"required":["cursor","state","chunks"]},"SkillListResponse":{"type":"object","properties":{"skills":{"type":"array","items":{"$ref":"#/components/schemas/Skill"}}},"required":["skills"]},"Skill":{"type":"object","properties":{"publicId":{"type":"string","example":"skl_AbCdEf1234567890XYZ12"},"orgId":{"type":"number","example":1},"createdByUserId":{"type":"number","nullable":true,"example":42},"createdByEmail":{"type":"string","nullable":true,"example":"alice@notion.so"},"createdByName":{"type":"string","nullable":true,"example":"Alice Chen"},"type":{"type":"string","enum":["browser"],"example":"browser"},"name":{"type":"string","example":"Create a new page"},"description":{"type":"string","nullable":true,"example":"Adds a fresh page to the private workspace."},"recordingSessionId":{"type":"number","nullable":true,"example":17},"recordingSessionPublicId":{"type":"string","nullable":true,"example":"rec_AbCdEf1234567890XYZ12","description":"Public ID of the recording session this skill was captured from. Use this with /recording/sessions/:publicId/observations for replay."},"observationCount":{"type":"integer","minimum":0,"example":8,"description":"Number of observations captured in the skill's recording session (0 if no session)."},"status":{"type":"string","enum":["pending","verified","invalidated","failed"],"example":"pending"},"statusReason":{"type":"string","nullable":true,"example":null},"createdAt":{"type":"string","example":"2026-05-25T00:00:00Z"},"updatedAt":{"type":"string","example":"2026-05-25T00:00:00Z"},"deletedAt":{"type":"string","nullable":true,"example":null}},"required":["publicId","orgId","createdByUserId","createdByEmail","createdByName","type","name","description","recordingSessionId","recordingSessionPublicId","observationCount","status","statusReason","createdAt","updatedAt","deletedAt"]},"SkillResponse":{"type":"object","properties":{"skill":{"$ref":"#/components/schemas/Skill"}},"required":["skill"]},"CreateSkillBody":{"type":"object","properties":{"orgId":{"type":"number"},"type":{"type":"string","enum":["browser"],"example":"browser","description":"Skill runtime. Defaults to 'browser'. Only 'browser' is supported today."},"name":{"type":"string","minLength":1,"maxLength":128,"example":"Create a new page"},"description":{"type":"string","maxLength":2048,"example":"Adds a fresh page to the private workspace."},"recordingSessionPublicId":{"type":"string","example":"rec_AbCdEf1234567890XYZ12","description":"If provided, the new skill is bound to this recording session."}},"required":["name"],"additionalProperties":false},"UpdateSkillBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","nullable":true,"maxLength":2048}},"additionalProperties":false},"SkillGenerationInputsResponse":{"type":"object","properties":{"meta":{"type":"object","properties":{"name":{"type":"string","example":"Create a new page"},"description":{"type":"string","example":"Adds a fresh page to the private workspace."},"initialUrl":{"type":"string","example":"https://www.notion.so/"}},"required":["name","description","initialUrl"]},"observations":{"type":"array","items":{"type":"object","properties":{"observationId":{"type":"string","example":"obs_AbCdEf1234567890XYZ12"},"timestamp":{"type":"integer","example":1716595200000},"action":{"type":"object","additionalProperties":true},"a11yBefore":{"type":"object","nullable":true,"additionalProperties":true},"a11yAfter":{"type":"object","nullable":true,"additionalProperties":true}},"required":["observationId","timestamp","action","a11yBefore","a11yAfter"]}}},"required":["meta","observations"]},"GetSkillDocumentResponse":{"type":"object","properties":{"exists":{"type":"boolean","example":true,"description":"False when no SKILL.md has been generated/stored for this skill yet."},"markdown":{"type":"string","nullable":true,"example":"---\nname: notion-create-page\n---\n\n# Notion — Create a page\n","description":"The stored SKILL.md text, or null when `exists` is false."}},"required":["exists","markdown"]},"StoreSkillDocumentResponse":{"type":"object","properties":{"path":{"type":"string","example":"org_abc/skills/skl_def/SKILL.md","description":"GCS path the document lives at in SKILLS_GCS_BUCKET."}},"required":["path"]},"StoreSkillDocumentBody":{"type":"object","properties":{"markdown":{"type":"string","minLength":1,"description":"The full SKILL.md text emitted by the generator.","example":"---\nname: notion-create-page\n---\n\n# Notion — Create a page\n"}},"required":["markdown"],"additionalProperties":false},"MarkSkillFailedBody":{"type":"object","properties":{"reason":{"type":"string","maxLength":2048,"description":"Human-readable error message to record as statusReason.","example":"LLM quota exceeded"}},"additionalProperties":false},"SlackChannelListResponse":{"type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel"}},"truncated":{"type":"boolean","description":"True when the workspace has more channels than one listing pass can return."}},"required":["channels","truncated"]},"SlackChannel":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"isPrivate":{"type":"boolean"},"isMember":{"type":"boolean"}},"required":["id","name","isPrivate","isMember"]},"SlackMemberListResponse":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/SlackMember"}},"truncated":{"type":"boolean"}},"required":["members","truncated"]},"SlackMember":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"realName":{"type":"string","nullable":true}},"required":["id","name","realName"]},"DisconnectSlackAgentInstallationResponse":{"type":"object","properties":{"disconnected":{"type":"boolean","enum":[true]},"slackAccessRevoked":{"type":"boolean","description":"False when Slack-side revocation could not be confirmed. The install still ended here, and the app can be removed from the workspace in Slack."}},"required":["disconnected","slackAccessRevoked"]},"SlackAgentInstallationListResponse":{"type":"object","properties":{"installations":{"type":"array","items":{"$ref":"#/components/schemas/SlackAgentInstallation"}}},"required":["installations"]},"SlackAgentInstallation":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","name"]},"status":{"type":"string","enum":["active","reauthorization_required","revoked"]},"installedAt":{"type":"string","format":"date-time"}},"required":["team","status","installedAt"]},"SlackOAuthStartResponse":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"}},"required":["authorizationUrl"]},"StartSlackAgentInstallBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"additionalProperties":false},"SlackAgentInstallCompleteResponse":{"type":"object","properties":{"installation":{"$ref":"#/components/schemas/SlackAgentInstallation"}},"required":["installation"]},"CompleteSlackOAuthBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"code":{"type":"string","minLength":1,"maxLength":2000},"state":{"type":"string","minLength":1,"maxLength":2000}},"required":["code","state"],"additionalProperties":false},"SlackAgentLinkPreviewResponse":{"type":"object","properties":{"link":{"type":"object","properties":{"slackTeamId":{"type":"string","minLength":1},"slackTeamName":{"type":"string","nullable":true},"slackUserId":{"type":"string","minLength":1},"slackUserName":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time"},"isWorkspaceInYourOrg":{"type":"boolean"}},"required":["slackTeamId","slackTeamName","slackUserId","expiresAt","isWorkspaceInYourOrg"]}},"required":["link"]},"CompleteSlackAgentLinkBody":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":2000}},"required":["state"],"additionalProperties":false},"SlackAgentLinkCompleteResponse":{"type":"object","properties":{"link":{"type":"object","properties":{"slackTeamId":{"type":"string","minLength":1},"slackUserId":{"type":"string","minLength":1},"linkedAt":{"type":"string","format":"date-time"}},"required":["slackTeamId","slackUserId","linkedAt"]}},"required":["link"]},"SlackAgentTurnCredentials":{"anyOf":[{"$ref":"#/components/schemas/SlackAgentLinkedTurnCredentials"},{"$ref":"#/components/schemas/SlackAgentUnlinkedTurnCredentials"}]},"SlackAgentLinkedTurnCredentials":{"type":"object","properties":{"linked":{"type":"boolean","enum":[true]},"memberJwt":{"type":"string","minLength":1},"memberJwtExpiresAt":{"type":"string","format":"date-time"},"memberUserId":{"type":"string","minLength":1},"botToken":{"type":"string","minLength":1},"memberOrgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"botUserId":{"type":"string","maxLength":32,"pattern":"^[A-Z0-9]+$"},"channelOrgs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"exclusiveMinimum":true},"publicId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","publicId","name"]},"minItems":1,"maxItems":1000},"repConversation":{"type":"boolean"}},"required":["linked","memberJwt","memberJwtExpiresAt","memberUserId","botToken"]},"SlackAgentUnlinkedTurnCredentials":{"type":"object","properties":{"linked":{"type":"boolean","enum":[false]},"botToken":{"type":"string","minLength":1},"botUserId":{"type":"string","maxLength":32,"pattern":"^[A-Z0-9]+$"},"connectUrl":{"type":"string","format":"uri"}},"required":["linked","botToken","connectUrl"]},"SlackAgentTurnCredentialsBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"slackTeamId":{"type":"string","maxLength":32,"pattern":"^[A-Z0-9]+$"},"slackUserId":{"type":"string","maxLength":32,"pattern":"^[A-Z0-9]+$"},"slackChannelId":{"type":"string","maxLength":32,"pattern":"^[A-Z0-9]+$"},"supportsRepConversations":{"type":"boolean","enum":[true]}},"required":["orgId","slackTeamId","slackUserId"],"additionalProperties":false},"StartSlackOAuthBody":{"type":"object","properties":{"returnPath":{"type":"string","maxLength":500},"agentPublicId":{"type":"string","minLength":1,"maxLength":200},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["returnPath"]},"SlackOAuthCompleteResponse":{"type":"object","properties":{"installation":{"$ref":"#/components/schemas/SlackInstallation"},"returnPath":{"type":"string"},"agentPublicId":{"type":"string","nullable":true}},"required":["installation","returnPath","agentPublicId"]},"SlackInstallation":{"type":"object","properties":{"id":{"type":"string","minLength":1},"team":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","name"]},"enterprise":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","name"]},"status":{"type":"string","enum":["active","reauthorization_required","revoked"]},"grantedScopes":{"type":"array","items":{"type":"string","minLength":1}},"installedAt":{"type":"string","format":"date-time"},"lastRefreshedAt":{"type":"string","nullable":true,"format":"date-time"},"lastVerifiedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","team","enterprise","status","grantedScopes","installedAt","lastRefreshedAt","lastVerifiedAt","revokedAt","createdAt","updatedAt"]},"SlackInstallationListResponse":{"type":"object","properties":{"installations":{"type":"array","items":{"$ref":"#/components/schemas/SlackInstallation"}}},"required":["installations"]},"ReconnectSlackInstallationBody":{"type":"object","properties":{"returnPath":{"type":"string","maxLength":500},"agentPublicId":{"type":"string","minLength":1,"maxLength":200},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["returnPath"]},"DisconnectSlackInstallationResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"TelemetryBatchResponse":{"type":"object","properties":{"accepted":{"type":"integer","minimum":0},"deduped":{"type":"integer","minimum":0}},"required":["accepted","deduped"]},"TelemetryBatchBody":{"type":"object","properties":{"session_id":{"type":"string","minLength":1,"maxLength":128},"events":{"type":"array","items":{"$ref":"#/components/schemas/ClientEventEnvelope"},"minItems":1,"maxItems":500}},"required":["session_id","events"]},"ClientEventEnvelope":{"type":"object","properties":{"client_event_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","minLength":1,"maxLength":128},"schema_version":{"type":"number","enum":[1]},"source":{"type":"string","enum":["client","agent"]},"type":{"type":"string","enum":["ui_screen_entered","ui_stage_mode_changed","ui_chat_panel_toggled","ui_visibility_changed","ui_focus_changed","ui_microphone_toggled","ui_branding_applied","media_video_play_started","media_video_paused","media_video_resumed","media_video_seeked","media_video_heartbeat","media_video_ended","media_video_hidden","media_video_error","media_image_shown","media_image_hidden","agent_set_stage_mode","rpc_path_wedged","rpc_path_heal_attempted","rpc_path_healed","rpc_path_heal_failed","rpc_path_restart","rpc_path_meet_fallback_shown","connection_warning","link_path","mic_blocked_at_start","mic_capture","nickel_stream_stalled","browser_stream_lost","browser_stream_restored"]},"timestamp":{"type":"string","format":"date-time"},"monotonic_ms":{"type":"number","minimum":0},"data":{"type":"object","additionalProperties":true}},"required":["client_event_id","session_id","schema_version","source","type","timestamp","monotonic_ms","data"]},"CallCustomerDomainsResponse":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","example":"adobe.com"},"sessions":{"type":"integer"}},"required":["domain","sessions"]},"description":"Selectable domains for the Calls filter, busiest first. Built from the SAME scope as the call list — including the Source tab — so it never offers a domain the list has none of, and never hides one sitting in the table. Reflects every active filter except `customerDomains` itself."}},"required":["domains"]},"TranscriptSessionRow":{"type":"object","properties":{"id":{"type":"number"},"externalSessionId":{"type":"string","nullable":true},"agentName":{"type":"string"},"startedAt":{"type":"string"},"connectedAt":{"type":"string","nullable":true},"closedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true},"durationSeconds":{"type":"integer","nullable":true,"minimum":0},"endedBy":{"$ref":"#/components/schemas/SessionEndActor"},"completed":{"type":"boolean"},"messageCount":{"type":"number"},"hasUserMessages":{"type":"boolean"},"participantName":{"type":"string","nullable":true},"participantEmail":{"type":"string","nullable":true},"participantCompany":{"type":"string","nullable":true},"externalUserId":{"type":"string","nullable":true},"evalScore":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true},"linkRef":{"type":"string","nullable":true,"example":"lnk_x8k2p1_spring-launch","description":"Deployment-link ref the caller connected through; null for canonical-address calls."},"linkLabel":{"type":"string","nullable":true,"example":"Spring campaign","description":"The link's current private label, resolved at read time; null when the link has none."},"placement":{"type":"object","nullable":true,"properties":{"region":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"euw2","description":"Cell (cluster) id the call ran in."},"cloudRegion":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"europe-west2","description":"Cloud region of that cell."},"chosenBy":{"type":"string","enum":["explicit","automatic","default"],"description":"What placed the call there: the caller's `?region=`; sable-api, from the caller's nickel region or in place of a cell that is not serving; or the cell the worker already served from."}},"required":["region","cloudRegion","chosenBy"],"description":"The cell the call ran in; null when connection-details did not place it."},"joinMethod":{"type":"string","nullable":true,"enum":["web","zoom","google_meet",null],"example":"google_meet","description":"How the participant joined: in the browser, or through a Zoom or Google Meet meeting. Null when not recorded."},"isSableWebsite":{"type":"boolean","description":"True for this organization's Sable website deployment."},"billing":{"type":"object","properties":{"status":{"type":"string","enum":["billable","not_billable","pending"]},"reason":{"type":"string","nullable":true,"enum":["internal","sable_team","empty",null]}},"required":["status","reason"],"description":"Present only when the effective viewer can access billing classification."},"lifecycle":{"type":"object","properties":{"connectedAtSource":{"type":"string","nullable":true,"enum":["runtime_snapshot","legacy_browser","legacy_messages",null]},"lastSeenAt":{"type":"string","nullable":true},"endedAtSource":{"type":"string","nullable":true,"enum":["runtime_snapshot","artifact_session",null]},"closureReason":{"type":"string","nullable":true},"checkedAt":{"type":"string","nullable":true},"attempts":{"type":"integer","minimum":0}},"required":["connectedAtSource","lastSeenAt","endedAtSource","closureReason","checkedAt","attempts"],"description":"Sable-admin-only lifecycle evidence. No derived lifecycle state is persisted."},"caller":{"$ref":"#/components/schemas/StoredCaller"},"callPath":{"$ref":"#/components/schemas/StoredCallPath"}},"required":["id","externalSessionId","agentName","startedAt","connectedAt","closedAt","endedAt","durationSeconds","endedBy","completed","messageCount","hasUserMessages","participantName","participantEmail","participantCompany","externalUserId","evalScore","correlationId","linkRef","linkLabel","placement","joinMethod"]},"SessionEndActor":{"type":"string","nullable":true,"enum":["user","admin","agent",null]},"StoredCallPath":{"type":"object","nullable":true,"properties":{"path":{"type":"string","enum":["production","test"]},"reason":{"type":"string","nullable":true,"enum":["agent_not_live","config_override","runtime_override",null]}},"required":["path","reason"],"description":"Sable-admin-only. Which path the call ran with as sable-api decided it: `production`, or `test` with the reason; null for a call from before the path was stored or one that never reached the decision."},"TranscriptSessionDetail":{"type":"object","properties":{"id":{"type":"number"},"externalSessionId":{"type":"string","nullable":true},"agentName":{"type":"string"},"livekitRoomName":{"type":"string","nullable":true},"startedAt":{"type":"string"},"connectedAt":{"type":"string","nullable":true},"closedAt":{"type":"string","nullable":true},"endedAt":{"type":"string","nullable":true},"durationSeconds":{"type":"integer","nullable":true,"minimum":0},"endedBy":{"$ref":"#/components/schemas/SessionEndActor"},"completed":{"type":"boolean"},"participantName":{"type":"string","nullable":true},"participantEmail":{"type":"string","nullable":true},"callerBlocked":{"type":"boolean","description":"This caller's own browser id or email is blocked."},"callerBlockedOrgWide":{"type":"boolean","description":"The caller's block covers every agent in the org, not only this call's agent."},"emailDomain":{"type":"string","nullable":true,"description":"The caller's company email domain, which a domain block covers. Null for none or free mail."},"emailDomainBlocked":{"type":"boolean","description":"A block on the caller's company email domain is active."},"emailDomainBlockedOrgWide":{"type":"boolean","description":"The domain block covers every agent in the org, not only this call's agent."},"clientIpKnown":{"type":"boolean","description":"The call kept a hash of the caller's IP, which an IP block covers."},"ipBlocked":{"type":"boolean","description":"A block on the caller's IP is active."},"ipBlockedOrgWide":{"type":"boolean","description":"The IP block covers every agent in the org, not only this call's agent."},"externalUserId":{"type":"string","nullable":true},"evalScore":{"type":"string","nullable":true},"evalStatus":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"topics":{"type":"array","nullable":true,"items":{"type":"string"},"example":["pricing","SSO setup"],"description":"Short phrases for what the participant explored; null when no topics were recorded, which does not mean the call has no summary."},"extraction":{"$ref":"#/components/schemas/SessionExtraction"},"formAnswers":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"]},"example":[{"label":"Company website","value":"acme.com"},{"label":"Job title","value":"Head of Sales"}],"description":"What the visitor typed into the pre-call form's company website and custom text fields, from the call's metadata; empty when the form asked none."},"linkRef":{"type":"string","nullable":true,"example":"lnk_x8k2p1_spring-launch","description":"Deployment-link ref the caller connected through; null for canonical-address calls."},"linkLabel":{"type":"string","nullable":true,"example":"Spring campaign","description":"The link's current private label, resolved at read time; null when the link has none."},"placement":{"type":"object","nullable":true,"properties":{"region":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"euw2","description":"Cell (cluster) id the call ran in."},"cloudRegion":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"europe-west2","description":"Cloud region of that cell."},"chosenBy":{"type":"string","enum":["explicit","automatic","default"],"description":"What placed the call there: the caller's `?region=`; sable-api, from the caller's nickel region or in place of a cell that is not serving; or the cell the worker already served from."}},"required":["region","cloudRegion","chosenBy"],"description":"The cell the call ran in; null when connection-details did not place it."},"joinMethod":{"type":"string","nullable":true,"enum":["web","zoom","google_meet",null],"example":"google_meet","description":"How the participant joined: in the browser, or through a Zoom or Google Meet meeting. Null when not recorded."},"billing":{"type":"object","properties":{"status":{"type":"string","enum":["billable","not_billable","pending"]},"reason":{"type":"string","nullable":true,"enum":["internal","sable_team","empty",null]}},"required":["status","reason"],"description":"Present only when the effective viewer can access billing classification."},"lifecycle":{"type":"object","properties":{"connectedAtSource":{"type":"string","nullable":true,"enum":["runtime_snapshot","legacy_browser","legacy_messages",null]},"lastSeenAt":{"type":"string","nullable":true},"endedAtSource":{"type":"string","nullable":true,"enum":["runtime_snapshot","artifact_session",null]},"closureReason":{"type":"string","nullable":true},"checkedAt":{"type":"string","nullable":true},"attempts":{"type":"integer","minimum":0}},"required":["connectedAtSource","lastSeenAt","endedAtSource","closureReason","checkedAt","attempts"],"description":"Sable-admin-only lifecycle evidence. No derived lifecycle state is persisted."},"caller":{"$ref":"#/components/schemas/StoredCaller"},"callPath":{"$ref":"#/components/schemas/StoredCallPath"},"emailVerification":{"allOf":[{"$ref":"#/components/schemas/EmailVerification"},{"description":"Sable admins only. Set when the email on the call is verified; verifiedBy names the teammate who verified it by hand."}]},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"segmentId":{"type":"string","nullable":true,"description":"Sable-admin-only caption identity for recorded diagnostics."},"role":{"type":"string"},"content":{"type":"string","nullable":true},"createdAt":{"type":"string"},"momentName":{"type":"string","nullable":true}},"required":["id","role","content","createdAt","momentName"]}}},"required":["id","externalSessionId","agentName","livekitRoomName","startedAt","connectedAt","closedAt","endedAt","durationSeconds","endedBy","completed","participantName","participantEmail","callerBlocked","callerBlockedOrgWide","emailDomain","emailDomainBlocked","emailDomainBlockedOrgWide","clientIpKnown","ipBlocked","ipBlockedOrgWide","externalUserId","evalScore","evalStatus","correlationId","summary","topics","extraction","formAnswers","linkRef","linkLabel","placement","joinMethod","messages"]},"SessionExtraction":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["pending","complete","failed","skipped"],"example":"complete"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/SessionExtractionField"}}},"required":["status","fields"],"description":"Structured extraction for this call; null when the session was never analyzed."},"SessionExtractionField":{"type":"object","properties":{"key":{"type":"string","example":"team_size"},"label":{"type":"string","example":"Team size"},"type":{"type":"string","enum":["text","number","boolean","date","select"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}],"example":45},"evidence":{"type":"string","nullable":true,"example":"We're about 45 people across product and engineering.","description":"Verbatim transcript quote backing the value; null when nothing was said."},"rejected":{"type":"object","properties":{"reason":{"type":"string"},"raw":{"type":"string"}},"required":["reason","raw"],"description":"Present ONLY when the value could not be converted or grounded in the transcript. `raw` is what the model actually quoted, so an operator can see why it was refused."}},"required":["key","label","type","value","evidence"]},"CreateTranscriptSessionBody":{"type":"object","properties":{"callId":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","description":"Canonical call UUID returned by connection-details. Optional only for legacy clients during rollout."},"externalSessionId":{"type":"string","minLength":1,"example":"sess_abc123"},"agentName":{"type":"string","minLength":1,"example":"decagon-demo"},"agentPublicId":{"type":"string","minLength":1,"example":"ag_abc123"},"accountPublicId":{"type":"string","minLength":1,"example":"acc_01961f2a-b3c4-7d5e-8f6a-9b0c1d","description":"Validated account selected by connection-details. Invalid, cross-organization, or unbound values are ignored so session creation remains best-effort."},"livekitRoomName":{"type":"string","minLength":1,"example":"room-a1b2c3d4","description":"LiveKit room name for this live session, used to map a transcript to a joinable room."},"livekitUrl":{"type":"string","example":"wss://livekit.withsable.dev","description":"LiveKit server the browser connected to. This route is service-token gated but browser-originated, so the value is never persisted as-is: it is resolved server-side to a closed-set cluster id at write time, and a malformed or unrecognised value is silently discarded (stored as null) rather than rejected — a bad value must never fail session creation for a live call."},"configId":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"participantEmail":{"type":"string","format":"email","example":"user@example.com"},"participantName":{"type":"string","example":"John Doe"},"participantCompany":{"type":"string","example":"Acme Corp"},"participantExternalUserId":{"type":"string","minLength":1,"maxLength":255,"example":"customer_user_123"},"correlationId":{"type":"string","minLength":1,"maxLength":255,"example":"sim:75969d79-0c54-4a7b-9987-b038e35b4f9b:testing-persona:r1:1e4dead73e8a05f7","description":"Opaque correlation tag marking automated sessions (UUID for AI-employee runs, sim:… for simulation runs)."},"clientAccessToken":{"type":"string","minLength":32,"maxLength":256,"example":"U4YwY-Dx6vA2qUQ33KcE9TqdnQpJx8JwW6MKhQ5g9zc","description":"High-entropy browser capability for this session. The API stores only its hash and requires the same value for protected teardown and certificate status calls."},"linkRef":{"type":"string","minLength":1,"example":"lnk_x8k2p1_spring-launch","description":"The deployment-link address the caller connected through, when agentPublicId carries the canonical id. Recorded for per-link call attribution; ignored unless it is a valid link in the deployment's org."},"joinMethod":{"type":"string","enum":["web","zoom","google_meet"],"example":"google_meet","description":"How the session joined: `web` for a visitor in the browser, or the meeting platform a Sable meeting bot joined through. Absent is recorded as `web`."},"meetingBotId":{"type":"string","example":"mb_01961f2a","description":"The meeting bot that joined the session. Recorded only with a meeting `joinMethod`; any value that is not a meeting bot id is ignored."},"meetingBotKey":{"type":"string","maxLength":256,"description":"The key the meeting bot's own call page carries. Required, with `meetingBotId`, for the session to take the details the visitor who sent the bot gave; a wrong key leaves them off."},"browserId":{"type":"string","example":"3f2b9c1e-8a4d-4c6b-9e2f-1a2b3c4d5e6f","description":"The caller's sable_bid cookie, attached server-side by parley's proxy. Lets a returning browser be resolved to its participant on the next connect. Must be a UUID; any other value is ignored."},"personalization":{"$ref":"#/components/schemas/PersonalizationOutcome"},"placement":{"type":"object","properties":{"region":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"euw2","description":"Cell (cluster) id the call ran in."},"cloudRegion":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"europe-west2","description":"Cloud region of that cell."},"chosenBy":{"type":"string","enum":["explicit","automatic","default"],"description":"What placed the call there: the caller's `?region=`; sable-api, from the caller's nickel region or in place of a cell that is not serving; or the cell the worker already served from."}},"required":["region","cloudRegion","chosenBy"],"description":"The cell connection-details placed this call in, recorded by Sable rather than customer metadata."},"metadata":{"type":"object","additionalProperties":true,"example":{"customerId":"cust_123","ticketId":"T-456"},"description":"Free-form call-level metadata, echoed back under data.metadata in call.completed webhook events."},"clientContext":{"$ref":"#/components/schemas/ClientContext"},"staffTestCall":{"type":"boolean","enum":[true],"description":"Set by parley's proxy only after it verifies the browser holds a Sable staff platform session. The call is not billable and stays out of #prod-alerts."},"awaitingVisitorForm":{"type":"boolean","enum":[true],"description":"The call started behind its over-call form, which the visitor has not submitted yet. When the agent's config shows its login form over the call and the request names its `callId`, the call-started alert waits for the form (`POST /agents/{agentId}/calls/{callId}/visitor-form`) and names the visitor; a form never submitted never alerts. Otherwise, or while the alert store is unavailable, the alert goes out at creation as for any call."}},"required":["externalSessionId","agentName"]},"PersonalizationOutcome":{"type":"object","properties":{"source":{"type":"string","enum":["link","browser","none"]},"reason":{"type":"string","enum":["claimed","claimant_match","window_closed","claimed_by_other","no_arrival","no_context"]},"contextLinkRef":{"type":"string"}},"required":["source","reason"],"example":{"source":"link","reason":"claimed"},"description":"Claim-resolution outcome from connection-details, recorded by Sable rather than customer metadata."},"AddTranscriptMessageBody":{"type":"object","properties":{"sessionId":{"type":"number","example":123},"sender":{"type":"string","enum":["user","agent"],"example":"user"},"content":{"type":"string","minLength":1,"example":"Hello, how can I help?"},"timestamp":{"type":"string","format":"date-time","example":"2024-01-01T12:00:00Z"},"momentId":{"type":"integer","minimum":0,"maximum":10000,"example":7,"description":"Journey position of this message: the runtime's 0-based index into the published config's `instructions.moments`, so a reader resolves `moments[id]` and index 0 is the first moment. Not a `moments.id` primary key, and not the frozen display `seq`. Nothing enforces the value against the session's config, so a reader must bounds-check it. No reader consumes it yet. Preferred over `momentName`, which older name-transitioning agents send instead and which does not survive a moment being reworded. Bounded so an out-of-range value fails validation cleanly instead of overflowing the `integer` column; clients drop unusable positions rather than sending them, so a live transcript write never rides on this field being valid."},"momentName":{"type":"string","example":"setup_linear"},"idempotencyKey":{"type":"string","maxLength":255,"example":"seg_abc123","description":"Client-generated key to prevent duplicate message inserts on retry"}},"required":["sessionId","sender","content"]},"RecordJourneyTimelineBody":{"type":"object","properties":{"externalSessionId":{"type":"string","minLength":1,"maxLength":255,"example":"RM_c8RDBfhwZght","description":"The runtime's own session id, matched against `journey_sessions.external_session_id`. The runtime never learns the numeric session id, so this is the only key it can send."},"timeline":{"type":"array","items":{"$ref":"#/components/schemas/JourneyTimelineEntry"},"minItems":1,"maxItems":2000,"description":"Every moment the agent occupied, in chronological order, each with the instant it was entered. Authoritative: it comes from the agent's own record rather than the client's observation of it. `moment_id` on the session's messages is re-derived by locating each message's `created_at` in these windows, so a client that missed a live update is corrected."}},"required":["externalSessionId","timeline"]},"JourneyTimelineEntry":{"type":"object","properties":{"momentId":{"type":"integer","minimum":0,"maximum":10000,"example":3},"enteredAt":{"type":"string","format":"date-time","example":"2026-07-30T14:16:48.123456+00:00","description":"ISO-8601 instant. A UTC offset (`+00:00`) and a `Z` suffix are both accepted."},"label":{"type":"string","maxLength":200,"example":"Invite teammates","description":"The moment's display label, written to `session_messages.moment_name` — the field readers actually render. Correcting `moment_id` alone would leave a row whose number and name disagree. Omitted means leave the existing name as-is rather than clear it."}},"required":["momentId","enteredAt"]},"EndTranscriptSessionBody":{"type":"object","properties":{"sessionId":{"type":"number","example":123},"clientAccessToken":{"type":"string","minLength":32,"maxLength":256,"example":"U4YwY-Dx6vA2qUQ33KcE9TqdnQpJx8JwW6MKhQ5g9zc","description":"Required when the session was created with a browser capability token."},"endedBy":{"allOf":[{"$ref":"#/components/schemas/SessionEndActor"},{"example":"user","description":"Actor that initiated operational teardown. Omit when attribution is unknown."}]}},"required":["sessionId"]},"GetTranscriptCertificateStatusResponse":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["issued"]},"certificateRef":{"type":"string","minLength":1,"example":"b1QhSjKqL7mZ2nR4tV6xYw"}},"required":["status","certificateRef"]},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]}},"required":["status"]}]},"GetTranscriptCertificateStatusBody":{"type":"object","properties":{"sessionId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"clientAccessToken":{"type":"string","minLength":32,"maxLength":256,"example":"U4YwY-Dx6vA2qUQ33KcE9TqdnQpJx8JwW6MKhQ5g9zc","description":"Browser capability returned only to the participant that created this session."}},"required":["sessionId","clientAccessToken"]},"SubmitOutroFeedbackBody":{"type":"object","properties":{"sessionId":{"type":"number","example":123},"feedback":{"$ref":"#/components/schemas/OutroFeedback"}},"required":["sessionId","feedback"]},"RequestHelpBody":{"type":"object","properties":{"sessionId":{"type":"number","example":123},"reason":{"type":"string","maxLength":500,"example":"Browser won't load the dashboard","description":"Optional free-text reason supplied by the end-user."}},"required":["sessionId"]},"ReportSessionErrorBody":{"type":"object","properties":{"sessionId":{"type":"number","example":123,"description":"journey_sessions.id the error is reported against"},"source":{"type":"string","enum":["manual","auto"],"example":"manual"},"severity":{"type":"string","enum":["error","warning","info"],"example":"error"},"message":{"type":"string","minLength":1,"maxLength":5000,"example":"The video never loaded on step 3"},"reporterName":{"type":"string","maxLength":255,"example":"Jane Cooper"},"reporterEmail":{"type":"string","maxLength":320,"example":"jane@acme.com"},"context":{"$ref":"#/components/schemas/SessionErrorContext"}},"required":["sessionId","message"]},"SessionErrorContext":{"type":"object","properties":{"hyperdx_session_id":{"type":"string","maxLength":255},"session_url":{"type":"string","maxLength":2048},"room_sid":{"type":"string","maxLength":255},"room_name":{"type":"string","maxLength":255},"agent_public_id":{"type":"string","maxLength":255},"agent_name":{"type":"string","maxLength":255},"organization_name":{"type":"string","maxLength":255},"current_moment_id":{"type":"number"},"current_step_id":{"type":"number"},"openai_session_id":{"type":"string","maxLength":255},"client_timestamp":{"type":"number"},"user_agent":{"type":"string","maxLength":1024},"page_url":{"type":"string","maxLength":2048}}},"DatasetDescriptions":{"type":"object","properties":{"datasets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["sessions","participants","rubrics","scorecards","agents","questions","feedback","engagement_signals","moments"]},"description":{"type":"string"},"default_select":{"type":"array","items":{"type":"string"}},"required_permissions":{"type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","datetime","json"]},"format":{"type":"string","enum":["uuid"]},"description":{"type":"string"},"selectable":{"type":"boolean"},"filterable":{"type":"boolean"},"orderable":{"type":"boolean"},"groupable":{"type":"boolean"}},"required":["name","type","description","selectable","filterable","orderable","groupable"]}},"metrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["number"]},"description":{"type":"string"}},"required":["name","type","description"]}}},"required":["name","description","default_select","required_permissions","fields","metrics"]}}},"required":["datasets"]},"DatasetRows":{"oneOf":[{"$ref":"#/components/schemas/Dataset_sessions_Page"},{"$ref":"#/components/schemas/Dataset_participants_Page"},{"$ref":"#/components/schemas/Dataset_rubrics_Page"},{"$ref":"#/components/schemas/Dataset_agents_Page"},{"$ref":"#/components/schemas/Dataset_questions_Page"},{"$ref":"#/components/schemas/Dataset_feedback_Page"},{"$ref":"#/components/schemas/Dataset_engagement_signals_Page"},{"$ref":"#/components/schemas/Dataset_moments_Page"},{"$ref":"#/components/schemas/Dataset_scorecards_Page"}],"discriminator":{"propertyName":"dataset","mapping":{"sessions":"#/components/schemas/Dataset_sessions_Page","participants":"#/components/schemas/Dataset_participants_Page","rubrics":"#/components/schemas/Dataset_rubrics_Page","agents":"#/components/schemas/Dataset_agents_Page","questions":"#/components/schemas/Dataset_questions_Page","feedback":"#/components/schemas/Dataset_feedback_Page","engagement_signals":"#/components/schemas/Dataset_engagement_signals_Page","moments":"#/components/schemas/Dataset_moments_Page","scorecards":"#/components/schemas/Dataset_scorecards_Page"}}},"Dataset_sessions_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["sessions"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_sessions_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"AidanMcpPrivacy":{"type":"object","properties":{"transcripts_exposed":{"type":"boolean"}},"required":["transcripts_exposed"]},"DatasetFiltersApplied":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"asRole":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable staff only (403 otherwise): read as a customer with this role sees it, as on /calls. The role's permissions apply."},"source":{"type":"string","enum":["human","agent","all"]},"includeInternal":{"type":"boolean"},"includeSableTraffic":{"type":"boolean"}}},"AidanMcpFilter":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","minLength":1},"op":{"type":"string","enum":["eq","neq","contains","starts_with","ends_with","in","gt","gte","lt","lte","between","is_null","not_null"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},"maxItems":100},{"type":"string","nullable":true,"enum":[null]}]}},"required":["field","op"],"additionalProperties":false},{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/AidanMcpFilter"},"minItems":1}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/components/schemas/AidanMcpFilter"},"minItems":1}},"required":["or"],"additionalProperties":false},{"type":"object","properties":{"not":{"$ref":"#/components/schemas/AidanMcpFilter"}},"required":["not"],"additionalProperties":false}]},"Dataset_sessions_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"external_session_id":{"type":"string","nullable":true},"link_ref":{"type":"string","nullable":true},"agent_id":{"type":"number","nullable":true},"agent_slug":{"type":"string","nullable":true},"agent_environment":{"type":"string","nullable":true},"agent_deleted":{"type":"boolean","nullable":true},"agent_name":{"type":"string","nullable":true},"agent_display_name":{"type":"string","nullable":true},"started_at":{"type":"string","nullable":true},"duration_seconds":{"type":"number","nullable":true},"ended_at":{"type":"string","nullable":true},"rating_fraction":{"type":"number","nullable":true},"message_count":{"type":"number","nullable":true},"has_user_messages":{"type":"boolean","nullable":true},"final_moment":{"type":"string","nullable":true},"eval_score":{"type":"number","nullable":true},"correlation_id":{"type":"string","nullable":true},"room_name":{"type":"string","nullable":true},"link_label":{"type":"string","nullable":true},"join_method":{"type":"string","nullable":true},"ended_by":{"type":"string","nullable":true},"connected_at":{"type":"string","nullable":true,"format":"date-time"},"closed_at":{"type":"string","nullable":true,"format":"date-time"},"completed_effective":{"type":"boolean","nullable":true},"placement":{"type":"object","nullable":true,"properties":{"region":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"euw2","description":"Cell (cluster) id the call ran in."},"cloudRegion":{"type":"string","pattern":"^[a-z0-9-]{1,63}$","example":"europe-west2","description":"Cloud region of that cell."},"chosenBy":{"type":"string","enum":["explicit","automatic","default"],"description":"What placed the call there: the caller's `?region=`; sable-api, from the caller's nickel region or in place of a cell that is not serving; or the cell the worker already served from."}},"required":["region","cloudRegion","chosenBy"]},"verdict":{"type":"string","nullable":true},"nobody_joined":{"type":"boolean","nullable":true},"completed":{"type":"boolean","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"participant_domain":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"billing_status":{"type":"string","nullable":true},"not_billable_reason":{"type":"string","nullable":true},"feedback_submitted_at":{"type":"string","nullable":true},"feedback_response":{"type":"string","nullable":true}}},"Dataset_participants_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["participants"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_participants_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_participants_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true}}},"Dataset_rubrics_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["rubrics"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_rubrics_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_rubrics_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"grading_type":{"type":"string","nullable":true},"pass_mark":{"type":"number","nullable":true},"criteria_count":{"type":"number","nullable":true},"criteria":{"type":"array","nullable":true,"items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"maxPoints":{"type":"number"},"required":{"type":"boolean"},"isGate":{"type":"boolean"},"gateMinScore":{"type":"number"}}}},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true}}},"Dataset_agents_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["agents"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_agents_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_agents_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"public_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"slug":{"type":"string","nullable":true},"deploy_environment":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true}}},"Dataset_questions_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["questions"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_questions_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_questions_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"session_id":{"type":"number","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"answer":{"type":"string","nullable":true},"theme_id":{"type":"number","nullable":true},"theme":{"type":"string","nullable":true},"asked_at":{"type":"string","nullable":true}}},"Dataset_feedback_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["feedback"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_feedback_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_feedback_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"session_id":{"type":"number"},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"submitted_at":{"type":"string","nullable":true},"feedback_response":{"type":"string","nullable":true},"feedback_pairs":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}},"required":["question","answer"]}}}},"Dataset_engagement_signals_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["engagement_signals"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_engagement_signals_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_engagement_signals_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"session_id":{"type":"number","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"insight_id":{"type":"number","nullable":true},"insight_name":{"type":"string","nullable":true},"insight_description":{"type":"string","nullable":true},"insight_kind":{"type":"string","nullable":true},"matched":{"type":"boolean","nullable":true},"started_at":{"type":"string","nullable":true}}},"Dataset_moments_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["moments"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_moments_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_moments_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"session_id":{"type":"number","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"agent_public_id":{"type":"string","nullable":true},"moment_index":{"type":"number","nullable":true},"moment_title":{"type":"string","nullable":true},"reached":{"type":"boolean","nullable":true},"started_at":{"type":"string","nullable":true}}},"Dataset_scorecards_Page":{"type":"object","properties":{"dataset":{"type":"string","enum":["scorecards"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_scorecards_Row"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_scorecards_Row":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"session_id":{"type":"string","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"link_ref":{"type":"string","nullable":true},"rubric_id":{"type":"string","nullable":true},"rubric_name":{"type":"string","nullable":true},"overall_score":{"type":"number","nullable":true},"passed":{"type":"boolean","nullable":true},"coverage":{"type":"number","nullable":true},"status":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true}}},"DatasetQuery":{"oneOf":[{"$ref":"#/components/schemas/Dataset_sessions_Query"},{"$ref":"#/components/schemas/Dataset_participants_Query"},{"$ref":"#/components/schemas/Dataset_rubrics_Query"},{"$ref":"#/components/schemas/Dataset_agents_Query"},{"$ref":"#/components/schemas/Dataset_questions_Query"},{"$ref":"#/components/schemas/Dataset_feedback_Query"},{"$ref":"#/components/schemas/Dataset_engagement_signals_Query"},{"$ref":"#/components/schemas/Dataset_moments_Query"},{"$ref":"#/components/schemas/Dataset_scorecards_Query"}],"discriminator":{"propertyName":"dataset","mapping":{"sessions":"#/components/schemas/Dataset_sessions_Query","participants":"#/components/schemas/Dataset_participants_Query","rubrics":"#/components/schemas/Dataset_rubrics_Query","agents":"#/components/schemas/Dataset_agents_Query","questions":"#/components/schemas/Dataset_questions_Query","feedback":"#/components/schemas/Dataset_feedback_Query","engagement_signals":"#/components/schemas/Dataset_engagement_signals_Query","moments":"#/components/schemas/Dataset_moments_Query","scorecards":"#/components/schemas/Dataset_scorecards_Query"}}},"Dataset_sessions_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["sessions"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","external_session_id","link_ref","agent_id","agent_slug","agent_environment","agent_deleted","agent_name","agent_display_name","started_at","duration_seconds","ended_at","rating_fraction","message_count","has_user_messages","final_moment","eval_score","correlation_id","room_name","link_label","join_method","ended_by","connected_at","closed_at","completed_effective","placement","verdict","nobody_joined","completed","participant_name","participant_email","participant_company","external_user_id","started_day","started_week","started_month","started_quarter","participant_domain","is_automated","is_internal_participant","billing_status","not_billable_reason","feedback_submitted_at","feedback_response"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","external_session_id","link_ref","agent_id","agent_slug","agent_environment","agent_deleted","agent_name","agent_display_name","started_at","duration_seconds","ended_at","rating_fraction","message_count","has_user_messages","final_moment","eval_score","correlation_id","room_name","link_label","join_method","ended_by","connected_at","closed_at","completed_effective","verdict","nobody_joined","completed","participant_name","participant_email","participant_company","external_user_id","started_day","started_week","started_month","started_quarter","participant_domain","is_automated","is_internal_participant","billing_status","not_billable_reason","feedback_submitted_at","feedback_response"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_participants_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["participants"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","first_name","last_name","name","email","company","external_user_id","created_at","updated_at"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","first_name","last_name","name","email","company","external_user_id","created_at","updated_at"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_rubrics_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["rubrics"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","name","description","grading_type","pass_mark","criteria_count","criteria","created_at","updated_at"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","name","description","grading_type","pass_mark","criteria_count","created_at","updated_at"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_agents_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["agents"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","public_id","name","slug","deploy_environment","created_at"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","public_id","name","slug","deploy_environment","created_at"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_questions_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["questions"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","question","answer","theme_id","theme","asked_at"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","question","answer","theme_id","theme","asked_at"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_feedback_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["feedback"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","submitted_at","feedback_response","feedback_pairs"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","submitted_at","feedback_response"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_engagement_signals_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["engagement_signals"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","insight_id","insight_name","insight_description","insight_kind","matched","started_at"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","insight_id","insight_name","insight_description","insight_kind","matched","started_at"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_moments_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["moments"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","agent_public_id","moment_index","moment_title","reached","started_at"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","agent_public_id","moment_index","moment_title","reached","started_at"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"Dataset_scorecards_Query":{"type":"object","properties":{"dataset":{"type":"string","enum":["scorecards"]},"select":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","link_ref","rubric_id","rubric_name","overall_score","passed","coverage","status","summary","participant_name","participant_email","participant_company","external_user_id","created_at","updated_at"]},"minItems":1,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","link_ref","rubric_id","rubric_name","overall_score","passed","coverage","status","summary","participant_name","participant_email","participant_company","external_user_id","created_at","updated_at"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset"],"additionalProperties":false},"DatasetGroups":{"oneOf":[{"$ref":"#/components/schemas/Dataset_sessions_Groups"},{"$ref":"#/components/schemas/Dataset_participants_Groups"},{"$ref":"#/components/schemas/Dataset_rubrics_Groups"},{"$ref":"#/components/schemas/Dataset_agents_Groups"},{"$ref":"#/components/schemas/Dataset_questions_Groups"},{"$ref":"#/components/schemas/Dataset_feedback_Groups"},{"$ref":"#/components/schemas/Dataset_engagement_signals_Groups"},{"$ref":"#/components/schemas/Dataset_moments_Groups"},{"$ref":"#/components/schemas/Dataset_scorecards_Groups"}],"discriminator":{"propertyName":"dataset","mapping":{"sessions":"#/components/schemas/Dataset_sessions_Groups","participants":"#/components/schemas/Dataset_participants_Groups","rubrics":"#/components/schemas/Dataset_rubrics_Groups","agents":"#/components/schemas/Dataset_agents_Groups","questions":"#/components/schemas/Dataset_questions_Groups","feedback":"#/components/schemas/Dataset_feedback_Groups","engagement_signals":"#/components/schemas/Dataset_engagement_signals_Groups","moments":"#/components/schemas/Dataset_moments_Groups","scorecards":"#/components/schemas/Dataset_scorecards_Groups"}}},"Dataset_sessions_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["sessions"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_sessions_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_sessions_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"external_session_id":{"type":"string","nullable":true},"link_ref":{"type":"string","nullable":true},"agent_id":{"type":"number","nullable":true},"agent_slug":{"type":"string","nullable":true},"agent_environment":{"type":"string","nullable":true},"agent_deleted":{"type":"boolean","nullable":true},"agent_name":{"type":"string","nullable":true},"agent_display_name":{"type":"string","nullable":true},"started_at":{"type":"string","nullable":true},"duration_seconds":{"type":"number","nullable":true},"ended_at":{"type":"string","nullable":true},"rating_fraction":{"type":"number","nullable":true},"message_count":{"type":"number","nullable":true},"has_user_messages":{"type":"boolean","nullable":true},"final_moment":{"type":"string","nullable":true},"eval_score":{"type":"number","nullable":true},"correlation_id":{"type":"string","nullable":true},"room_name":{"type":"string","nullable":true},"link_label":{"type":"string","nullable":true},"join_method":{"type":"string","nullable":true},"ended_by":{"type":"string","nullable":true},"connected_at":{"type":"string","nullable":true,"format":"date-time"},"closed_at":{"type":"string","nullable":true,"format":"date-time"},"completed_effective":{"type":"boolean","nullable":true},"verdict":{"type":"string","nullable":true},"nobody_joined":{"type":"boolean","nullable":true},"completed":{"type":"boolean","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"participant_domain":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"billing_status":{"type":"string","nullable":true},"not_billable_reason":{"type":"string","nullable":true},"feedback_submitted_at":{"type":"string","nullable":true},"feedback_response":{"type":"string","nullable":true},"measured_session_count":{"type":"number","nullable":true},"unique_users":{"type":"number","nullable":true},"unique_emails":{"type":"number","nullable":true},"anonymous_sessions":{"type":"number","nullable":true},"unique_customer_domains":{"type":"number","nullable":true},"first_started_at_ms":{"type":"number","nullable":true},"session_count":{"type":"number","nullable":true},"completed_count":{"type":"number","nullable":true},"completion_rate":{"type":"number","nullable":true},"feedback_count":{"type":"number","nullable":true},"average_duration_seconds":{"type":"number","nullable":true},"average_turns_per_session":{"type":"number","nullable":true},"satisfaction_fraction":{"type":"number","nullable":true},"satisfaction_scale_max":{"type":"number","nullable":true},"rated_session_count":{"type":"number","nullable":true}}},"Dataset_participants_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["participants"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_participants_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_participants_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"participant_count":{"type":"number","nullable":true}}},"Dataset_rubrics_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["rubrics"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_rubrics_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_rubrics_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"grading_type":{"type":"string","nullable":true},"pass_mark":{"type":"number","nullable":true},"criteria_count":{"type":"number","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"rubric_count":{"type":"number","nullable":true}}},"Dataset_agents_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["agents"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_agents_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_agents_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"public_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"slug":{"type":"string","nullable":true},"deploy_environment":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"agent_count":{"type":"number","nullable":true}}},"Dataset_questions_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["questions"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_questions_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_questions_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"number"},"session_id":{"type":"number","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"question":{"type":"string","nullable":true},"answer":{"type":"string","nullable":true},"theme_id":{"type":"number","nullable":true},"theme":{"type":"string","nullable":true},"asked_at":{"type":"string","nullable":true},"question_count":{"type":"number","nullable":true},"session_count":{"type":"number","nullable":true}}},"Dataset_feedback_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["feedback"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_feedback_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_feedback_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"session_id":{"type":"number"},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"submitted_at":{"type":"string","nullable":true},"feedback_response":{"type":"string","nullable":true},"response_count":{"type":"number","nullable":true}}},"Dataset_engagement_signals_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["engagement_signals"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_engagement_signals_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_engagement_signals_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"session_id":{"type":"number","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"insight_id":{"type":"number","nullable":true},"insight_name":{"type":"string","nullable":true},"insight_description":{"type":"string","nullable":true},"insight_kind":{"type":"string","nullable":true},"matched":{"type":"boolean","nullable":true},"started_at":{"type":"string","nullable":true},"matched_count":{"type":"number","nullable":true},"session_count":{"type":"number","nullable":true},"match_rate":{"type":"number","nullable":true}}},"Dataset_moments_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["moments"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_moments_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_moments_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"session_id":{"type":"number","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"is_automated":{"type":"boolean","nullable":true},"is_internal_participant":{"type":"boolean","nullable":true},"participant_domain":{"type":"string","nullable":true},"started_day":{"type":"string","nullable":true},"started_week":{"type":"string","nullable":true},"started_month":{"type":"string","nullable":true},"started_quarter":{"type":"string","nullable":true},"agent_public_id":{"type":"string","nullable":true},"moment_index":{"type":"number","nullable":true},"moment_title":{"type":"string","nullable":true},"reached":{"type":"boolean","nullable":true},"started_at":{"type":"string","nullable":true},"reached_count":{"type":"number","nullable":true},"attributed_session_count":{"type":"number","nullable":true},"reach_rate":{"type":"number","nullable":true}}},"Dataset_scorecards_Groups":{"type":"object","properties":{"dataset":{"type":"string","enum":["scorecards"]},"next_cursor":{"type":"string","nullable":true},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"},"filters_applied":{"$ref":"#/components/schemas/DatasetFiltersApplied"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Dataset_scorecards_Aggregate"}}},"required":["dataset","next_cursor","privacy","filters_applied","rows"]},"Dataset_scorecards_Aggregate":{"type":"object","properties":{"organization":{"type":"string","nullable":true},"organization_public_id":{"type":"string","nullable":true},"id":{"type":"string"},"session_id":{"type":"string","nullable":true},"external_session_id":{"type":"string","nullable":true},"agent_name":{"type":"string","nullable":true},"link_ref":{"type":"string","nullable":true},"rubric_id":{"type":"string","nullable":true},"rubric_name":{"type":"string","nullable":true},"overall_score":{"type":"number","nullable":true},"passed":{"type":"boolean","nullable":true},"coverage":{"type":"number","nullable":true},"status":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"participant_name":{"type":"string","nullable":true},"participant_email":{"type":"string","nullable":true},"participant_company":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"scorecard_count":{"type":"number","nullable":true},"average_score":{"type":"number","nullable":true},"pass_rate":{"type":"number","nullable":true},"completed_scorecard_count":{"type":"number","nullable":true}}},"DatasetAggregate":{"oneOf":[{"$ref":"#/components/schemas/Dataset_sessions_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_participants_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_rubrics_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_agents_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_questions_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_feedback_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_engagement_signals_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_moments_AggregateRequest"},{"$ref":"#/components/schemas/Dataset_scorecards_AggregateRequest"}],"discriminator":{"propertyName":"dataset","mapping":{"sessions":"#/components/schemas/Dataset_sessions_AggregateRequest","participants":"#/components/schemas/Dataset_participants_AggregateRequest","rubrics":"#/components/schemas/Dataset_rubrics_AggregateRequest","agents":"#/components/schemas/Dataset_agents_AggregateRequest","questions":"#/components/schemas/Dataset_questions_AggregateRequest","feedback":"#/components/schemas/Dataset_feedback_AggregateRequest","engagement_signals":"#/components/schemas/Dataset_engagement_signals_AggregateRequest","moments":"#/components/schemas/Dataset_moments_AggregateRequest","scorecards":"#/components/schemas/Dataset_scorecards_AggregateRequest"}}},"Dataset_sessions_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["sessions"]},"metrics":{"type":"array","items":{"type":"string","enum":["measured_session_count","unique_users","unique_emails","anonymous_sessions","unique_customer_domains","first_started_at_ms","session_count","completed_count","completion_rate","feedback_count","average_duration_seconds","average_turns_per_session","satisfaction_fraction","satisfaction_scale_max","rated_session_count"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","external_session_id","link_ref","agent_id","agent_slug","agent_environment","agent_deleted","agent_name","agent_display_name","started_at","duration_seconds","ended_at","rating_fraction","message_count","has_user_messages","final_moment","eval_score","correlation_id","room_name","link_label","join_method","ended_by","connected_at","closed_at","completed_effective","verdict","nobody_joined","completed","participant_name","participant_email","participant_company","external_user_id","started_day","started_week","started_month","started_quarter","participant_domain","is_automated","is_internal_participant","billing_status","not_billable_reason","feedback_submitted_at","feedback_response"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","external_session_id","link_ref","agent_id","agent_slug","agent_environment","agent_deleted","agent_name","agent_display_name","started_at","duration_seconds","ended_at","rating_fraction","message_count","has_user_messages","final_moment","eval_score","correlation_id","room_name","link_label","join_method","ended_by","connected_at","closed_at","completed_effective","verdict","nobody_joined","completed","participant_name","participant_email","participant_company","external_user_id","started_day","started_week","started_month","started_quarter","participant_domain","is_automated","is_internal_participant","billing_status","not_billable_reason","feedback_submitted_at","feedback_response","measured_session_count","unique_users","unique_emails","anonymous_sessions","unique_customer_domains","first_started_at_ms","session_count","completed_count","completion_rate","feedback_count","average_duration_seconds","average_turns_per_session","satisfaction_fraction","satisfaction_scale_max","rated_session_count"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_participants_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["participants"]},"metrics":{"type":"array","items":{"type":"string","enum":["participant_count"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","first_name","last_name","name","email","company","external_user_id","created_at","updated_at"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","first_name","last_name","name","email","company","external_user_id","created_at","updated_at","participant_count"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_rubrics_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["rubrics"]},"metrics":{"type":"array","items":{"type":"string","enum":["rubric_count"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","name","description","grading_type","pass_mark","criteria_count","created_at","updated_at"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","name","description","grading_type","pass_mark","criteria_count","created_at","updated_at","rubric_count"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_agents_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["agents"]},"metrics":{"type":"array","items":{"type":"string","enum":["agent_count"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","public_id","name","slug","deploy_environment","created_at"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","public_id","name","slug","deploy_environment","created_at","agent_count"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_questions_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["questions"]},"metrics":{"type":"array","items":{"type":"string","enum":["question_count","session_count"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","question","answer","theme_id","theme","asked_at"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","question","answer","theme_id","theme","asked_at","question_count","session_count"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_feedback_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["feedback"]},"metrics":{"type":"array","items":{"type":"string","enum":["response_count"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","submitted_at","feedback_response"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","submitted_at","feedback_response","response_count"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_engagement_signals_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["engagement_signals"]},"metrics":{"type":"array","items":{"type":"string","enum":["matched_count","session_count","match_rate"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","insight_id","insight_name","insight_description","insight_kind","matched","started_at"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","insight_id","insight_name","insight_description","insight_kind","matched","started_at","matched_count","session_count","match_rate"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_moments_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["moments"]},"metrics":{"type":"array","items":{"type":"string","enum":["reached_count","attributed_session_count","reach_rate"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","agent_public_id","moment_index","moment_title","reached","started_at"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","participant_name","participant_email","participant_company","is_automated","is_internal_participant","participant_domain","started_day","started_week","started_month","started_quarter","agent_public_id","moment_index","moment_title","reached","started_at","reached_count","attributed_session_count","reach_rate"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"Dataset_scorecards_AggregateRequest":{"type":"object","properties":{"time_zone":{"type":"string","maxLength":100,"pattern":"^(?:UTC|[A-Za-z0-9_.+-]+(?:\\/[A-Za-z0-9_.+-]+)+)$","example":"America/Fortaleza","description":"IANA time zone name for the calendar fields started_day, started_week, started_month and started_quarter in filter, group_by and order. Default UTC."},"dataset":{"type":"string","enum":["scorecards"]},"metrics":{"type":"array","items":{"type":"string","enum":["scorecard_count","average_score","pass_rate","completed_scorecard_count"]},"minItems":1,"uniqueItems":true},"group_by":{"type":"array","items":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","link_ref","rubric_id","rubric_name","overall_score","passed","coverage","status","summary","participant_name","participant_email","participant_company","external_user_id","created_at","updated_at"]},"maxItems":3,"uniqueItems":true},"filter":{"$ref":"#/components/schemas/AidanMcpFilter"},"order":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["organization","organization_public_id","id","session_id","external_session_id","agent_name","link_ref","rubric_id","rubric_name","overall_score","passed","coverage","status","summary","participant_name","participant_email","participant_company","external_user_id","created_at","updated_at","scorecard_count","average_score","pass_rate","completed_scorecard_count"]},"dir":{"type":"string","enum":["asc","desc"]}},"required":["field"]},"maxItems":4},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"description":"Pass next_cursor from the previous result to get the next page, with the other inputs unchanged."}},"required":["dataset","metrics"],"additionalProperties":false},"DatasetRecord":{"oneOf":[{"$ref":"#/components/schemas/Dataset_sessions_Record"},{"$ref":"#/components/schemas/Dataset_participants_Record"},{"$ref":"#/components/schemas/Dataset_rubrics_Record"},{"$ref":"#/components/schemas/Dataset_agents_Record"},{"$ref":"#/components/schemas/Dataset_questions_Record"},{"$ref":"#/components/schemas/Dataset_feedback_Record"},{"$ref":"#/components/schemas/Dataset_engagement_signals_Record"},{"$ref":"#/components/schemas/Dataset_moments_Record"},{"$ref":"#/components/schemas/Dataset_scorecards_Record"}],"discriminator":{"propertyName":"dataset","mapping":{"sessions":"#/components/schemas/Dataset_sessions_Record","participants":"#/components/schemas/Dataset_participants_Record","rubrics":"#/components/schemas/Dataset_rubrics_Record","agents":"#/components/schemas/Dataset_agents_Record","questions":"#/components/schemas/Dataset_questions_Record","feedback":"#/components/schemas/Dataset_feedback_Record","engagement_signals":"#/components/schemas/Dataset_engagement_signals_Record","moments":"#/components/schemas/Dataset_moments_Record","scorecards":"#/components/schemas/Dataset_scorecards_Record"}}},"Dataset_sessions_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["sessions"]},"record":{"$ref":"#/components/schemas/Dataset_sessions_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_participants_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["participants"]},"record":{"$ref":"#/components/schemas/Dataset_participants_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_rubrics_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["rubrics"]},"record":{"$ref":"#/components/schemas/Dataset_rubrics_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_agents_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["agents"]},"record":{"$ref":"#/components/schemas/Dataset_agents_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_questions_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["questions"]},"record":{"$ref":"#/components/schemas/Dataset_questions_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_feedback_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["feedback"]},"record":{"$ref":"#/components/schemas/Dataset_feedback_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_engagement_signals_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["engagement_signals"]},"record":{"$ref":"#/components/schemas/Dataset_engagement_signals_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_moments_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["moments"]},"record":{"$ref":"#/components/schemas/Dataset_moments_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"Dataset_scorecards_Record":{"type":"object","properties":{"dataset":{"type":"string","enum":["scorecards"]},"record":{"$ref":"#/components/schemas/Dataset_scorecards_Row"},"privacy":{"$ref":"#/components/schemas/AidanMcpPrivacy"}},"required":["dataset","record","privacy"]},"SearchPage":{"type":"object","properties":{"hits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"score":{"type":"number"},"snippet":{"type":"string"},"dataset":{"type":"string","enum":["knowledge"]},"id":{"type":"string","nullable":true,"description":"Source ID, null if the passage could not be attributed."},"title":{"type":"string","description":"Title of the source the passage came from."},"url":{"type":"string","description":"Address of the source the passage came from."}},"required":["score","snippet","dataset","id","title","url"]},{"type":"object","properties":{"score":{"type":"number"},"snippet":{"type":"string"},"dataset":{"type":"string","enum":["transcripts"]},"id":{"type":"string","description":"Transcript message ID."},"session_id":{"type":"integer","description":"The call's id in the sessions dataset."},"started_at":{"type":"string","format":"date-time","description":"When the call started."},"agent_name":{"type":"string","nullable":true,"description":"The call's agent, by its current name."},"participant":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"external_user_id":{"type":"string","nullable":true}},"required":["name","email","external_user_id"],"description":"The caller, as far as the viewer may see them; null when nothing identifies them."}},"required":["score","snippet","dataset","id","session_id","started_at","agent_name","participant"]}]}},"next_cursor":{"type":"string"},"suggestion":{"type":"string","description":"Guidance from transcript search when it returns no matches."}},"required":["hits"]},"SearchInput":{"oneOf":[{"type":"object","properties":{"in":{"type":"string","enum":["knowledge"]},"query":{"type":"string","minLength":1,"example":"How do I reset my password?"},"limit":{"type":"integer","minimum":1,"maximum":50},"filter":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"example":"fd86e09c54464ac6"},"domain":{"type":"string","minLength":1,"example":"www.example.com"}},"additionalProperties":false}},"required":["in","query"],"additionalProperties":false},{"type":"object","properties":{"query":{"type":"string","minLength":1},"filter":{"type":"object","properties":{"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"includeSableTraffic":{"type":"boolean"},"asRole":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"includeInternal":{"type":"boolean"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"role":{"type":"string","enum":["user","agent","any"]},"verdict":{"type":"string","enum":["good","acceptable","needs_work","failed"]},"completed":{"type":"boolean"},"source":{"type":"string","enum":["human","agent","all"]},"momentName":{"type":"string","minLength":1}},"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":30},"cursor":{"type":"string","minLength":1,"maxLength":96},"in":{"type":"string","enum":["transcripts"]}},"required":["query","in"],"additionalProperties":false}]},"VideoSummary":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"doc_summary":{"type":"string"},"duration_s":{"type":"number","nullable":true},"language":{"type":"string","nullable":true},"scenes":{"type":"array","items":{"$ref":"#/components/schemas/SceneSummary"}},"structured_index":{"type":"object","properties":{"all_urls":{"type":"array","items":{"type":"string"}},"all_ctas":{"type":"array","items":{"type":"string"}}},"required":["all_urls","all_ctas"]}},"required":["id","title","doc_summary","duration_s","language","scenes","structured_index"]},"SceneSummary":{"type":"object","properties":{"scene_index":{"type":"integer","minimum":0},"start_s":{"type":"number","minimum":0},"end_s":{"type":"number","minimum":0},"summary":{"type":"string"},"key_urls":{"type":"array","items":{"type":"string"}},"key_ctas":{"type":"array","items":{"type":"string"}}},"required":["scene_index","start_s","end_s","summary","key_urls","key_ctas"]},"SearchVideoResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/VideoSearchResult"}},"mode_actual":{"type":"string","enum":["fast","rich"]}},"required":["results","mode_actual"]},"VideoSearchResult":{"type":"object","properties":{"scene_index":{"type":"integer","minimum":0},"start_s":{"type":"number","minimum":0},"end_s":{"type":"number","minimum":0},"summary":{"type":"string"},"score":{"type":"number"}},"required":["scene_index","start_s","end_s","summary","score"]},"FrameResponse":{"type":"object","properties":{"frame_time_s":{"type":"number","minimum":0},"signed_url":{"type":"string","format":"uri"},"expires_at":{"type":"string"}},"required":["frame_time_s","signed_url","expires_at"]},"TranscriptResponse":{"type":"object","properties":{"segments":{"type":"array","items":{"type":"object","properties":{"start_s":{"type":"number","minimum":0},"end_s":{"type":"number","minimum":0},"text":{"type":"string"}},"required":["start_s","end_s","text"]}},"total_duration_s":{"type":"number","minimum":0}},"required":["segments","total_duration_s"]},"CreateWebhookEndpointResponse":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string","nullable":true,"example":"whsec_…","description":"Plaintext HTTPS signing secret."}},"required":["endpoint","secret"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"integer"},"publicId":{"type":"string"},"orgId":{"type":"integer"},"agentId":{"type":"integer","nullable":true},"transport":{"type":"string","enum":["https_webhook","email","slack","crm"]},"url":{"type":"string","nullable":true},"config":{"anyOf":[{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"}},"includeLinkRecipients":{"type":"boolean"},"hideCallLink":{"type":"boolean"},"repFollowUps":{"oneOf":[{"type":"object","properties":{"sender":{"type":"string","enum":["email"]}},"required":["sender"],"additionalProperties":false},{"type":"object","properties":{"sender":{"type":"string","enum":["aidan"]},"convertedChannelsOnly":{"type":"boolean"},"autoProvisionRepChannels":{"type":"boolean"},"teamId":{"type":"string","pattern":"^[TE][A-Z0-9]+$"},"channelId":{"type":"string","pattern":"^[CG][A-Z0-9]+$"},"internalUserId":{"type":"string","pattern":"^[UW][A-Z0-9]+$"}},"required":["sender","teamId","channelId","internalUserId"],"additionalProperties":false},{"nullable":true}]}},"additionalProperties":false},{"type":"object","properties":{"channelName":{"type":"string","minLength":1},"channelIsPrivate":{"type":"boolean"},"format":{"type":"string","enum":["per_call","per_person","live_digest","live_digest_no_chart","scheduled_digest"]},"timeZone":{"type":"string","minLength":1,"maxLength":64},"schedule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly"]},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"weekday":{"type":"integer","minimum":0,"maximum":6}},"required":["frequency","time"],"additionalProperties":false}},"required":["channelName","channelIsPrivate"],"additionalProperties":false},{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"mappings":{"type":"array","items":{"type":"object","properties":{"extractionFieldKey":{"type":"string","minLength":1,"maxLength":64},"recordRole":{"type":"string","enum":["person","company"]},"crmProperty":{"type":"string","minLength":1,"maxLength":255},"writeMode":{"type":"string","enum":["if_empty"],"default":"if_empty"}},"required":["extractionFieldKey","recordRole","crmProperty"],"additionalProperties":false},"maxItems":30}},"required":["connectionId","provider","mappings"],"additionalProperties":false,"description":"HubSpot and Salesforce need at least one entry in `mappings`; an empty list is rejected. Monaco may have none: each call still becomes a call task."}]},"slack":{"type":"object","nullable":true,"properties":{"installation":{"type":"object","properties":{"id":{"type":"string"},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","team"]},"channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"}},"required":["id","name","isPrivate"]}},"required":["installation","channel"]},"fields":{"type":"array","nullable":true,"items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"filters":{"type":"object","properties":{"notificationPrompt":{"type":"string","nullable":true,"maxLength":4000},"includeInternal":{"type":"boolean","default":false},"minDurationSeconds":{"type":"integer","minimum":0,"default":120}}},"description":{"type":"string","nullable":true},"eventTypes":{"type":"array","items":{"type":"string"}},"apiVersion":{"type":"string"},"status":{"type":"string","enum":["enabled","disabled","auto_disabled"]},"disabledReason":{"type":"string","nullable":true},"consecutiveFailureCount":{"type":"integer"},"customHeaders":{"type":"object","additionalProperties":{"type":"string"}},"secondarySecretExpiresAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":"string","nullable":true}},"required":["id","publicId","orgId","agentId","transport","url","config","slack","fields","filters","description","eventTypes","apiVersion","status","disabledReason","consecutiveFailureCount","customHeaders","secondarySecretExpiresAt","createdAt","updatedAt","deletedAt"]},"CreateWebhookEndpointBody":{"anyOf":[{"type":"object","properties":{"orgId":{"type":"integer"},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"description":{"type":"string","maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.completed"]},"minItems":1},"fields":{"type":"array","nullable":true,"items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"filters":{"type":"object","properties":{"notificationPrompt":{"type":"string","nullable":true,"maxLength":4000},"includeInternal":{"type":"boolean","default":false},"minDurationSeconds":{"type":"integer","minimum":0,"default":120}}},"transport":{"type":"string","enum":["crm"]},"config":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"mappings":{"type":"array","items":{"type":"object","properties":{"extractionFieldKey":{"type":"string","minLength":1,"maxLength":64},"recordRole":{"type":"string","enum":["person","company"]},"crmProperty":{"type":"string","minLength":1,"maxLength":255},"writeMode":{"type":"string","enum":["if_empty"],"default":"if_empty"}},"required":["extractionFieldKey","recordRole","crmProperty"],"additionalProperties":false},"maxItems":30}},"required":["connectionId","provider","mappings"],"additionalProperties":false,"description":"HubSpot and Salesforce need at least one entry in `mappings`; an empty list is rejected. Monaco may have none: each call still becomes a call task."}},"required":["agentId","transport","config"],"additionalProperties":false},{"type":"object","properties":{"orgId":{"type":"integer"},"agentId":{"type":"integer","nullable":true},"description":{"type":"string","maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.completed"]},"minItems":1},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]},"minItems":1},"filters":{"type":"object","properties":{"notificationPrompt":{"type":"string","nullable":true,"maxLength":4000},"includeInternal":{"type":"boolean","default":false},"minDurationSeconds":{"type":"integer","minimum":0,"default":120}}},"transport":{"type":"string","enum":["slack"]},"slackInstallationId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1},"slackFormat":{"type":"string","enum":["per_call","per_person","live_digest","live_digest_no_chart","scheduled_digest"]},"slackTimeZone":{"type":"string","minLength":1,"maxLength":64},"slackSchedule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly"]},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"weekday":{"type":"integer","minimum":0,"maximum":6}},"required":["frequency","time"],"additionalProperties":false}},"required":["transport","slackInstallationId","slackChannelId"],"additionalProperties":false},{"type":"object","properties":{"orgId":{"type":"integer"},"agentId":{"type":"integer","nullable":true},"description":{"type":"string","maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.completed"]},"minItems":1},"fields":{"type":"array","nullable":true,"items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"filters":{"type":"object","properties":{"notificationPrompt":{"type":"string","nullable":true,"maxLength":4000},"includeInternal":{"type":"boolean","default":false},"minDurationSeconds":{"type":"integer","minimum":0,"default":120}}},"transport":{"type":"string","enum":["email"]},"config":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"},"maxItems":25,"default":[]},"hideCallLink":{"type":"boolean"},"repFollowUps":{"oneOf":[{"type":"object","properties":{"sender":{"type":"string","enum":["email"]}},"required":["sender"],"additionalProperties":false},{"type":"object","properties":{"sender":{"type":"string","enum":["aidan"]},"convertedChannelsOnly":{"type":"boolean"},"autoProvisionRepChannels":{"type":"boolean"},"teamId":{"type":"string","pattern":"^[TE][A-Z0-9]+$"},"channelId":{"type":"string","pattern":"^[CG][A-Z0-9]+$"},"internalUserId":{"type":"string","pattern":"^[UW][A-Z0-9]+$"}},"required":["sender","teamId","channelId","internalUserId"],"additionalProperties":false},{"nullable":true}]},"includeLinkRecipients":{"type":"boolean","description":"Also email the `notify_emails` list on the link each call came through (the link's `metadata`). With no static `to`, a call whose link has no notify list sends nothing."}},"additionalProperties":false,"description":"Needs at least one address in `to`, or `includeLinkRecipients: true`; an empty config is rejected."}},"required":["transport","config"],"additionalProperties":false},{"type":"object","properties":{"orgId":{"type":"integer"},"agentId":{"type":"integer","nullable":true},"description":{"type":"string","maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.completed"]},"minItems":1},"fields":{"type":"array","nullable":true,"items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"filters":{"type":"object","properties":{"notificationPrompt":{"type":"string","nullable":true,"maxLength":4000},"includeInternal":{"type":"boolean","default":false},"minDurationSeconds":{"type":"integer","minimum":0,"default":120}}},"transport":{"type":"string","enum":["https_webhook"]},"url":{"type":"string","format":"uri"},"config":{"type":"object","properties":{},"additionalProperties":false},"customHeaders":{"type":"object","additionalProperties":{"type":"string"}}},"required":["url"]}]},"WebhookEndpointListResponse":{"type":"object","properties":{"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["endpoints"]},"PostCallTestEmailResponse":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"sent":{"type":"boolean"}},"required":["to","subject","fields","sent"]},"PostCallTestEmailBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"sessionId":{"type":"string","minLength":1,"description":"The call's external session id."},"integrationId":{"type":"string","minLength":1,"description":"An email integration's public id. Defaults to the call's agent's first enabled email integration (agent-scoped, then org-wide); with none, every default field is shown."},"to":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":5,"description":"Custom recipients. Omit to send to the integration's recipients plus the link's notify list."},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]},"minItems":1,"description":"Fields for this test only. Omit to use the selected integration’s fields."},"dryRun":{"type":"boolean","description":"Resolve recipients and render, without sending."}},"required":["orgId","sessionId"]},"WebhookDeliveryListResponse":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"required":["deliveries","nextCursor","hasMore"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"integer"},"publicId":{"type":"string"},"orgId":{"type":"integer"},"eventId":{"type":"integer"},"endpointId":{"type":"integer"},"status":{"type":"string","enum":["pending","succeeded","failed","exhausted","skipped"]},"attemptCount":{"type":"integer"},"nextRetryAt":{"type":"string","nullable":true},"lastAttemptAt":{"type":"string","nullable":true},"responseStatus":{"type":"integer","nullable":true},"responseBody":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"failureOwner":{"type":"string","nullable":true,"enum":["destination","system",null]},"destination":{"oneOf":[{"type":"object","properties":{"transport":{"type":"string","enum":["https_webhook"]},"url":{"type":"string"},"config":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"}},"includeLinkRecipients":{"type":"boolean"}},"additionalProperties":false},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"description":{"type":"string","nullable":true}},"required":["transport","url","config","description"]},{"type":"object","properties":{"transport":{"type":"string","enum":["email"]},"url":{"nullable":true},"config":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"}},"includeLinkRecipients":{"type":"boolean"},"hideCallLink":{"type":"boolean"},"repFollowUps":{"oneOf":[{"type":"object","properties":{"sender":{"type":"string","enum":["email"]}},"required":["sender"],"additionalProperties":false},{"type":"object","properties":{"sender":{"type":"string","enum":["aidan"]},"convertedChannelsOnly":{"type":"boolean"},"autoProvisionRepChannels":{"type":"boolean"},"teamId":{"type":"string","pattern":"^[TE][A-Z0-9]+$"},"channelId":{"type":"string","pattern":"^[CG][A-Z0-9]+$"},"internalUserId":{"type":"string","pattern":"^[UW][A-Z0-9]+$"}},"required":["sender","teamId","channelId","internalUserId"],"additionalProperties":false},{"nullable":true}]}},"additionalProperties":false},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"description":{"type":"string","nullable":true}},"required":["transport","url","config","description"]},{"type":"object","properties":{"transport":{"type":"string","enum":["slack"]},"installationPublicId":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"},"channelIsPrivate":{"type":"boolean"},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]},"minItems":1},"url":{"nullable":true},"config":{"type":"object","properties":{"channelName":{"type":"string"},"channelIsPrivate":{"type":"boolean"},"format":{"type":"string","enum":["per_call","per_person","live_digest","live_digest_no_chart","scheduled_digest"]},"timeZone":{"type":"string"},"schedule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly"]},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"weekday":{"type":"integer","minimum":0,"maximum":6}},"required":["frequency","time"],"additionalProperties":false}},"required":["channelName","channelIsPrivate"],"additionalProperties":false},"description":{"type":"string","nullable":true}},"required":["transport","installationPublicId","teamId","teamName","channelId","channelName","channelIsPrivate","fields","url","config","description"]},{"type":"object","properties":{"transport":{"type":"string","enum":["crm"]},"connectionPublicId":{"type":"string","minLength":1},"connectionFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"recordRole":{"type":"string","enum":["person","company"]},"captureCalls":{"type":"boolean"},"mappings":{"type":"array","items":{"type":"object","properties":{"extractionFieldKey":{"type":"string","minLength":1,"maxLength":64},"recordRole":{"type":"string","enum":["person","company"]},"crmProperty":{"type":"string","minLength":1,"maxLength":255},"writeMode":{"type":"string","enum":["if_empty"],"default":"if_empty"}},"required":["extractionFieldKey","crmProperty"],"additionalProperties":false}},"url":{"nullable":true},"config":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"}},"includeLinkRecipients":{"type":"boolean"}},"additionalProperties":false},"description":{"type":"string","nullable":true}},"required":["transport","connectionPublicId","connectionFingerprint","provider","mappings","url","config","description"]},{"nullable":true}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","publicId","orgId","eventId","endpointId","status","attemptCount","nextRetryAt","lastAttemptAt","responseStatus","responseBody","errorMessage","failureOwner","destination","createdAt","updatedAt"]},"WebhookDeliveryDetailResponse":{"type":"object","properties":{"delivery":{"$ref":"#/components/schemas/WebhookDelivery"},"event":{"type":"object","nullable":true,"properties":{"publicId":{"type":"string"},"type":{"type":"string"},"apiVersion":{"type":"string"},"sessionId":{"type":"string"},"transcriptSessionId":{"type":"integer","nullable":true},"payload":{"type":"object","additionalProperties":true},"createdAt":{"type":"string"}},"required":["publicId","type","apiVersion","sessionId","transcriptSessionId","payload","createdAt"]},"destination":{"oneOf":[{"type":"object","properties":{"transport":{"type":"string","enum":["https_webhook"]},"url":{"type":"string"},"config":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"}},"includeLinkRecipients":{"type":"boolean"}},"additionalProperties":false},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"description":{"type":"string","nullable":true}},"required":["transport","url","config","description"]},{"type":"object","properties":{"transport":{"type":"string","enum":["email"]},"url":{"nullable":true},"config":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"}},"includeLinkRecipients":{"type":"boolean"},"hideCallLink":{"type":"boolean"},"repFollowUps":{"oneOf":[{"type":"object","properties":{"sender":{"type":"string","enum":["email"]}},"required":["sender"],"additionalProperties":false},{"type":"object","properties":{"sender":{"type":"string","enum":["aidan"]},"convertedChannelsOnly":{"type":"boolean"},"autoProvisionRepChannels":{"type":"boolean"},"teamId":{"type":"string","pattern":"^[TE][A-Z0-9]+$"},"channelId":{"type":"string","pattern":"^[CG][A-Z0-9]+$"},"internalUserId":{"type":"string","pattern":"^[UW][A-Z0-9]+$"}},"required":["sender","teamId","channelId","internalUserId"],"additionalProperties":false},{"nullable":true}]}},"additionalProperties":false},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"description":{"type":"string","nullable":true}},"required":["transport","url","config","description"]},{"type":"object","properties":{"transport":{"type":"string","enum":["slack"]},"installationPublicId":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"},"channelIsPrivate":{"type":"boolean"},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]},"minItems":1},"url":{"nullable":true},"config":{"type":"object","properties":{"channelName":{"type":"string"},"channelIsPrivate":{"type":"boolean"},"format":{"type":"string","enum":["per_call","per_person","live_digest","live_digest_no_chart","scheduled_digest"]},"timeZone":{"type":"string"},"schedule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly"]},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"weekday":{"type":"integer","minimum":0,"maximum":6}},"required":["frequency","time"],"additionalProperties":false}},"required":["channelName","channelIsPrivate"],"additionalProperties":false},"description":{"type":"string","nullable":true}},"required":["transport","installationPublicId","teamId","teamName","channelId","channelName","channelIsPrivate","fields","url","config","description"]},{"type":"object","properties":{"transport":{"type":"string","enum":["crm"]},"connectionPublicId":{"type":"string","minLength":1},"connectionFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"recordRole":{"type":"string","enum":["person","company"]},"captureCalls":{"type":"boolean"},"mappings":{"type":"array","items":{"type":"object","properties":{"extractionFieldKey":{"type":"string","minLength":1,"maxLength":64},"recordRole":{"type":"string","enum":["person","company"]},"crmProperty":{"type":"string","minLength":1,"maxLength":255},"writeMode":{"type":"string","enum":["if_empty"],"default":"if_empty"}},"required":["extractionFieldKey","crmProperty"],"additionalProperties":false}},"url":{"nullable":true},"config":{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"}},"includeLinkRecipients":{"type":"boolean"}},"additionalProperties":false},"description":{"type":"string","nullable":true}},"required":["transport","connectionPublicId","connectionFingerprint","provider","mappings","url","config","description"]},{"nullable":true}]}},"required":["delivery","event","destination"]},"CallEmailDeliveriesResponse":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"emptyReason":{"type":"string","nullable":true,"enum":["in_progress","pending","ai_employee","internal_call","no_email_integration","filtered_out","no_recipients","not_sent",null],"description":"Why the call has no email the caller can see. Null when `deliveries` is non-empty."}},"required":["deliveries","emptyReason"]},"DeliveryEmailResponse":{"type":"object","properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"}},"required":["subject","html","text"]},"CallFollowUpEmail":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","sent","skipped","failed"],"description":"`none` when no follow-up was queued for the call (for example, it predates the feature)."},"reason":{"type":"string","nullable":true,"description":"Why it was skipped (`disabled`, `no-recipient`, `not-eligible`, `canceled`) or why it failed."},"recipient":{"type":"string","nullable":true},"sentAt":{"type":"string","nullable":true,"format":"date-time"},"email":{"type":"object","nullable":true,"properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"}},"required":["subject","html","text"],"description":"The sent copy. Null when not sent, for sends that predate keeping it, or without `transcripts:read`."}},"required":["status","reason","recipient","sentAt","email"]},"CallSlackDeliveriesResponse":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"emptyReason":{"type":"string","nullable":true,"enum":["in_progress","pending","ai_employee","internal_call","no_slack_destination","filtered_out","not_sent",null],"description":"Why the call has no Slack debrief delivery. Null when `deliveries` is non-empty."}},"required":["deliveries","emptyReason"]},"DeliverySlackMessageResponse":{"type":"object","properties":{"text":{"type":"string","description":"The channel message's notification fallback text"},"blocks":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"The channel message's Block Kit"},"threadText":{"type":"string"},"threadBlocks":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Every thread reply's blocks, a divider between replies"}},"required":["text","blocks","threadText","threadBlocks"]},"WebhookDeliveryResponse":{"type":"object","properties":{"delivery":{"$ref":"#/components/schemas/WebhookDelivery"}},"required":["delivery"]},"WebhookEndpointResponse":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"}},"required":["endpoint"]},"UpdateWebhookEndpointBody":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"config":{"anyOf":[{"type":"object","properties":{"to":{"type":"array","items":{"type":"string","format":"email"},"maxItems":25},"hideCallLink":{"type":"boolean"},"repFollowUps":{"oneOf":[{"type":"object","properties":{"sender":{"type":"string","enum":["email"]}},"required":["sender"],"additionalProperties":false},{"type":"object","properties":{"sender":{"type":"string","enum":["aidan"]},"convertedChannelsOnly":{"type":"boolean"},"autoProvisionRepChannels":{"type":"boolean"},"teamId":{"type":"string","pattern":"^[TE][A-Z0-9]+$"},"channelId":{"type":"string","pattern":"^[CG][A-Z0-9]+$"},"internalUserId":{"type":"string","pattern":"^[UW][A-Z0-9]+$"}},"required":["sender","teamId","channelId","internalUserId"],"additionalProperties":false},{"nullable":true}]},"includeLinkRecipients":{"type":"boolean"}},"additionalProperties":false},{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"provider":{"type":"string","enum":["hubspot","salesforce","monaco"]},"mappings":{"type":"array","items":{"type":"object","properties":{"extractionFieldKey":{"type":"string","minLength":1,"maxLength":64},"recordRole":{"type":"string","enum":["person","company"]},"crmProperty":{"type":"string","minLength":1,"maxLength":255},"writeMode":{"type":"string","enum":["if_empty"],"default":"if_empty"}},"required":["extractionFieldKey","recordRole","crmProperty"],"additionalProperties":false},"maxItems":30}},"required":["connectionId","provider","mappings"],"additionalProperties":false,"description":"HubSpot and Salesforce need at least one entry in `mappings`; an empty list is rejected. Monaco may have none: each call still becomes a call task."}]},"slackInstallationId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1},"slackFormat":{"type":"string","enum":["per_call","per_person","live_digest","live_digest_no_chart","scheduled_digest"]},"slackTimeZone":{"type":"string","minLength":1,"maxLength":64},"slackSchedule":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly"]},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"weekday":{"type":"integer","minimum":0,"maximum":6}},"required":["frequency","time"],"additionalProperties":false},"fields":{"type":"array","nullable":true,"items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"filters":{"type":"object","properties":{"notificationPrompt":{"type":"string","nullable":true,"maxLength":4000},"includeInternal":{"type":"boolean"},"minDurationSeconds":{"type":"integer","minimum":0}}},"description":{"type":"string","nullable":true,"maxLength":500},"eventTypes":{"type":"array","items":{"type":"string","enum":["call.completed"]},"minItems":1},"customHeaders":{"type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string","enum":["enabled","disabled"]}}},"WebhookDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"WebhookSecretResponse":{"type":"object","properties":{"secret":{"type":"string","example":"whsec_…","description":"Plaintext HTTPS signing secret."}},"required":["secret"]},"RotateWebhookSecretResponse":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string","example":"whsec_…","description":"Plaintext HTTPS signing secret."}},"required":["endpoint","secret"]},"WebhookTestSendResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"integer","nullable":true},"latencyMs":{"type":"integer"},"body":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"failureOwner":{"type":"string","nullable":true,"enum":["destination","system",null]}},"required":["ok","status","latencyMs","body","error","failureOwner"]},"SendSlackDebriefResponse":{"type":"object","properties":{"deliveryIds":{"type":"array","items":{"type":"string"}}},"required":["deliveryIds"]},"SendSlackDebriefBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"sessionId":{"type":"string","minLength":1,"description":"The call's external session id"},"fields":{"type":"array","items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]},"minItems":1,"description":"Fields for this send only. Omit to use each Slack destination's own fields."}},"required":["orgId","sessionId"]},"DestinationPreviewResponse":{"type":"object","properties":{"payload":{"type":"object","additionalProperties":true},"email":{"type":"object","properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"}},"required":["subject","html","text"],"description":"Rendered email. Present only when transport is email."},"slack":{"type":"object","properties":{"text":{"type":"string"},"blocks":{"type":"array","items":{"type":"object","additionalProperties":true}},"threadText":{"type":"string"},"threadBlocks":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["text","blocks","threadText","threadBlocks"],"description":"Rendered Block Kit message and its thread reply. Present only when transport is slack."}},"required":["payload"]},"DestinationPreviewBody":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"transport":{"type":"string","enum":["https_webhook","email","slack","crm"]},"fields":{"type":"array","nullable":true,"items":{"type":"string","enum":["summary","agent.name","participant.email","participant.company","duration_seconds","feedback.rating","grading.overall","metadata","extraction","transcript","participant.name","topics","questions","participant.caller_card.title","participant.caller_card.location","participant.caller_card.profile_url","participant.company_domain","participant.caller_card.why_they_came","participant.caller_card.what_matters","participant.caller_card.outcome","participant.caller_card.next_step","participant.caller_card.photo","qualification"]}},"agentId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["transport","fields"]},"MeetingBotResponse":{"type":"object","properties":{"id":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"recallBotId":{"type":"string","example":"8a1c0c1e-1f4a-4d3b-9c2e-2b7d6f0a1234"},"status":{"$ref":"#/components/schemas/MeetingBotStatus"},"pageUrl":{"type":"string","example":"https://call.withsable.com/agent/agt_x?mode=meeting&bot=mb_y"}},"required":["id","recallBotId","status","pageUrl"]},"MeetingBotStatus":{"type":"string","enum":["created","joining_call","in_waiting_room","in_call_not_recording","in_call_recording","call_ended","done","fatal"]},"CreateMeetingBotBody":{"type":"object","properties":{"agentPublicId":{"type":"string","minLength":1,"example":"agt_2cvqjzt1ZZTXpLW58r7dP"},"meetingUrl":{"type":"string","format":"uri","example":"https://us02web.zoom.us/j/1234567890?pwd=abcdef"},"env":{"type":"string","minLength":1,"maxLength":64,"example":"pr-1234","description":"Runtime environment override — name, ref, or dispatch name from the env catalog, as connection-details' `env` names it. Carried onto the bot's call page so that environment serves the bot's session."}},"required":["agentPublicId","meetingUrl"]},"MeetingBotAcknowledged":{"type":"object","properties":{"message":{"type":"string","example":"ok"}},"required":["message"]},"RecallWebhookBody":{"type":"object","properties":{"event":{"type":"string","example":"bot.in_call_recording"},"data":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"string"},"sub_code":{"type":"string","nullable":true},"updated_at":{"type":"string"},"participant":{"type":"object","nullable":true,"properties":{"id":{"type":"number"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["id"],"additionalProperties":true},"data":{"type":"object","nullable":true,"properties":{"text":{"type":"string","nullable":true}},"additionalProperties":true},"timestamp":{"type":"object","nullable":true,"properties":{"absolute":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true},"bot":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":true}},"additionalProperties":true}},"required":["event","data"],"additionalProperties":true},"MeetingBotStatusResponse":{"type":"object","properties":{"id":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"status":{"$ref":"#/components/schemas/MeetingBotStatus"},"statusCode":{"type":"string","example":"in_call_recording"},"updatedAt":{"type":"string","example":"2026-09-14T10:15:00.000Z"},"participants":{"type":"integer","example":1,"description":"People Recall reports in the meeting besides the bot right now. 0 means nobody else is in it, whether nobody has joined yet or everyone has left, and is also what a bot created before the count was recorded reads."}},"required":["id","status","statusCode","updatedAt","participants"]},"MeetingBotChatBody":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000,"example":"Here is the link I just mentioned: https://withsable.com"},"key":{"type":"string","minLength":1,"maxLength":128,"description":"Names this line, so a request the caller never saw answered can be repeated within a minute without the line being said twice. A repeat that arrives while the first is still being sent is answered 409.","example":"SG_3f9a"}},"required":["text"]},"MeetingBotRoomBody":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":256,"example":"q3Vb0mJ9xk2T7LrE5pWcA1sYdF8gHnZu4iOeKt6vXyM","description":"The `key` query parameter of the bot's pages."},"serverUrl":{"type":"string","format":"uri","example":"wss://livekit.example.com"},"participantToken":{"type":"string","minLength":1,"maxLength":65536,"description":"The LiveKit token the call page joined with. The room recorded is the one it names, and only while LiveKit lists the token's participant in that room."}},"required":["key","serverUrl","participantToken"]},"MeetingBotRoomConfirmBody":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":256,"example":"q3Vb0mJ9xk2T7LrE5pWcA1sYdF8gHnZu4iOeKt6vXyM","description":"The `key` query parameter of the bot's pages."},"challenge":{"type":"string","minLength":1,"maxLength":256,"description":"The value sable-api wrote to the call page's own participant attribute after its room report."}},"required":["key","challenge"]},"MeetingBotViewerTokenResponse":{"type":"object","properties":{"connection":{"type":"object","nullable":true,"properties":{"serverUrl":{"type":"string","example":"wss://livekit.example.com"},"roomName":{"type":"string","example":"room-3f9a1c2e"},"token":{"type":"string","description":"A hidden, subscribe-only LiveKit token for the room."},"participantIdentity":{"type":"string","example":"user-1a2b3c4d","description":"The call page's participant in the room, the only one a viewer should take the stage from. Absent for a room recorded before sable-api kept it."}},"required":["serverUrl","roomName","token"],"description":"`null` until the call page has reported its room, and once the bot has left the meeting."}},"required":["connection"]},"MeetingBotViewerTokenBody":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":256,"example":"q3Vb0mJ9xk2T7LrE5pWcA1sYdF8gHnZu4iOeKt6vXyM","description":"The `key` query parameter of the bot's pages."}},"required":["key"]},"MeetingBotScreenShareResponse":{"type":"object","properties":{"sharing":{"type":"boolean","description":"Whether the bot is sharing its screen now."}},"required":["sharing"]},"MeetingBotScreenShareBody":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":256,"example":"q3Vb0mJ9xk2T7LrE5pWcA1sYdF8gHnZu4iOeKt6vXyM","description":"The `key` query parameter of the bot's pages."},"sharing":{"type":"boolean","description":"`true` to share the agent's screen in the meeting, `false` to stop."}},"required":["key","sharing"]},"MeetingBotChatResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/MeetingBotChatMessage"}},"next":{"type":"integer","example":13,"description":"The cursor to send as `after` on the next read."}},"required":["messages","next"]},"MeetingBotChatMessage":{"type":"object","properties":{"seq":{"type":"integer","example":13},"from":{"type":"string","nullable":true,"example":"Dana","description":"The participant the platform named, or `null` when the platform reported no name."},"text":{"type":"string","example":"can you share that link?"},"at":{"type":"string","example":"2026-09-14T10:15:00.000Z"}},"required":["seq","from","text","at"]},"MeetingResponse":{"type":"object","properties":{"id":{"type":"string","example":"mtg_7bKpQ4rStUvWxYzAbCdEf"},"joinUrl":{"type":"string","example":"https://us02web.zoom.us/j/1234567890?pwd=abcdef"},"botId":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"pageUrl":{"type":"string","example":"https://call.withsable.com/agent/agt_x?mode=meeting&bot=mb_y"}},"required":["id","joinUrl","botId","pageUrl"]},"CreateMeetingBody":{"type":"object","properties":{"agentPublicId":{"type":"string","minLength":1,"example":"agt_2cvqjzt1ZZTXpLW58r7dP"},"platform":{"type":"string","enum":["zoom","google_meet"],"example":"google_meet","description":"Where to host the meeting. Defaults to `zoom`."},"configId":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","description":"The agent config version the visitor's page was on, loaded on the bot's call page too."},"journey":{"type":"string","minLength":1,"maxLength":128,"example":"enterprise-demo","description":"The journey the visitor's page was on, started on the bot's call page too."},"env":{"type":"string","minLength":1,"maxLength":64,"example":"pr-1234","description":"Runtime environment override, carried onto the bot's call page as it is for a bot sent by hand."},"failedAttemptId":{"type":"string","minLength":1,"maxLength":128,"example":"5b0c7a9e-3f0e-4c1e-9d2a-7b6f8e1c2d3a","description":"The call attempt whose failure put the visitor on the blocked screen this meeting is the fallback from. Once someone joins, an attempt that alerted for this agent with this platform offered gets a follow-up, and the meeting's call-started alert names it."},"visitor":{"$ref":"#/components/schemas/MeetingVisitor"}},"required":["agentPublicId"]},"MeetingVisitor":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"example":"Ada Lovelace"},"email":{"type":"string","maxLength":320,"format":"email","example":"ada@example.com"},"company":{"type":"string","minLength":1,"maxLength":200,"example":"Analytical Engines"}},"description":"What the visitor typed into the pre-call form. The bot's call page signs nobody in, so these fill the meeting session's blank participant details; a typed email is dropped when the agent verifies emails."},"MeetingStatusResponse":{"type":"object","properties":{"id":{"type":"string","example":"mtg_7bKpQ4rStUvWxYzAbCdEf"},"joinUrl":{"type":"string","example":"https://us02web.zoom.us/j/1234567890?pwd=abcdef"},"bot":{"type":"object","properties":{"id":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"status":{"$ref":"#/components/schemas/MeetingBotStatus"}},"required":["id","status"]}},"required":["id","joinUrl","bot"]}},"parameters":{}},"paths":{"/agents/{agentId}/company-research/prewarm":{"post":{"tags":["AgentRuntime"],"summary":"Start company research for a visitor before their call connects","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"configId":{"type":"string","format":"uuid"}},"required":["email"]}}}},"responses":{"202":{"description":"Research queued when the agent has opted in; otherwise nothing happens","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/calls/{callId}/research-context":{"get":{"tags":["AgentRuntime"],"summary":"Read cached company evidence for an active call","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Cache-only authorized snapshot; never starts provider work","content":{"application/json":{"schema":{"type":"object","properties":{"research_context":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":128},"revision":{"type":"integer","minimum":0},"facts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"value":{"type":"string","minLength":1,"maxLength":512},"source":{"type":"string","enum":["research"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"as_of":{"type":"string","format":"date-time"}},"required":["name","value","source","url","as_of"]},"maxItems":4},"source":{"type":"string","minLength":1,"maxLength":300},"awaiting":{"type":"boolean"},"complete":{"type":"boolean"}},"required":["subject","revision","facts"]}}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No matching active call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/calls/{callId}/visitor-brand":{"get":{"tags":["AgentRuntime"],"summary":"Read the cached brand colours of an active call's visitor company","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Cache-only; never starts a lookup. Null means no usable brand is available for this call, so stop polling; a brand found later, such as after an email given mid-call, is pushed to the call","content":{"application/json":{"schema":{"type":"object","properties":{"visitor_brand":{"$ref":"#/components/schemas/VisitorBrand"}},"required":["visitor_brand"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No matching active call, or the brand lookup is still pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/calls/{callId}/web-search":{"post":{"tags":["AgentRuntime"],"summary":"Search the public web for an active call's agent","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200},"purpose":{"type":"string","maxLength":300}},"required":["query"]}}}},"responses":{"200":{"description":"Up to five public results; an empty list means nothing useful was found","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"publishDate":{"type":"string","nullable":true},"excerpts":{"type":"array","items":{"type":"string"}}},"required":["url","publishDate","excerpts"]}}},"required":["results"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No active call with research on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Search provider failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent-configs/{agentId}/runtime-status":{"get":{"tags":["AgentConfigs"],"summary":"Get the published runtime pin","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Runtime status without configuration bodies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRuntimeStatus"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/agent-configs":{"get":{"tags":["AgentConfigs"],"summary":"List agent config versions","description":"Returns config versions for the authenticated user's organization","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum snapshots to return (1–100). Omit for full history; use agentId with limit=1 for the latest snapshot of an agent."},"required":false,"description":"Maximum snapshots to return (1–100). Omit for full history; use agentId with limit=1 for the latest snapshot of an agent.","name":"limit","in":"query"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"string","example":"1","description":"Filter by agent ID"},"required":false,"description":"Filter by agent ID","name":"agentId","in":"query"},{"schema":{"type":"string","enum":["true"],"example":"true","description":"`true` returns only versions that were published at some point; `limit` then counts those. Omit for all."},"required":false,"description":"`true` returns only versions that were published at some point; `limit` then counts those. Omit for all.","name":"published","in":"query"}],"responses":{"200":{"description":"List of agent config versions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfigVersionListResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"post":{"tags":["AgentConfigs"],"summary":"Create an agent config version","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentConfigBody"}}}},"responses":{"201":{"description":"Agent config version created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfigVersionResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]}},"/agent-configs/{agentId}/validate":{"post":{"tags":["Agent Configs"],"summary":"Dry-run a config write","description":"Runs the same resolution and validation a real publish runs, and writes nothing. Returns the exact config that would be persisted, or the reasons it would be rejected.","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateAgentConfigBody"}}}},"responses":{"200":{"description":"The outcome of the dry run. A rejected config is still a 200 — it is the answer, not a failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateAgentConfigResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]}},"/agent-configs/apply":{"post":{"tags":["Agent Configs"],"summary":"Compare-and-swap a compiled config onto the agent a source tree names","description":"Replaces the entire config with the compiled source tree; omitted fields are removed or reset to schema defaults. Targets the agent by the slug the tree declares and creates it when absent. A dry run writes nothing and uses the same replacement, slug checks, and validation as a real apply, including for an agent that does not exist yet. `created` reports what the call did and is always false on a dry run; `wouldCreate` reports whether a real apply would bring the agent into existence.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyBySlugBody"}}}},"responses":{"200":{"description":"The reconciliation outcome. `created` marks the sync that made the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyAgentConfigResponse"}}}},"400":{"description":"Publishing CLI is older than the supported minimum","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The agent moved since the caller read it, or the slug belongs to another org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyAgentConfigConflict"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]}},"/agent-configs/{id}":{"get":{"tags":["AgentConfigs"],"summary":"Get agent config version by ID","parameters":[{"schema":{"type":"string","format":"uuid","example":"4b5a44c3-62d3-4f14-9d79-8e47e991a5f0"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Agent config version found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfigVersionResponse"}}}},"400":{"description":"Invalid config id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Config version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/agent-configs/{agentId}/draft":{"get":{"tags":["AgentConfigs"],"summary":"Get open draft for agent","description":"Returns the single open draft version for this agent, or 404 if none","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Open draft","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"$ref":"#/components/schemas/AgentConfigDraft"}},"required":["draft"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"post":{"tags":["AgentConfigs"],"summary":"Upsert open draft for agent","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAgentConfigDraftBody"}}}},"responses":{"200":{"description":"Draft saved","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"$ref":"#/components/schemas/AgentConfigDraft"}},"required":["draft"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Draft conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]},"patch":{"tags":["AgentConfigs"],"summary":"Apply an RFC 6902 patch to the open draft","description":"Sable-only raw JSON editing of the journey and guidelines. Ops must target `/instructions` or below — publish merges only that subtree onto the live config, so an edit elsewhere would be saved and then discarded. Applies a JSON Patch batch to the agent's open draft — seeding from the committed config when no draft is open — then validates the result against the config schema AND the journey graph before writing. All-or-nothing: a failed `test` op, an unresolvable pointer, or a transition left pointing at a step that does not exist aborts the whole batch and writes nothing. Pair every mutating op with a `test` op — array indices shift under concurrent edits.","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAgentConfigDraftBody"}}}},"responses":{"200":{"description":"Patch applied (or, with dryRun, validated and discarded)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAgentConfigDraftResponse"}}}},"400":{"description":"Patch could not be applied, or the result is not a valid config or journey","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — raw config patching requires agents:configure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Draft conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]},"delete":{"tags":["AgentConfigs"],"summary":"Discard open draft","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Discarded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscardDraftResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agent-configs/{id}/publish":{"post":{"tags":["AgentConfigs"],"summary":"Publish a draft config version","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishAgentConfigBody"}}}},"responses":{"200":{"description":"Published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfigVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Publish conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Could not build the frozen runtime environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{agentId}/source-proposals/guide":{"get":{"tags":["Copilot"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Toolbelt source format and host scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotSourceAuthoringGuide"}}}},"400":{"description":"Invalid source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or proposal not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Agent changed while validating source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Source proposal exceeds size limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{agentId}/source-proposals":{"post":{"tags":["Copilot"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotSourceProposalBody"}}}},"responses":{"200":{"description":"Private source proposal receipt; nothing published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotSourceProposalReceipt"}}}},"400":{"description":"Invalid source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or proposal not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Agent changed while validating source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Source proposal exceeds size limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{agentId}/source-proposals/{id}":{"get":{"tags":["Copilot"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Private source proposal owned by this caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotSourceProposalArtifact"}}}},"400":{"description":"Invalid source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or proposal not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Agent changed while validating source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Source proposal exceeds size limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agent-runtime/revisions/{revision}":{"get":{"tags":["AgentRuntime"],"summary":"Compare a runtime revision with main (requires `runtime:read`)","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"required":true,"name":"revision","in":"path"}],"responses":{"200":{"description":"Comparison with main, or null when unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeRevisionStatusResponse"}}}},"400":{"description":"Invalid revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `runtime:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["runtime:read"]}]}},"/agent-runtime/revisions/{revision}/changelog":{"get":{"tags":["AgentRuntime"],"summary":"List the runtime changelog entries between a revision and main (requires `runtime:read`)","description":"What an agent pinned to `revision` would gain by moving to `head` (main by default): the runtime's `changelog.d/` entries merged since, from the changelog its main publishes, plus commits without one. `changelog` is null when that changelog is unavailable or `head` is not in its published main history.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"required":true,"name":"revision","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"The revision an update would install; defaults to main"},"required":false,"description":"The revision an update would install; defaults to main","name":"head","in":"query"}],"responses":{"200":{"description":"Changelog since the revision, or null when unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeChangelogResponse"}}}},"400":{"description":"Invalid revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `runtime:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["runtime:read"]}]}},"/agent-runtime/deployments":{"get":{"tags":["AgentRuntime"],"summary":"Where every production journey on the runtime runs (requires `runtime:read`)","description":"Brain-routed, published journeys not labelled `test`, grouped by pinned revision or by the environment an unpinned journey follows, each placed on main. `deployments` is null when the published changelog is unavailable.","responses":{"200":{"description":"Deployment groups, most commits behind first, or null when unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeDeploymentsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `runtime:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["runtime:read"]}]}},"/agent-runtime/pins/{revision}":{"get":{"tags":["AgentRuntime"],"summary":"List the production agents pinned to a runtime revision (requires `runtime:read`)","description":"Brain-routed, published agents not labelled `test` whose version is `locked-<revision>` or `rev-<revision>`. A lock past its expiry is left out, since calls no longer honour its pin.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"required":true,"name":"revision","in":"path"}],"responses":{"200":{"description":"The agents pinned to the revision, possibly none","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimePinsResponse"}}}},"400":{"description":"Invalid revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `runtime:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["runtime:read"]}]}},"/agent-runtime/history":{"get":{"tags":["AgentRuntime"],"summary":"Page through runtime main's history with changelog entries (requires `runtime:read`)","description":"Newest first, 100 commits a page. `history` is null when the published changelog is unavailable.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"Keep pages aligned to the first page's head"},"required":false,"description":"Keep pages aligned to the first page's head","name":"head","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"}],"responses":{"200":{"description":"One page of history, or null when unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeHistoryResponse"}}}},"400":{"description":"Invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `runtime:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["runtime:read"]}]}},"/agent-runtime/revisions/{revision}/changelog/summary":{"get":{"tags":["AgentRuntime"],"summary":"Summarize the runtime changelog between a revision and main (requires `runtime:read`)","description":"A short model-written brief of the same entries. Separate so the entries never wait on the model.","parameters":[{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0"},"required":true,"name":"revision","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"1f0e3dad99908345f7439f8ffabdffc4189de6a0","description":"The revision an update would install; defaults to main"},"required":false,"description":"The revision an update would install; defaults to main","name":"head","in":"query"}],"responses":{"200":{"description":"Summary, or null when there is nothing to summarize or it is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeChangelogSummaryResponse"}}}},"400":{"description":"Invalid revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `runtime:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["runtime:read"]}]}},"/agent-runtime/revision":{"get":{"tags":["AgentRuntime"],"summary":"Get the runtime image today's sessions run (requires `runtime:read`)","description":"The revision a config frozen right now would be pinned to, read off the serving sandbox environment in Brain's catalog, with the name of that environment. `current` is null when the catalog names no environment reporting a usable revision. Supply an agent or deployment link to resolve its effective Runtime pin or the promoted sandbox revision.","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"env","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"agent","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"linkRef","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"configId","in":"query"},{"schema":{"type":"string","enum":["true"]},"required":false,"name":"unpublishedDraft","in":"query"}],"responses":{"200":{"description":"The revision on offer, or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentRuntimeRevisionResponse"}}}},"400":{"description":"Invalid selector combination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `runtime:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found or hidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Deployment link disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Brain's environment catalog could not be read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["runtime:read"]}]}},"/agents/{slug}/runtime":{"get":{"tags":["AgentRuntime"],"summary":"Get agent runtime configuration by slug","description":"Returns the agent's latest published config. This endpoint is designed for agent applications to fetch runtime configuration. Gateway-public and unauthenticated for its ordinary, param-free use. The optional `browserContext` query param additionally requires a valid service token — present without one, the request is rejected 401 rather than silently served without it. `visitor_context` (link- or browser-derived) is served only to a caller presenting a valid service token; an unauthenticated caller gets the same config minus that field. The pre-call form's own answers travel the same way, in the `X-Sable-Visitor` header, and take precedence over link or CRM facts with the same name. `continuationKey` also requires service authentication and requests browser-scoped call history compatible with the final call configuration.","parameters":[{"schema":{"type":"string","example":"demo-agent","description":"Agent slug or public ID (e.g. agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a)"},"required":true,"description":"Agent slug or public ID (e.g. agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a)","name":"slug","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Call UUID assigned during setup. Requires service authentication; used to authorize the issued participant profile."},"required":false,"description":"Call UUID assigned during setup. Requires service authentication; used to authorize the issued participant profile.","name":"callId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","description":"Optional agent config version ID to use instead of the agent's default config. Useful for testing draft configs."},"required":false,"description":"Optional agent config version ID to use instead of the agent's default config. Useful for testing draft configs.","name":"configId","in":"query"},{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Service-only fingerprint of the final call config, including a selected preview."},"required":false,"description":"Service-only fingerprint of the final call config, including a selected preview.","name":"continuationKey","in":"query"},{"schema":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Browser id (a UUID; any other value is ignored) to resolve a prior claim's context for, scoped to the requested agent's organization. Requires a valid service token — present without one, the request is rejected. The ordinary param-free read stays unauthenticated."},"required":false,"description":"Browser id (a UUID; any other value is ignored) to resolve a prior claim's context for, scoped to the requested agent's organization. Requires a valid service token — present without one, the request is rejected. The ordinary param-free read stays unauthenticated.","name":"browserContext","in":"query"},{"schema":{"type":"string","enum":["meeting"],"description":"Where the call is taken. `meeting` is a call the agent joins through a bot, on Zoom or Google Meet: the room's audio is a mic nobody releases, so the mic interaction is served as always-on whatever the web page uses.","example":"meeting"},"required":false,"description":"Where the call is taken. `meeting` is a call the agent joins through a bot, on Zoom or Google Meet: the room's audio is a mic nobody releases, so the mic interaction is served as always-on whatever the web page uses.","name":"callMode","in":"query"},{"schema":{"type":"string","description":"With `callMode=meeting`, the meeting bot the call runs in, so the agent is told which platform the meeting is on. A bot sent for another agent, or on any other call, is ignored.","example":"mb_AJccATyJDeQYZoaXaEc6b"},"required":false,"description":"With `callMode=meeting`, the meeting bot the call runs in, so the agent is told which platform the meeting is on. A bot sent for another agent, or on any other call, is ignored.","name":"bot","in":"query"},{"schema":{"type":"string","description":"The link ref carried by a `/r/<ref>` rewrite. An active internal link of this agent lets Sable's own calls load the runtime even when the agent is turned off."},"required":false,"description":"The link ref carried by a `/r/<ref>` rewrite. An active internal link of this agent lets Sable's own calls load the runtime even when the agent is turned off.","name":"viaLinkRef","in":"query"},{"schema":{"type":"string","example":"eyJuYW1lIjoiSWRvIENvaGVuIn0","description":"base64url of `{name?, company?, email?, company_domain?, form_answers?, country?, time_zone?, submitted?}` — the visitor's own answers to the pre-call form (`form_answers` maps each custom question's label to its answer), plus the ISO country code from their network and their browser's IANA time zone, served as their country's name and local weekday and time. `submitted: false` marks values the visitor has not submitted on this page: every typed field is then ignored and only the country and time zone are read. Bounded at 8 KB; anything larger, or not canonical base64url of a JSON object, is read as absent. Requires a valid service token — present without one, the request is rejected 401. Served as `visitor_context` only when no link names the visitor."},"required":false,"description":"base64url of `{name?, company?, email?, company_domain?, form_answers?, country?, time_zone?, submitted?}` — the visitor's own answers to the pre-call form (`form_answers` maps each custom question's label to its answer), plus the ISO country code from their network and their browser's IANA time zone, served as their country's name and local weekday and time. `submitted: false` marks values the visitor has not submitted on this page: every typed field is then ignored and only the country and time zone are read. Bounded at 8 KB; anything larger, or not canonical base64url of a JSON object, is read as absent. Requires a valid service token — present without one, the request is rejected 401. Served as `visitor_context` only when no link names the visitor.","name":"x-sable-visitor","in":"header"}],"responses":{"200":{"description":"Agent runtime configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRuntimeResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"browserContext, continuationKey or X-Sable-Visitor was supplied without a valid service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Selected agent configuration is malformed, including a requested draft version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/published-config":{"get":{"tags":["AgentRuntime"],"summary":"Get published config for dispatch","description":"Returns the agent's latest published config. Used by dispatch to fetch runtime config.","parameters":[{"schema":{"type":"string","example":"1","description":"Numeric ID, public ID, or slug"},"required":true,"description":"Numeric ID, public ID, or slug","name":"id","in":"path"},{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","description":"Optional exact agent config version ID to return instead of the latest published config"},"required":false,"description":"Optional exact agent config version ID to return instead of the latest published config","name":"configId","in":"query"}],"responses":{"200":{"description":"Agent published config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRuntimeResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Selected agent configuration is malformed, including a requested draft version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{slug}/browser-profile":{"get":{"tags":["AgentRuntime"],"summary":"Whether a browser already has a profile in the agent's organization","description":"Service-to-service endpoint for the call page: answers whether the browser has a non-revoked profile in the requested agent's organization, with the profile's first name and company. Never answers for another organization, and never returns an email address.","parameters":[{"schema":{"type":"string","example":"demo-agent","description":"Agent slug or public ID (e.g. agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a)"},"required":true,"description":"Agent slug or public ID (e.g. agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a)","name":"slug","in":"path"},{"schema":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Browser id (a UUID; any other value is read as absent, which answers known: false)."},"required":false,"description":"Browser id (a UUID; any other value is read as absent, which answers known: false).","name":"browserContext","in":"query"}],"responses":{"200":{"description":"Whether the browser is known here","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserProfileResponse"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/skills":{"get":{"tags":["AgentRuntime"],"summary":"Get the org's skill documents for an agent","description":"Service-to-service endpoint serving the owning org's verified skill documents — org knowledge never rides the public runtime envelope. Independent of any config version: the config a session runs decides whether the documents are used.","parameters":[{"schema":{"type":"string","example":"1","description":"Numeric ID, public ID, or slug"},"required":true,"description":"Numeric ID, public ID, or slug","name":"id","in":"path"}],"responses":{"200":{"description":"The org's verified skill documents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillsResponse"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A verified skill document could not be supplied — a partial catalog is a failure, not a smaller success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/by-correlation/{correlationId}":{"get":{"tags":["Agent Tests"],"summary":"Get transcript session by correlation ID","parameters":[{"schema":{"type":"string","pattern":"^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sim:[A-Za-z0-9:._-]{1,250})$/i","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"correlationId","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Session found for correlation ID","content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"number","example":123}},"required":["sessionId"]}}}},"404":{"description":"Session not yet created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read"]}]}},"/agents/{id}/company-qualification":{"post":{"tags":["Agents"],"summary":"Assess a company against published rules without a call (Sable admins or apps in Sable's organization only)","operationId":"assessAgentCompany","x-sable":{"kind":"exception","reason":"Runs provider research and qualification against published agent rules for supplied company input; the computed assessment is not a persisted dataset resource."},"parameters":[{"schema":{"type":"string","example":"1","description":"Numeric ID, public ID, or slug"},"required":true,"description":"Numeric ID, public ID, or slug","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+(?:[a-z]{2,63}|xn--[a-z0-9](?:[a-z0-9-]{0,57}[a-z0-9])?)$"},"email":{"type":"string","maxLength":320,"format":"email"}},"required":["domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"Assessment only; never books, cancels or contacts anyone","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["pending","needs_info","qualified","unqualified"]},"sure":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"verdict":{"type":"string","enum":["yes","no","unsure"]},"reason":{"type":"string"}},"required":["id","verdict"]}}},"required":["state","sure","missing","criteria"]}}}},"400":{"description":"Invalid company or no published qualification rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]},{"anyOf":["agents:configure"]}]}},"/agents":{"get":{"tags":["Agents"],"summary":"List agents","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview results as if authenticated as this role"},"required":false,"description":"Sable-admin-only: preview results as if authenticated as this role","name":"asRole","in":"query"}],"responses":{"200":{"description":"List of agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"post":{"tags":["Agents"],"summary":"Create an agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentBody"}}}},"responses":{"201":{"description":"Agent created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — TTS_PROVIDER_RESTRICTED when a non-Sable caller's config uses a TTS provider other than Cartesia or realtime (`none`), or agents:configure is required for a non-production deployEnvironment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}":{"get":{"tags":["Agents"],"summary":"Get an agent by ID, public ID, or slug","description":"Accepts a numeric ID, public ID (agt_...), or slug","parameters":[{"schema":{"type":"string","example":"1","description":"Numeric ID, public ID, or slug"},"required":true,"description":"Numeric ID, public ID, or slug","name":"id","in":"path"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview results as if authenticated as this role"},"required":false,"description":"Sable-admin-only: preview results as if authenticated as this role","name":"asRole","in":"query"}],"responses":{"200":{"description":"Agent details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Invalid agent ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"put":{"tags":["Agents"],"summary":"Update an agent","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentBody"}}}},"responses":{"200":{"description":"Agent updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — TTS_PROVIDER_RESTRICTED when a non-Sable caller changes the voice onto a TTS provider other than Cartesia or realtime (`none`), or agents:configure is required for the fields sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]},"delete":{"tags":["Agents"],"summary":"Delete an agent (soft delete)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Agent deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:delete"]}]}},"/agents/{id}/duplicate":{"post":{"tags":["Agents"],"summary":"Duplicate an agent","description":"Deep-clones an agent's latest published config version into a new agent in the same org. Preserves its runtime pin. Active locked agents are copied as locked published versions with the same lock expiry; other copies start as drafts. Skips runtime/history data. Returns the new agent.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateAgentBody"}}}},"responses":{"201":{"description":"Agent duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Invalid request body or source has no config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/language-voices/preview":{"post":{"tags":["Agents"],"summary":"Which voice would speak each language for this voice setup","description":"Resolves a voice setup (main voice plus extra voices) against the voice catalog without saving it, for the Persona tab.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguageVoicesPreviewBody"}}}},"responses":{"200":{"description":"Rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguageVoicesPreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/agents/{id}/accounts":{"get":{"tags":["Agents","Accounts"],"summary":"List accounts bound to this agent","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Accounts the agent is allowed to claim browser sessions with","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAccountListResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"post":{"tags":["Agents","Accounts"],"summary":"Bind an account to this agent","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachAccountToAgentBody"}}}},"responses":{"200":{"description":"Updated list of accounts bound to this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAccountListResponse"}}}},"400":{"description":"Org mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already bound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/accounts/{accountId}":{"delete":{"tags":["Agents","Accounts"],"summary":"Unbind an account from this agent","description":"Idempotent — succeeds even if the binding does not exist.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Account ID"},"required":true,"description":"Account ID","name":"accountId","in":"path"}],"responses":{"200":{"description":"Updated list of accounts bound to this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAccountListResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/branding":{"patch":{"tags":["Agents"],"summary":"Update agent branding overrides","description":"Sparse update of agent-level branding overrides. Setting a field to null removes the override.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentBrandingBody"}}}},"responses":{"200":{"description":"Agent with updated branding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/follow-up-email":{"patch":{"tags":["Agents"],"summary":"Set whether the agent follows up with the caller","description":"Flip the post-call follow-up email to the person who took the call. Gated on `integrations:write` rather than `agents:write`: it mails the organization's own customers, so it sits behind the outbound-integration permission rather than agent authoring.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentFollowUpEmailBody"}}}},"responses":{"200":{"description":"Agent with the updated follow-up email setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/agents/{id}/maintenance":{"patch":{"tags":["Agents"],"summary":"Set agent maintenance mode","description":"Flip whether the agent is in maintenance. true = offline (parley shows MaintenanceScene).","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentMaintenanceBody"}}}},"responses":{"200":{"description":"Agent with updated maintenance mode","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/disabled":{"put":{"tags":["Agents"],"summary":"Turn an agent off or back on","description":"true = turned off: its public id, slug and links show the \"no longer active\" screen and calls are refused with 410 AGENT_DISABLED. false = back on.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentDisabledBody"}}}},"responses":{"200":{"description":"Agent with the updated disabled flag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/freeze":{"put":{"tags":["Agents"],"summary":"Lock or unlock journey configuration (Sable admin only)","description":"Lock or unlock journey configuration. The existing /freeze route and frozen field control locking: frozen=false unlocks while preserving the runtime pin. Updating env requires an unlocked journey and creates a new published version with the same configuration. Requires a signed-in platform session: CLI OAuth tokens and service tokens are refused, even for Sable admins.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAgentFreezeBody"}}}},"responses":{"200":{"description":"Updated agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"403":{"description":"Sable admin session required (machine credentials are refused)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Journey is locked, changed, or has an unpublished draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/stage":{"put":{"tags":["Agents"],"summary":"Take an agent live or offline (Sable only)","description":"Sets whether people outside Sable may reach the agent (`live`) or not yet (`draft`), with the reason. Idempotent: the same stage again changes nothing and records nothing. It changes nothing else: labels stay as they are. Requires a person: a signed-in platform session or a person's CLI login. Service tokens and other machine credentials are refused.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAgentStageBody"}}}},"responses":{"200":{"description":"Agent with its stage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"403":{"description":"agents:configure required, or a machine credential (only a person may change the stage)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"AGENT_STAGE_BLOCKED_BY_DEPLOY_ENVIRONMENT when going live while deployEnvironment is test","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]}},"/agent-summaries":{"get":{"tags":["Agents"],"summary":"List agent navigation and grading metadata without configurations","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview results as if authenticated as this role"},"required":false,"description":"Sable-admin-only: preview results as if authenticated as this role","name":"asRole","in":"query"}],"responses":{"200":{"description":"Active agents, newest-created first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSummaryListResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/agents/{id}/journey":{"get":{"tags":["Agents"],"summary":"Read the journey of an agent authored from a journey.md","description":"Parses the open draft when one exists, else the published config, the same choice the Canvas makes. Returns `kind: canvas` for any other agent, which the Canvas shows instead.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The journey, or the signal that the Canvas shows this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentJourneyResponse"}}}},"400":{"description":"Invalid agent ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/agents/{id}/extraction/backfill":{"post":{"tags":["Agents","Extraction"],"summary":"Re-run structured extraction over an agent's past sessions (Sable admin only)","description":"Finds ended sessions of this agent whose extraction never reached a terminal state and drives each through the standard `session.insights` enqueue path. For agents whose extraction fields were authored (or corrected) after calls already happened. Bounded by `limit` (default 120, max 500): job dispatch is immediate, so the batch bounds how many jobs one call dispatches. Idempotent — a session with a live or succeeded extraction job is not rescanned, so re-running enqueues nothing until the backlog moves.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":120,"description":"Max sessions to enqueue this run — the peak concurrency of the burst."},"required":false,"description":"Max sessions to enqueue this run — the peak concurrency of the burst.","name":"limit","in":"query"}],"responses":{"200":{"description":"Backfill report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionBackfillReport"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{publicId}/pronunciation/candidates":{"post":{"tags":["Pronunciation"],"summary":"Suggest spellings for a word the agent says wrong","parameters":[{"schema":{"type":"string","example":"agt_XnL7TQXyHLKph4edh2Zzn"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationCandidatesBody"}}}},"responses":{"200":{"description":"Candidate spellings, plus real lines the agent has said","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationCandidatesResponse"}}}},"400":{"description":"Term too long, or the recording is not a WAV file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{publicId}/pronunciation/preview":{"post":{"tags":["Pronunciation"],"summary":"Render candidate lines on the agent's own voice","parameters":[{"schema":{"type":"string","example":"agt_XnL7TQXyHLKph4edh2Zzn"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationPreviewBody"}}}},"responses":{"200":{"description":"Temporary audio URLs, one per submitted line","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationPreviewResponse"}}}},"400":{"description":"Text too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Batch preview needs permission to make changes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"This agent's voice cannot be previewed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Voice provider failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Too many voice previews in flight; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/agents/{id}/links":{"get":{"tags":["Agents","Links"],"summary":"List links bound to this agent, or every link in its org","description":"`scope=agent` (default) returns just this agent's links. `scope=org` returns every link in the org, any status, on any agent — each row tagged with its owning agent's id and name — for an org-wide Link↔Agent view, and is not paginated. `scope=agent` is keyset-paginated when `limit` is sent (`limit`, `cursor`) and returns every link without it; it supports `q`, `status`, `kind` and `sort`; it adds `nextCursor`, `total` and `matched` to the response.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["agent","org"],"default":"agent","example":"agent","description":"`agent` (default) lists only this agent's links. `org` lists every link across the org."},"required":false,"description":"`agent` (default) lists only this agent's links. `org` lists every link across the org.","name":"scope","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"`scope=agent` only. Page size. Omit it to get every link in one response, as before pagination existed."},"required":false,"description":"`scope=agent` only. Page size. Omit it to get every link in one response, as before pagination existed.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":2048,"description":"`scope=agent` only. `nextCursor` of the previous page."},"required":false,"description":"`scope=agent` only. `nextCursor` of the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"`scope=agent` only. Case-insensitive substring match on ref, name and identity email. LIKE wildcards are literal."},"required":false,"description":"`scope=agent` only. Case-insensitive substring match on ref, name and identity email. LIKE wildcards are literal.","name":"q","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["active","disabled","redirect","maintenance"]},"maxItems":4,"description":"`scope=agent` only. Repeatable. Buckets are disjoint: `active` = status active and not in maintenance; `maintenance` = status active with maintenance on; `disabled` and `redirect` match on status alone (a disabled link with a leftover maintenance flag is `disabled`). Multiple values are OR-ed."},"required":false,"description":"`scope=agent` only. Repeatable. Buckets are disjoint: `active` = status active and not in maintenance; `maintenance` = status active with maintenance on; `disabled` and `redirect` match on status alone (a disabled link with a leftover maintenance flag is `disabled`). Multiple values are OR-ed.","name":"status","in":"query"},{"schema":{"type":"string","enum":["customer","internal"],"description":"`scope=agent` only. Lists links of this kind alone; `total` and `matched` then count that kind. `internal` returns nothing to a caller without `agents:configure`."},"required":false,"description":"`scope=agent` only. Lists links of this kind alone; `total` and `matched` then count that kind. `internal` returns nothing to a caller without `agents:configure`.","name":"kind","in":"query"},{"schema":{"type":"string","enum":["created_desc","created_asc","name"],"default":"created_desc","description":"`scope=agent` only. `created_desc` (default), `created_asc`, or `name` (case-insensitive, unnamed last, ref tiebreak)."},"required":false,"description":"`scope=agent` only. `created_desc` (default), `created_asc`, or `name` (case-insensitive, unnamed last, ref tiebreak).","name":"sort","in":"query"}],"responses":{"200":{"description":"Links bound to this agent (`scope=agent`), or every link in its org (`scope=org`)","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeploymentLinkListResponse"},{"$ref":"#/components/schemas/OrgDeploymentLinkListResponse"}]}}}},"400":{"description":"Invalid pagination cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"post":{"tags":["Agents","Links"],"summary":"Mint a new link on this agent, or assign an existing org link to it","description":"`alias` mints a fresh typed ref (`lnk_<hash>_<alias>`) on this agent. `assignRef` atomically moves an existing same-org link onto this agent instead, reactivating it and clearing its pins. The two are mutually exclusive. `kind: internal` needs `agents:configure`; only an internal link takes `pinnedConfigVersionId` or `pinnedEnv`.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeploymentLinkBody"}}}},"responses":{"200":{"description":"Existing link assigned to this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentLinkResponse"}}}},"201":{"description":"New link minted on this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentLinkResponse"}}}},"400":{"description":"Invalid alias, both `alias` and `assignRef` provided, or a pin this link cannot serve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing `agents:write`, or `kind: internal` without `agents:configure`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found, `assignRef` does not resolve to a link in this org, or `pinnedEnv` names no catalog environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"CRM context was requested without an active connection or a mapping on this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/links/assignable":{"get":{"tags":["Agents","Links"],"summary":"List same-org links this agent could take over","description":"Every other same-org link, any status, with its current agent's name — links are org assets, so any of them can be moved here via `assignRef` — plus this agent's own redirect links, flagged `reactivate: true`. Searchable and paginated when `limit` is sent.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Omit it to get every assignable link in one response."},"required":false,"description":"Page size. Omit it to get every assignable link in one response.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"`nextCursor` of the previous page."},"required":false,"description":"`nextCursor` of the previous page.","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Case-insensitive substring match on ref and the owning agent's (journey) name."},"required":false,"description":"Case-insensitive substring match on ref and the owning agent's (journey) name.","name":"q","in":"query"}],"responses":{"200":{"description":"Same-org links on other agents, plus this agent's own redirect links (`reactivate: true`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignableDeploymentLinkListResponse"}}}},"400":{"description":"Invalid pagination cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/agents/{id}/links/{ref}":{"patch":{"tags":["Agents","Links"],"summary":"Update a link's status, maintenance mode, name, context, metadata or pins","description":"`redirect` is permanent — the only way off it is `assignRef` on a `POST /agents/{id}/links` call. Only an internal link takes `pinnedConfigVersionId` or `pinnedEnv`; `null` unpins.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"lnk_4f8c2a_spring-launch","description":"Deployment link ref"},"required":true,"description":"Deployment link ref","name":"ref","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeploymentLinkBody"}}}},"responses":{"200":{"description":"Updated link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentLinkResponse"}}}},"400":{"description":"Illegal status transition, or a pin this link cannot serve","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing `agents:write`, or `kind` changed without `agents:configure`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found, or ref does not belong to this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"CRM context was enabled without an active connection or a mapping on this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/links/internal":{"put":{"tags":["Agents","Links"],"summary":"Get this agent's internal link, creating it when it has none","description":"Returns the agent's oldest active internal link, or creates one. Calling it again returns the same link. A call through an internal link is Sable's own. Requires `agents:configure`.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The agent's internal link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentLinkResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]}},"/links/{ref}/arrival":{"post":{"tags":["Links"],"summary":"Record a redirect link arrival","parameters":[{"schema":{"type":"string","minLength":1,"example":"lnk_4f8c2a_spring-launch"},"required":true,"name":"ref","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordLinkArrivalBody"}}}},"responses":{"200":{"description":"Arrival recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordLinkArrivalResponse"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No active link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Link is in maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/links/{ref}/refresh-context":{"post":{"tags":["Links"],"summary":"Refresh a link's cached CRM context if it has gone stale","description":"Called on link open so the CRM round trip happens while the visitor is still on the page, rather than when they connect. Within the TTL this is a no-op. The connect path reads the cache and never waits on the CRM, so a slow or failed refresh costs context, never the call.","parameters":[{"schema":{"type":"string","minLength":1,"example":"lnk_4f8c2a_spring-launch"},"required":true,"name":"ref","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshLinkContextBody"}}}},"responses":{"200":{"description":"Refresh outcome","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshLinkContextResponse"}}}},"404":{"description":"No such link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Link disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/web-chat/messages":{"post":{"tags":["WebChat"],"summary":"Stream a reply to an anonymous website visitor","description":"Public marketing-site chat, protected by an origin allowlist and durable rate limits.","responses":{"200":{"description":"Server-sent event stream of reply frames"},"400":{"description":"Malformed body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Challenge required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Surface not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/tasks":{"get":{"tags":["Accounts"],"summary":"Profile tasks and each profile's latest result","description":"Read-only checks the organization defines for its profiles. Each runs on every Production profile that doesn't skip it, inside that profile's sign-in check.","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]},"post":{"tags":["Accounts"],"summary":"Add a profile task","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountTaskBody"}}}},"responses":{"201":{"description":"Created task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskResponse"}}}},"400":{"description":"Invalid task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/tasks/{id}":{"patch":{"tags":["Accounts"],"summary":"Edit a profile task","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountTaskBody"}}}},"responses":{"200":{"description":"Updated task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskResponse"}}}},"400":{"description":"Invalid task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]},"delete":{"tags":["Accounts"],"summary":"Delete a profile task and its results","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/tasks/{id}/run":{"post":{"tags":["Accounts"],"summary":"Run a profile task on every profile's next check","description":"Marks every result as due, so each Production profile runs the task on its next sign-in check (within 30 minutes), or right away with Check now.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Task is off, or an outside check reports it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/tasks/{taskId}/skip":{"put":{"tags":["Accounts"],"summary":"Choose whether this profile runs a task","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"taskId","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskSkipBody"}}}},"responses":{"200":{"description":"The profile's result for the task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskResultResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Task or account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/account-task-results/{accountId}":{"put":{"operationId":"putAccountTaskResult","x-sable":{"kind":"resource"},"tags":["Accounts"],"summary":"Set a profile's result for a task, as an outside check found it","description":"For a task created with `reported`. The result replaces the profile's last one for the task if it was read later, and stays in effect until a later one replaces it. It alerts the same way a result from Sable's own check does, and routes calls away while `alerting` if the task does that. Sending the same report again changes nothing and returns the stored result.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"accountId","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskReportBody"}}}},"responses":{"200":{"description":"The profile's result for the task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTaskResultResponse"}}}},"400":{"description":"Invalid result, or observedAt is in the future","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Task or account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The task takes no reported results, was edited after the value was read, or the profile skips it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/account-sign-in-reports/{accountId}":{"put":{"operationId":"putAccountSignInReport","x-sable":{"kind":"resource"},"tags":["Accounts"],"summary":"Set whether a profile is signed in, as an outside check found it","description":"The reading is kept beside the one from Sable's own sign-in check. Sign-out alerts and the call pick go by the newest reading that proved something, from either, and ignore one older than two hours. Sending the same report again changes nothing and returns the stored reading.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"accountId","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSignInReportBody"}}}},"responses":{"200":{"description":"The outside check's reading for the profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSignInReportResponse"}}}},"400":{"description":"Invalid report, or observedAt is in the future","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found, or it has no saved profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/cleanup":{"get":{"tags":["Accounts"],"summary":"Cleanup tasks and which profiles run them","description":"Beta testers only. Cleanup tasks the organization defines, and every profile that runs one. A profile runs a task only once it's turned on for it.","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Cleanup tasks and profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCleanupListResponse"}}}},"400":{"description":"orgId is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]}},"/accounts/cleanup/tasks":{"post":{"tags":["Accounts"],"summary":"Add a cleanup task","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountCleanupTaskBody"}}}},"responses":{"201":{"description":"Created task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCleanupTaskResponse"}}}},"400":{"description":"Invalid task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/cleanup/tasks/{id}":{"patch":{"tags":["Accounts"],"summary":"Edit a cleanup task","description":"Applies from each profile's next call; a call under way keeps the task it started with.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountCleanupTaskBody"}}}},"responses":{"200":{"description":"Updated task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCleanupTaskResponse"}}}},"400":{"description":"Invalid task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]},"delete":{"tags":["Accounts"],"summary":"Delete a cleanup task","description":"Profiles running it stop cleaning up from their next call. Past runs keep their copy of the task.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"orgId is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/cleanup":{"get":{"tags":["Accounts"],"summary":"The cleanup task a profile runs and its latest runs","description":"Beta testers only. After each call on the profile, an agent following its cleanup task undoes what the call did.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Cleanup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCleanupResponse"}}}},"400":{"description":"orgId is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]},"put":{"tags":["Accounts"],"summary":"Turn a cleanup task on for a profile","description":"Beta testers only. A profile runs one cleanup task; this replaces any other. Applies from the next call. `live` needs a planned dry run of the task on this profile first.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutAccountCleanupAssignmentBody"}}}},"responses":{"200":{"description":"The profile's cleanup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCleanupAssignmentResponse"}}}},"400":{"description":"Invalid body or orgId missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account or task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Live mode needs a planned dry run first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]},"delete":{"tags":["Accounts"],"summary":"Turn a profile's cleanup off","description":"Beta testers only. From the next call; a run under way finishes.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"204":{"description":"Turned off"},"400":{"description":"orgId is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found or no cleanup on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts":{"get":{"tags":["Accounts"],"summary":"List accounts for the caller's organization","description":"Without `limit` returns every account as `{accounts}`. With `limit`, returns one page plus `nextCursor`, `total` (matching `q`/`status`) and `totalInOrg`. `include=bindings` adds `agentIds` for callers with `agents:read`.","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50,"description":"Page size. Enables paging."},"required":false,"description":"Page size. Enables paging.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":1024,"description":"Opaque `nextCursor` from the previous page. Pass back with the same `sort`."},"required":false,"description":"Opaque `nextCursor` from the previous page. Pass back with the same `sort`.","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Case-insensitive substring of the alias or public id."},"required":false,"description":"Case-insensitive substring of the alias or public id.","name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Comma-separated statuses to keep: uninitialized, free, claimed, shared.","name":"status","in":"query"},{"schema":{"type":"string","enum":["recent","name"],"description":"`recent` (default): newest first. `name`: alias ascending."},"required":false,"description":"`recent` (default): newest first. `name`: alias ascending.","name":"sort","in":"query"},{"schema":{"type":"string","enum":["bindings"],"description":"`bindings` adds `agentIds` to each account (callers with `agents:read` only)."},"required":false,"description":"`bindings` adds `agentIds` to each account (callers with `agents:read` only).","name":"include","in":"query"}],"responses":{"200":{"description":"List of accounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountListResponse"}}}},"400":{"description":"Invalid query or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]},"post":{"tags":["Accounts"],"summary":"Create an account","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountBody"}}}},"responses":{"201":{"description":"Account created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Account alias already exists in this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/statuses":{"get":{"tags":["Accounts"],"summary":"Saved-profile and Runtime room-lock status for many accounts","description":"Same rules as `GET /accounts/{id}/status`, for up to 200 ids in one request. Ids outside the organization, deleted or unknown are omitted rather than returned as errors.","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"string"},"required":true,"description":"Comma-separated account ids, up to 200.","name":"ids","in":"query"}],"responses":{"200":{"description":"Statuses by id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountStatusesResponse"}}}},"400":{"description":"Invalid ids","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]}},"/accounts/health":{"get":{"tags":["Accounts"],"summary":"Saved sign-in health for the organization's browser profiles","description":"Latest sign-in check per profile and check method. Profiles without a saved snapshot, or not yet checked, are omitted. `enabled` is false when checks do not run in this environment.","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Sign-in health","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountHealthListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Beta access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]}},"/accounts/health/alert-destination":{"get":{"tags":["Accounts"],"summary":"The Slack channel that receives this organization's sign-in and profile task alerts","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"The organization's sign-in alert channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountHealthAlertDestinationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]},"put":{"tags":["Accounts"],"summary":"Send this organization's sign-in and profile task alerts to a Slack channel","description":"The channel must be in the organization's own Aidan workspace (or, for Sable admins, Sable's), not shared with another workspace, and Aidan must be a member. Replacing the channel drops alerts still queued for the old one.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAccountHealthAlertDestinationBody"}}}},"responses":{"200":{"description":"The organization's sign-in alert channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountHealthAlertDestinationResponse"}}}},"400":{"description":"Unusable Slack channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Slack installation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Slack workspace must be reconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]},"delete":{"tags":["Accounts"],"summary":"Stop sending this organization's sign-in and profile task alerts to Slack","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"The organization's sign-in alert channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountHealthAlertDestinationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/accounts/{id}":{"get":{"tags":["Accounts"],"summary":"Get an account by numeric ID","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]},"patch":{"tags":["Accounts"],"summary":"Update an account","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountBody"}}}},"responses":{"200":{"description":"Account updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Account alias already exists in this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]},"delete":{"tags":["Accounts"],"summary":"Delete an account (soft delete, removes profile blob)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Account deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/profile":{"post":{"tags":["Accounts"],"summary":"Record that this account has a saved profile tar (idempotent). Prefer `POST /accounts/{id}/snapshot`, which orchestrates the save end-to-end via nickel-exchange and finalizes implicitly; this endpoint is a recovery path for re-recording metadata after a tar already exists in GCS.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeAccountProfileBody"}}}},"responses":{"200":{"description":"Account updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Invalid request body, profile blob missing, or blob exceeds size cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]},"delete":{"tags":["Accounts"],"summary":"Delete the profile blob on this account","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Profile cleared","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/profile/download-url":{"get":{"tags":["Accounts"],"summary":"Get a short-lived signed download URL for this account's profile tar","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Signed download URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountProfileDownloadUrlResponse"}}}},"404":{"description":"Account not found or no profile uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/snapshot":{"post":{"tags":["Accounts"],"summary":"Capture this account's profile snapshot. Proxies to nickel-exchange's `/account/save` with the server-held checkpoint PIN and the account's server-derived `account_id`, then finalizes the DB row. Use this from the capture dialog — never call the pod's `/save-profile` directly from the browser.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSnapshotBody"}}}},"responses":{"200":{"description":"Snapshot saved and account updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Invalid request body or blob missing/oversize after save","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream nickel snapshot save failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/status":{"get":{"tags":["Accounts"],"summary":"Saved-profile and Runtime room-lock status","description":"DB-only status: uninitialized when no profile snapshot exists; shared for a saved shareable profile; claimed for a saved exclusive profile with a live Runtime room lock; otherwise free. The optional claim carries the lock's room and expiry. This is not a liveness probe or readiness result for a browser claimed by the CLI.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Pool status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountStatus"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:read"]}]}},"/accounts/{id}/health-check":{"post":{"tags":["Accounts"],"summary":"Check this profile's saved sign-in now","description":"Re-judges an unchanged snapshot immediately, or queues a read when the snapshot changed since the last check. A check from the last minute is returned instead of being repeated.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Check result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountHealthCheckResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Beta access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Account has no saved snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Sign-in checks are not enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/nickel-claim":{"post":{"tags":["Accounts"],"summary":"Claim a nickel session bound to this account","description":"Allocates a fresh browser with no request body. When this authorized account has a saved profile, the exchange restores it before returning; otherwise the browser starts clean. Snapshot binding is derived from the account row, never a client-supplied account_id. A non-shareable account is locked to the claimed browser until nickel-unclaim or the session token expires, and answers 409 while a call or another claim holds it; shareable profiles may be claimed concurrently. This claim never attaches to an existing call browser. Returns connection credentials, a server-derived exchangeUrl, and an account/org/session/cell-bound release receipt. Use this route for CLI profile access rather than the generic anonymous claim route.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Claimed nickel session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountNickelClaimResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Account is in use by a call or another claim","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream nickel claim failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Exchange not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/accounts/{id}/nickel-unclaim":{"post":{"tags":["Accounts"],"summary":"Release a browser session claimed for this account","description":"Uses the opaque releaseToken from this account's nickel-claim. The receipt binds the account, organization, session and cell; the exchange credential stays on the server. A successful response means the exchange accepted best-effort cleanup, not confirmed pod deletion. Keep the receipt if release is not confirmed and disconnect the viewer to allow idle expiry.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountNickelUnclaimBody"}}}},"responses":{"200":{"description":"Exchange accepted cleanup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountNickelUnclaimResponse"}}}},"400":{"description":"Invalid or expired release receipt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient account write permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Exchange did not confirm release","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Exchange not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["accounts:write"]}]}},"/agents/{id}/session-resources/replenish":{"post":{"tags":["SessionResources"],"summary":"Ensure the configured session resource reserve and inspect its resources","parameters":[{"schema":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"type":"string","pattern":"^org_[A-Za-z0-9]+$"},"config_id":{"type":"string"},"deployment_preview":{"type":"object","properties":{"pr_number":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"source_sha":{"type":"string","pattern":"^[0-9a-f]{40}$"}},"required":["pr_number","source_sha"],"additionalProperties":false}},"required":["org_id"]}}}},"responses":{"200":{"description":"Pool state","content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"resource_key":{"type":"string","nullable":true},"state":{"type":"string"},"room":{"type":"string","nullable":true},"attempts":{"type":"number"},"last_error":{"type":"string","nullable":true},"retry_after":{"type":"string","nullable":true},"preview_until":{"type":"string","nullable":true}},"required":["id","kind","resource_key","state","room","attempts","last_error","retry_after","preview_until"]}}},"required":["resources"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Preview source changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Invalid preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/prepare-session":{"post":{"tags":["AgentRuntime"],"summary":"Prepare opted-in session inputs for the trusted launcher","parameters":[{"schema":{"type":"string","pattern":"^agt_[A-Za-z0-9]+$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","pattern":"^org_[A-Za-z0-9]+$"},"call_id":{"type":"string","format":"uuid"},"room":{"type":"string","maxLength":128,"pattern":"^room-[A-Za-z0-9-]+$"},"account_id":{"type":"string","description":"Required runtime account when supplied. Figma accepts the creator or a bound, shareable account with live destination access; Notion profile-only preparation accepts an account from profile.account_ids; other resource-pool integrations require the recipe account. Invalid pins return 400; conflicts with an existing reservation return 409."},"config":{"type":"object","additionalProperties":true},"skills":{"allOf":[{"$ref":"#/components/schemas/AgentSkillsResponse"},{"nullable":true}]}},"required":["organization_id","call_id","room","config","skills"]}}}},"responses":{"200":{"description":"Private session inputs","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","additionalProperties":true},"skills":{"allOf":[{"$ref":"#/components/schemas/AgentSkillsResponse"},{"nullable":true}]},"account_id":{"type":"string","description":"Account whose browser profile must run this call. Figma returns the persisted runtime account, falling back to the creator; Notion profile-only preparation returns the selected profile.account_ids account; other resource-pool integrations return the recipe account. Without session preparation, the requested account_id, omitted when none was requested."}},"required":["config","skills"]}}}},"400":{"description":"Invalid preparation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No clean resource ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account-locks/heartbeat":{"post":{"tags":["Accounts"],"summary":"Renew the account claim lock held by a LiveKit room","description":"Pushes the lock's expiry forward by the server-side TTL. Returns 409 when no live lock is held by the room (released, or expired and reclaimed) so the caller stops heartbeating.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLockBody"}}}},"responses":{"200":{"description":"Lock renewed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLockHeartbeatResponse"}}}},"409":{"description":"Lock not held by this room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account-locks/release":{"post":{"tags":["Accounts"],"summary":"Release the account claim lock held by a LiveKit room","description":"Clears the lock so the snapshot is immediately claimable again. Idempotent — returns `released: false` when no lock was held by the room.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLockBody"}}}},"responses":{"200":{"description":"Lock released (or no-op)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLockReleaseResponse"}}}}}}},"/account-claims/{agentId}":{"put":{"operationId":"put_account_claims_agent","x-sable":{"kind":"resource"},"tags":["Accounts"],"summary":"Claim the account of an agent a call switched into","description":"Sets the call's claim on the agent's account: picks and locks one of the agent's bound accounts, as a direct call to that agent would, under a key of its own in the call's room, and returns that key. Putting the same room and agent again returns the same lock. Returns no account when none is bound.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"agt_HzmKnZTmjHjv6Z88wN6RK","description":"Agent to claim for."},"required":true,"description":"Agent to claim for.","name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountClaimBody"}}}},"responses":{"200":{"description":"The claimed account, if any","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountClaimResponse"}}}},"404":{"description":"Agent not found in that org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"All of the agent's accounts are in use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The agent is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account-locks/signin-report":{"post":{"tags":["Accounts"],"summary":"Report the sign-in state of the page a call opened","description":"Judges the call's first page with the sign-in check's rules. A login page records the account as signed out and queues a check that signs its profile back in.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSigninReportBody"}}}},"responses":{"200":{"description":"The page's verdict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSigninReportResponse"}}}},"404":{"description":"The room is not using this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account-locks/signin-credentials":{"post":{"tags":["Accounts"],"summary":"Get the saved login for the account a call is signed out of","description":"Returns the account's saved username and password for the login page's origin, which must be the account's own site or an identity provider. Each release is logged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSigninCredentialsBody"}}}},"responses":{"200":{"description":"The saved login","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSigninCredentialsResponse"}}}},"404":{"description":"No saved login is available for this room and page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent-call-caps/{id}":{"put":{"operationId":"setAgentCallCaps","x-sable":{"kind":"resource"},"tags":["Agents"],"summary":"Set an agent's daily call caps","description":"How many customer calls one caller (browser or email) and one company email domain may start on this agent in 24 hours. null turns a cap off. Sable staff calls are never counted.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAgentCallCapsBody"}}}},"responses":{"200":{"description":"Agent with the updated call caps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"400":{"description":"Invalid body: each cap must be a whole number from 0 to 2147483647, or null to turn it off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"agents:configure required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]}},"/caller-blocks/{sessionId}":{"put":{"operationId":"putCallerBlock","x-sable":{"kind":"resource"},"tags":["Transcripts"],"summary":"Block a call's caller (Sable admin only)","description":"Idempotent. Refuses future calls from this call's browser id and email, with scope=email_domain from every email at the caller's company domain, or with scope=ip from the caller's IP. reach=agent covers the call's agent, reach=org every agent.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["caller","email_domain","ip"],"default":"caller","description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations."},"required":false,"description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations.","name":"scope","in":"query"},{"schema":{"type":"string","enum":["agent","org"],"default":"agent","description":"agent: only the agent this call was with. org: every agent in the org."},"required":false,"description":"agent: only the agent this call was with. org: every agent in the org.","name":"reach","in":"query"}],"responses":{"200":{"description":"Blocked","content":{"application/json":{"schema":{"type":"object","properties":{"blocked":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["browser_id","email","email_domain","ip"]},"value":{"type":"string"}},"required":["kind","value"]}}},"required":["blocked"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing transcripts:delete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Nothing to block in that scope: no browser id or email, no company email domain, no IP kept, or reach=agent on a call with no agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:delete"]}]},"delete":{"operationId":"deleteCallerBlock","x-sable":{"kind":"resource"},"tags":["Transcripts"],"summary":"Unblock a call's caller (Sable admin only)","description":"Idempotent. Lifts the blocks on this call's browser id and email, with scope=email_domain the block on the caller's company email domain, or with scope=ip the block on its IP, both the ones on the call's agent and the org-wide ones.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["caller","email_domain","ip"],"default":"caller","description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations."},"required":false,"description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations.","name":"scope","in":"query"}],"responses":{"200":{"description":"Unblocked","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"integer","minimum":0}},"required":["removed"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing transcripts:delete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:delete"]}]}},"/address-blocks/{sessionId}":{"put":{"operationId":"putAddressBlock","x-sable":{"kind":"resource"},"tags":["Transcripts"],"summary":"Block an email or IP from a call (Sable admin only)","description":"Idempotent. Refuses future calls from this email (scope=caller), every email at its company domain (scope=email_domain) or this ip (scope=ip), whether or not it has called. The call only names the agent: reach=agent covers it, reach=org every agent.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["caller","email_domain","ip"],"default":"caller","description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations."},"required":false,"description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations.","name":"scope","in":"query"},{"schema":{"type":"string","enum":["agent","org"],"default":"agent","description":"agent: only the agent this call was with. org: every agent in the org."},"required":false,"description":"agent: only the agent this call was with. org: every agent in the org.","name":"reach","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","example":"someone@example.com","description":"Any email, not only one that has called. With scope=caller or email_domain."}},"required":["email"],"additionalProperties":false},{"type":"object","properties":{"ip":{"type":"string","maxLength":64,"example":"203.0.113.7","description":"Any IPv4 or IPv6 address; IPv6 is blocked by its /64. Only its keyed hash is stored. With scope=ip."}},"required":["ip"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Blocked","content":{"application/json":{"schema":{"type":"object","properties":{"blocked":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["browser_id","email","email_domain","ip"]},"value":{"type":"string"}},"required":["kind","value"]}}},"required":["blocked"]}}}},"400":{"description":"Invalid request parameters, or an address that doesn't match the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing transcripts:delete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Nothing to block in that scope: a free-mail domain, or reach=agent on a call with no agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A named ip, and IP blocks are not configured in this environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:delete"]}]},"delete":{"operationId":"deleteAddressBlock","x-sable":{"kind":"resource"},"tags":["Transcripts"],"summary":"Unblock an email or IP from a call (Sable admin only)","description":"Idempotent. Lifts the block on this email, with scope=email_domain on its company domain, or with scope=ip on this ip, both the one on the call's agent and the org-wide one.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["caller","email_domain","ip"],"default":"caller","description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations."},"required":false,"description":"On /address-blocks these name the body's address instead of the call's caller. caller: the call's browser id and email. email_domain: every email at that email's company domain. ip: the caller's IP (IPv6 by its /64), which also refuses anyone else on that network except Sable staff, the org's members and simulations.","name":"scope","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","example":"someone@example.com","description":"Any email, not only one that has called. With scope=caller or email_domain."}},"required":["email"],"additionalProperties":false},{"type":"object","properties":{"ip":{"type":"string","maxLength":64,"example":"203.0.113.7","description":"Any IPv4 or IPv6 address; IPv6 is blocked by its /64. Only its keyed hash is stored. With scope=ip."}},"required":["ip"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Unblocked","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"integer","minimum":0}},"required":["removed"]}}}},"400":{"description":"Invalid request parameters, or an address that doesn't match the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing transcripts:delete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A named ip, and IP blocks are not configured in this environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:delete"]}]}},"/participant-profiles/sync":{"post":{"tags":["Participant profiles"],"summary":"Persist finalized caller turns and read the latest call-bound profile","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","format":"uuid"},"binding_id":{"type":"string","format":"uuid"},"generation":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"profile_snapshots":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"generation":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"revision":{"type":"integer","minimum":0,"maximum":2147483647},"observed_at":{"type":"string","format":"date-time"},"text":{"type":"string","nullable":true}},"required":["sequence","generation","revision","observed_at","text"],"additionalProperties":false},"maxItems":16},"form":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"value":{"type":"string","maxLength":16000}},"required":["name","value"],"additionalProperties":false},"maxItems":100},"turns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":150},"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"text":{"type":"string","minLength":1,"maxLength":16000},"observed_at":{"type":"string","format":"date-time"},"dialogue":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","agent"]},"text":{"type":"string","minLength":1,"maxLength":2000}},"required":["role","text"],"additionalProperties":false},"maxItems":6}},"required":["id","text","observed_at"],"additionalProperties":false},"maxItems":16}},"required":["call_id","binding_id","generation","turns"],"additionalProperties":false}}}},"responses":{"200":{"description":"Durable evidence acknowledged; latest profile snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true]},"participant_profile":{"type":"object","properties":{"schema_version":{"type":"number","enum":[1]},"binding_id":{"type":"string","format":"uuid"},"generation":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"revision":{"type":"integer","minimum":0,"maximum":2147483647},"content":{"type":"object","nullable":true,"properties":{"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":120},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"text":{"type":"string","minLength":1,"maxLength":2000},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["crm","custom_link","form","call","web","unknown"]},"id":{"type":"string","minLength":1,"maxLength":300}},"required":["type","id"],"additionalProperties":false},"minItems":1,"maxItems":64}},"required":["id","text"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["key","title","items"],"additionalProperties":false},"maxItems":20},"card":{"type":"object","properties":{"location":{"type":"object","properties":{"value":{"type":"object","properties":{"city":{"type":"string","maxLength":128},"region":{"type":"string","maxLength":8},"country":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"whyTheyCame":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"whatMatters":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1,"maxItems":3},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"outcome":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"nextStep":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"title":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":120},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"profileUrl":{"type":"object","properties":{"value":{"type":"string","maxLength":1024,"format":"uri"},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"photo":{"type":"object","properties":{"value":{"type":"string","maxLength":1024,"format":"uri"},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"basedIn":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":120},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"background":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"links":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string","maxLength":1024,"format":"uri"},"minItems":1,"maxItems":3},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"enrichedFor":{"type":"string","pattern":"^[a-f0-9]{64}$"},"enrichPending":{"type":"boolean","enum":[true]}},"additionalProperties":false}},"required":["sections"],"additionalProperties":false},"research_sources":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":64}},"required":["schema_version","binding_id","generation","revision","content"],"additionalProperties":false}},"required":["accepted","participant_profile"]}}}},"400":{"description":"Invalid profile synchronization request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Runtime service credential required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call or profile binding unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/participants/pinned/list":{"get":{"tags":["Participants"],"summary":"List the people with pinned facts or research turned off","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"People with pinned facts or research turned off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinnedList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/participants/pinned":{"get":{"tags":["Participants"],"summary":"Read the pinned facts for a person","parameters":[{"schema":{"type":"string","maxLength":320,"format":"email"},"required":true,"name":"email","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Pinned facts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinnedRecord"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]},"put":{"tags":["Participants"],"summary":"Replace the pinned facts for a person","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPinnedBody"}}}},"responses":{"200":{"description":"Stored pinned facts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinnedRecord"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/internal/slides/render":{"post":{"tags":["Slides"],"summary":"Render a slide in an agent's brand for a live call","description":"Draws the title and points into the agent's branded slide template, renders it to a 1920x1080 PNG and returns its public address on the assets CDN. The page is drawn in a pooled Nickel pod; 503 when none can draw it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlideRenderBody"}}}},"responses":{"200":{"description":"Slide rendered and hosted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlideRenderResponse"}}}},"400":{"description":"Invalid slide request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The agent's deployment link is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The slide's content does not fit on one slide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slide renderer unavailable, out of time, or the slide could not be stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/slide-packs/upload-url":{"post":{"tags":["Slides"],"summary":"Sign an upload for a slide pack, unless it is already stored","description":"Addresses the zipped pack at `{orgPublicId}/slide-packs/{name}-{sha8}.zip` in the org-assets bucket. Each path is written once: when the pack is already there the answer is `exists` with its address, otherwise `upload` with a signed create-only PUT capped at 8 MiB. 409 when a different pack holds the path.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlidePackUploadUrlBody"}}}},"responses":{"200":{"description":"Where the pack lives, and how to upload it if it is not there yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlidePackUploadUrlResponse"}}}},"400":{"description":"Invalid name, sha256 or size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A different pack is stored at this path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:configure"]}]}},"/agents/{agentId}/calls/{callId}/slides/opening":{"post":{"tags":["AgentRuntime"],"summary":"Make the personalized opening for a live call","description":"Uses only authorized company research and branding. Answers within 10 seconds; no slide prompt or effort is accepted.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"agt_8dM2aJAds7G2DsxGceFXd"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Personalized opening made and hosted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallOpeningResponse"}}}},"400":{"description":"Invalid slide request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No live call with that id, or slides are off for it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The agent's deployment link is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Nothing to show, no template fits, the model declined, or based_on names no slide of this call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many slides are being made at once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The slide was not made in time, or the model or the store failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/calls/{callId}/slides":{"post":{"tags":["AgentRuntime"],"summary":"Make a slide for a live call","description":"A model fills one of the agent's slide-pack templates or designs the slide in its brand, and the page is hosted at an unguessable public address. Answers within 28 s (58 s at high effort).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"agt_8dM2aJAds7G2DsxGceFXd"},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSlideBody"}}}},"responses":{"200":{"description":"Slide made and hosted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSlideResponse"}}}},"400":{"description":"Invalid slide request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No live call with that id, or slides are off for it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The agent's deployment link is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Nothing to show, no template fits, the model declined, or based_on names no slide of this call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many slides are being made at once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The slide was not made in time, or the model or the store failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/branding/manifest":{"get":{"tags":["Branding"],"summary":"Fetch the branding element manifest that drives the platform editor's field panels","description":"Returns the full v2 branding manifest, including Sable-admin-`internal` fields — the platform editor filters those out client-side based on the caller's admin mode.","responses":{"200":{"description":"The branding manifest.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[2]},"elements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"screen":{"type":"string","enum":["identity","login","intro","busy","call","browser","tooltips","outro","certificate","linkPreview"]},"label":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["color","text","textarea","toggle","number","image","font","icon","string-list","onboarding-steps","questions-buckets","questions-list","gradient","intro-mode","rating-style","cta","certificate-slots","certificate-gate","certificate-required-moments","url","form-fields"]},"path":{"type":"string"},"label":{"type":"string"},"hint":{"type":"string"},"description":{"type":"string"},"default":{"nullable":true},"v1":{"type":"string","nullable":true},"internal":{"type":"boolean"},"maxLength":{"type":"number"},"maxItems":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"}},"required":["type","path","label"]}},"style":{"type":"array","items":{"type":"string","enum":["textColor","bgColor","font","fontSize","weight","align"]}}},"required":["id","screen","label","fields"]}}},"required":["version","elements"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/organizations/{id}/brand":{"get":{"tags":["Brands"],"summary":"Look up a company's public brand (name, colours, logos, fonts) by its domain (Sable admins only)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":2048,"example":"stripe.com"},"required":true,"name":"domain","in":"query"}],"responses":{"200":{"description":"The brand, field by field from the richest provider that has it, with each provider's outcome in sources. A pending source is still analysing: ask again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandLookup"}}}},"400":{"description":"Not a domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/brand-overrides/{domain}":{"put":{"operationId":"putBrandOverride","x-sable":{"kind":"resource"},"tags":["Brands"],"summary":"Override a domain's looked-up brand name, colours or logos on every call (Sable admins only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":253,"example":"stripe.com"},"required":true,"name":"domain","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOverride"}}}},"responses":{"200":{"description":"The brand calls now show for the domain; null when neither the override nor the lookup has a primary colour","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"visitor_brand":{"$ref":"#/components/schemas/VisitorBrand"}},"required":["domain","visitor_brand"]}}}},"400":{"description":"Not a domain or invalid override","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteBrandOverride","x-sable":{"kind":"resource"},"tags":["Brands"],"summary":"Remove a domain's brand override, so calls show the looked-up brand again (Sable admins only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":253,"example":"stripe.com"},"required":true,"name":"domain","in":"path"}],"responses":{"204":{"description":"Removed"},"400":{"description":"Not a domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No override","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/certificates/{ref}":{"delete":{"tags":["Certificates"],"summary":"Revoke an issued certificate","description":"Marks the certificate revoked so the public `/certificates/{ref}` read 404s. Idempotent. Sable admins may pass `orgId` to act on another org; a cross-org ref 404s.","parameters":[{"schema":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$","example":"b1QhSjKqL7mZ2nR4tV6xYw"},"required":true,"name":"ref","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"responses":{"204":{"description":"Certificate revoked (or already was)."},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No certificate for this ref in the resolved org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:delete"]}]},"get":{"tags":["Certificates"],"summary":"Fetch an issued completion certificate by its public ref","description":"Unauthenticated read of an issued certificate. Returns the frozen recipient, issuer, issue date, and render design. Revoked certificates return 404.","parameters":[{"schema":{"type":"string","minLength":8,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$","example":"b1QhSjKqL7mZ2nR4tV6xYw"},"required":true,"name":"ref","in":"path"}],"responses":{"200":{"description":"The certificate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCertificate"}}}},"404":{"description":"No certificate for this ref (unissued, revoked, or unknown).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/browsers":{"get":{"tags":["Browsers"],"summary":"List browsers in an org pool","parameters":[{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["all","free","allocated"],"default":"all"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Browsers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"post":{"tags":["Browsers"],"summary":"Create a browser in an org pool (Sable admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrowserBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Duplicate URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/browsers/{id}":{"get":{"tags":["Browsers"],"summary":"Get a browser","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Browser","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]},"patch":{"tags":["Browsers"],"summary":"Update a browser (Sable admin only)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrowserBody"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Browsers"],"summary":"Soft-delete a browser (Sable admin only)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Still allocated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/browser-holds":{"post":{"tags":["Browsers"],"summary":"Reserve N free browsers from an org pool","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldBrowsersBody"}}}},"responses":{"201":{"description":"Hold created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldResponse"}}}},"409":{"description":"Insufficient browsers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/browser-holds/{holdId}/commit":{"post":{"tags":["Browsers"],"summary":"Commit a hold to an agent","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"holdId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitHoldBody"}}}},"responses":{"200":{"description":"Committed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBrowsersListResponse"}}}},"404":{"description":"Hold not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Hold expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/browser-holds/{holdId}":{"delete":{"tags":["Browsers"],"summary":"Release a hold without committing","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"holdId","in":"path"}],"responses":{"204":{"description":"Released"}},"x-sable-permission-guards":[{"anyOf":["agents:write"]}]}},"/agents/{id}/browsers":{"get":{"tags":["Agents","Browsers"],"summary":"List browsers bound to an agent","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Browsers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBrowsersListResponse"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/calls":{"get":{"tags":["Calls"],"summary":"List calls for copilot","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeInternal","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"completed","in":"query"},{"schema":{"type":"string","enum":["good","acceptable","needs_work","failed"]},"required":false,"name":"verdict","in":"query"},{"schema":{"type":"string","enum":["human","agent","all"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"momentName","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"roomName","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"search","in":"query"},{"schema":{"type":"string"},"required":false,"name":"agentIds","in":"query"},{"schema":{"type":"string"},"required":false,"name":"linkRefs","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customerDomains","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"notifyEmail","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":86400},"required":false,"name":"minDurationSeconds","in":"query"}],"responses":{"200":{"description":"Call list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallList"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/calls/search":{"get":{"tags":["Calls"],"summary":"Search calls for copilot","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeInternal","in":"query"},{"schema":{"type":"string","minLength":1},"required":true,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":30},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["user","agent","any"]},"required":false,"name":"role","in":"query"},{"schema":{"type":"string","enum":["good","acceptable","needs_work","failed"]},"required":false,"name":"verdict","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"completed","in":"query"},{"schema":{"type":"string","enum":["human","agent","all"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"momentName","in":"query"}],"responses":{"200":{"description":"Call search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSearch"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/calls/patterns":{"get":{"operationId":"get_calls_patterns","x-sable":{"kind":"exception","reason":"searches the org's wiki with a free-text question through the wiki readers; the answer is ranked passages, not rows of a dataset"},"tags":["Calls"],"summary":"Findings across the org's calls that answer a question, with quotes and the call each comes from","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","enum":["themes","questions","objections","drop_offs","agent_misses"]},"required":false,"name":"about","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeInternal","in":"query"}],"responses":{"200":{"description":"Call patterns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallPatterns"}}}},"400":{"description":"Invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Call patterns unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/calls/patterns/availability":{"get":{"operationId":"get_calls_patterns_availability","x-sable":{"kind":"exception","reason":"says whether the org's calls have been analyzed into the wiki that /calls/patterns searches; the answer is one fact about the wiki, not rows of a dataset"},"tags":["Calls"],"summary":"Whether call patterns can answer for the org yet","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Call patterns availability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallPatternsAvailability"}}}},"400":{"description":"Invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/calls/stats":{"get":{"tags":["Calls"],"summary":"Aggregate call stats for copilot","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"},{"schema":{"type":"string","pattern":"^[1-9]\\d{0,9}(,[1-9]\\d{0,9})*$","description":"Comma-separated numeric agent ids (max 50); stats cover calls by any of them. Use instead of agentId, not with it."},"required":false,"description":"Comma-separated numeric agent ids (max 50); stats cover calls by any of them. Use instead of agentId, not with it.","name":"agentIds","in":"query"},{"schema":{"type":"string","enum":["count"],"description":"Return only overall.total_calls, without other aggregates or groups. A range given over 365 days returns zero with a suggestion."},"required":false,"description":"Return only overall.total_calls, without other aggregates or groups. A range given over 365 days returns zero with a suggestion.","name":"projection","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeInternal","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"completed","in":"query"},{"schema":{"type":"string","enum":["good","acceptable","needs_work","failed"]},"required":false,"name":"verdict","in":"query"},{"schema":{"type":"string","enum":["human","agent","all"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["verdict","final_moment","day","completed","source","agent","link"]},"required":false,"name":"groupBy","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":86400},"required":false,"name":"minDurationSeconds","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Sao_Paulo","description":"IANA zone whose calendar days groupBy=day uses. UTC when absent."},"required":false,"description":"IANA zone whose calendar days groupBy=day uses. UTC when absent.","name":"timeZone","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"search","in":"query"},{"schema":{"type":"string"},"required":false,"name":"linkRefs","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customerDomains","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"notifyEmail","in":"query"}],"responses":{"200":{"description":"Call stats","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CallStats"},{"$ref":"#/components/schemas/CallCount"}]}}}},"400":{"description":"Invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/calls/{id}":{"get":{"tags":["Calls"],"summary":"Get one call for copilot","parameters":[{"schema":{"type":"string","minLength":1,"example":"123"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeTranscript","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"maxMessages","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"messagesCursor","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeEval","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeOutroFeedback","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeTimings","in":"query"}],"responses":{"200":{"description":"Call detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/calls/{id}/questions":{"get":{"tags":["Calls"],"summary":"List the questions asked on one call, in the order asked","parameters":[{"schema":{"type":"string","minLength":1,"example":"123"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}]},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"}],"responses":{"200":{"description":"Call questions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallQuestions"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/call-insights/scopes:resolve":{"post":{"tags":["CallInsights"],"summary":"Freeze one tenant-scoped semantic call corpus","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"orgId","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"required":true,"name":"x-sable-expected-build-sha","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveCallInsightsScope"}}}},"responses":{"200":{"description":"Scope resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedCallInsightsScope"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"401":{"description":"Human JWT required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"403":{"description":"Human Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"409":{"description":"Scope cannot be analyzed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"429":{"description":"Admission limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"502":{"description":"Invalid Therapy response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}}}}},"/call-insights/queries":{"post":{"tags":["CallInsights"],"summary":"Create one text semantic query over a frozen call scope","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"orgId","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"required":true,"name":"x-sable-expected-build-sha","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallInsightsQuery"}}}},"responses":{"202":{"description":"Query accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedCallInsightsQuery"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"401":{"description":"Human JWT required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"403":{"description":"Invalid capability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"409":{"description":"Frozen scope changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"429":{"description":"Attempt budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"502":{"description":"Invalid Therapy response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}}}}},"/call-insights/operations/{operationId}/status:read":{"post":{"tags":["CallInsights"],"summary":"Read one bound semantic query operation","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"operationId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"orgId","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"required":true,"name":"x-sable-expected-build-sha","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsOperationBindingBody"}}}},"responses":{"200":{"description":"Operation status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsOperation"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"401":{"description":"Human JWT required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"403":{"description":"Invalid capability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"409":{"description":"API revision mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"429":{"description":"Polling budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"502":{"description":"Invalid Therapy response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}}}}},"/call-insights/operations/{operationId}/result:read":{"post":{"tags":["CallInsights"],"summary":"Fetch and revalidate one immutable semantic query result","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"operationId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":true,"name":"orgId","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-f]{40}$","example":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"required":true,"name":"x-sable-expected-build-sha","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsResultReadBody"}}}},"responses":{"200":{"description":"Verified query result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"401":{"description":"Human JWT required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"403":{"description":"Invalid capability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"409":{"description":"Frozen scope changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"429":{"description":"Result-read budget exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"502":{"description":"Invalid Therapy response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}},"503":{"description":"Dependency unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInsightsError"}}}}}}},"/internal/calls/{callId}/lifecycle":{"put":{"tags":["InternalCalls"],"summary":"Persist a service-authenticated runtime call lifecycle snapshot","description":"Records runtime-observed connection and optional end evidence. Idempotent duplicates are accepted; server receipt time supplies lastSeenAt.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallLifecycleSnapshotV1"}}}},"responses":{"200":{"description":"Snapshot persisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutCallLifecycleResponse"}}}},"400":{"description":"Invalid snapshot or path/body call identity mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Snapshot conflicts with immutable persisted lifecycle evidence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/avatars/tavus/conversations":{"post":{"tags":["InternalAvatars"],"summary":"Create a Tavus conversation for a runtime LiveKit room","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replica_id":{"type":"string","minLength":1,"maxLength":128},"persona_id":{"type":"string","minLength":1,"maxLength":128},"conversation_name":{"type":"string","maxLength":512},"properties":{"type":"object","properties":{"livekit_ws_url":{"type":"string","maxLength":2048,"format":"uri"},"livekit_room_token":{"type":"string","minLength":1,"maxLength":16384}},"required":["livekit_ws_url","livekit_room_token"]}},"required":["replica_id","persona_id","conversation_name","properties"]}}}},"responses":{"200":{"description":"Conversation created","content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","minLength":1}},"required":["conversation_id"]}}}},"400":{"description":"Invalid room or avatar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Caller left; ending any conversation created was attempted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Tavus failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Tavus not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/captures":{"get":{"operationId":"listCaptures","x-sable":{"kind":"exception","reason":"The existing Sable-admin capture inventory lists published storage objects for Toolbelt and the Capture Map."},"tags":["Captures"],"summary":"List published captures (Sable admin only)","responses":{"200":{"description":"Published capture IDs","content":{"application/json":{"schema":{"type":"object","properties":{"captures":{"type":"array","items":{"type":"object","properties":{"recordingId":{"type":"string"}},"required":["recordingId"]}}},"required":["captures"]}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tts/cartesia/voices":{"get":{"tags":["TTS"],"summary":"List Cartesia voices","responses":{"200":{"description":"Cartesia voices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartesiaVoiceCatalogResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/tts/cartesia/preview":{"post":{"tags":["TTS"],"summary":"Render a bounded Cartesia voice audition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartesiaPreviewBody"}}}},"responses":{"200":{"description":"Base64 WAV audio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartesiaPreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Cartesia failed to synthesize","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/tts/deepgram/preview":{"post":{"tags":["TTS"],"summary":"Render a bounded Deepgram Flux voice audition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeepgramPreviewBody"}}}},"responses":{"200":{"description":"Base64 MP3 audio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeepgramPreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Deepgram failed to synthesize","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/tts/rime/voices":{"get":{"tags":["TTS"],"summary":"List Rime voices available to Sable staff","parameters":[{"schema":{"type":"string","enum":["coda","mistv3"]},"required":true,"name":"model","in":"query"}],"responses":{"200":{"description":"Rime voices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RimeVoiceCatalogResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/tts/rime/preview":{"post":{"tags":["TTS"],"summary":"Render a bounded Rime voice audition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RimePreviewBody"}}}},"responses":{"200":{"description":"Base64 WAV audio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RimePreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Rime failed to synthesize","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Rime voice preview is busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/tts/minimax/voices":{"get":{"tags":["TTS"],"summary":"List MiniMax voices available to Sable staff","responses":{"200":{"description":"MiniMax voices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinimaxVoiceCatalogResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/tts/minimax/preview":{"post":{"tags":["TTS"],"summary":"Render a bounded MiniMax voice audition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinimaxPreviewBody"}}}},"responses":{"200":{"description":"Base64 MP3 audio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MinimaxPreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"MiniMax failed to synthesize","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/tts/google/preview":{"post":{"tags":["TTS"],"summary":"Render a bounded Google Gemini TTS voice audition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePreviewBody"}}}},"responses":{"200":{"description":"Base64 WAV audio (24 kHz mono 16-bit PCM)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Google failed to synthesize","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Too many Google previews in flight; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/analytics/link-readiness-override":{"post":{"tags":["Analytics"],"summary":"Override link readiness (signed-in Sable admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"exclusiveMinimum":true}]},"agentId":{"type":"string"},"linkRef":{"type":"string","nullable":true},"status":{"type":"string","nullable":true,"enum":["healthy","degraded","unhealthy",null]},"reason":{"type":"string","maxLength":2000}},"required":["orgId","agentId","linkRef","status","reason"]}}}},"responses":{"200":{"description":"Override saved","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Invalid override or stale checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Signed-in Sable user required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization, agent or link not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment Health unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/link-sales-details":{"post":{"tags":["Analytics"],"summary":"Save a link's Sales details (signed-in Sable admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"exclusiveMinimum":true}]},"agentId":{"type":"string"},"linkRef":{"type":"string","nullable":true},"owner":{"type":"string","maxLength":80},"knownIssues":{"type":"string","maxLength":2000},"recommended":{"type":"boolean"}},"required":["orgId","agentId","linkRef","owner","knownIssues","recommended"]}}}},"responses":{"200":{"description":"Sales details saved","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Invalid Sales details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Signed-in Sable user required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization, agent or link not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment Health unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/sessions":{"get":{"tags":["Analytics"],"summary":"Get session analytics for an organization","description":"Returns aggregate stats and time series data for sessions","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","enum":["daily","weekly","monthly","quarterly"],"default":"weekly","example":"weekly"},"required":false,"name":"groupBy","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Session analytics data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAnalyticsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Analytics computation capacity reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/global":{"get":{"tags":["Analytics"],"summary":"Get session analytics across every organization (Sable admin)","description":"The session dashboard summed across all live organizations, plus a per-organization breakdown. Sable admins only.","parameters":[{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","enum":["daily","weekly","monthly","quarterly"],"default":"weekly","example":"weekly"},"required":false,"name":"groupBy","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"}],"responses":{"200":{"description":"Fleet-wide session analytics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalAnalyticsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/agent-health":{"get":{"tags":["Analytics"],"summary":"Get current agent health from Deployment Health (Sable admin)","responses":{"200":{"description":"Rolling agent health for live organizations; independent of any date range","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["ready","stale"]},"computedAt":{"type":"string","format":"date-time"},"dashboardUrl":{"type":"string","format":"uri"},"agents":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string"},"agentName":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"score":{"type":"number","nullable":true,"minimum":0,"maximum":100},"status":{"type":"string","enum":["healthy","degraded","unhealthy","unknown"]},"mainIssues":{"type":"array","items":{"type":"string"},"maxItems":3},"testedAt":{"type":"string","nullable":true,"format":"date-time"},"validUntil":{"type":"string","format":"date-time"}},"required":["agentId","agentName","organizationId","organizationName","score","status","mainIssues","testedAt"]}}},"required":["status","computedAt","dashboardUrl","agents"]}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/global/session-counts":{"get":{"tags":["Analytics"],"summary":"Get session counts by active organization (Sable admin)","parameters":[{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"}],"responses":{"200":{"description":"Organizations with sessions in the window, most sessions first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalSessionCountsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/stages":{"get":{"tags":["Analytics"],"summary":"Get stage breakdown analytics for an organization","description":"Returns the share of sessions in scope that reached each stage/moment, most popular first. Scoping to a single agent also scopes which configured moments are reported.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Stage breakdown analytics data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageAnalyticsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/sentiment":{"get":{"tags":["Analytics"],"summary":"Get sentiment breakdown analytics for an organization","description":"Returns per-sentiment session counts and shares (model-inferred per session from transcripts)","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Sentiment breakdown analytics data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentimentAnalyticsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/engagement-insights":{"get":{"tags":["Analytics"],"summary":"Get engagement-insight analytics for an organization","description":"Share of sessions reaching each configured engagement signal. Rule insights are evaluated live; llm insights read per-session verdicts cached at session end.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Engagement insight analytics data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementAnalyticsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/engagement-insights/config":{"get":{"tags":["Analytics"],"summary":"List the org's engagement-insight definitions","description":"Materializes the default signals on first read.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Engagement insight definitions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementInsightsConfigResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]},"post":{"tags":["Analytics"],"summary":"Add an engagement-insight definition","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEngagementInsightBody"}}}},"responses":{"201":{"description":"Created engagement insight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementInsightConfig"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]},"put":{"tags":["Analytics"],"summary":"Atomically replace the org's engagement-insight config","description":"Applies the whole desired ordered list in one transaction: removes insights not present, updates kept ones (name/description + display order = array index), and creates new ones (id === null). All-or-nothing — a failure leaves the existing config unchanged. The signal (kind/rule/prompt) is immutable on existing rows.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceEngagementInsightsBody"}}}},"responses":{"200":{"description":"The resulting engagement insight definitions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementInsightsConfigResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An insight to keep was missing or cross-org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/engagement-insights/config/reset":{"post":{"tags":["Analytics"],"summary":"Reset the org's engagement-insight config to the default signals","description":"Soft-deletes every current definition and re-materializes the four defaults in one transaction. The explicit form of the retired 'save an empty list' reset — an empty PUT now persists empty instead of re-seeding.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetEngagementInsightsBody"}}}},"responses":{"200":{"description":"The restored default engagement insight definitions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementInsightsConfigResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/engagement-insights/config/{insightId}":{"delete":{"tags":["Analytics"],"summary":"Remove an engagement-insight definition","description":"Soft delete. Cached per-session verdicts for the insight stop being read.","parameters":[{"schema":{"type":"string","pattern":"^[1-9]\\d*$","example":"12"},"required":true,"name":"insightId","in":"path"},{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Insight removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFeedbackResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Insight not found (missing, cross-org, or already removed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]},"patch":{"tags":["Analytics"],"summary":"Edit an engagement-insight definition","description":"Update the customer-facing name/description or the display order (sortOrder). The signal is immutable.","parameters":[{"schema":{"type":"string","pattern":"^[1-9]\\d*$","example":"12"},"required":true,"name":"insightId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEngagementInsightBody"}}}},"responses":{"200":{"description":"Updated engagement insight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementInsightConfig"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Insight not found (missing, cross-org, or already removed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/deployments":{"get":{"tags":["Analytics"],"summary":"List the deployments the dashboard's numbers are made of","description":"Options for the analytics scope picker, built from the sessions in analytics scope: soft-deleted agents that still own counted traffic are included and flagged `isDeleted`; agents with nothing to report are omitted. All-time unless `timeRange` is given, which narrows both the counts and the list to that range.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Must match the value the metric requests use: it decides which sessions count, and therefore which deployments have anything to report."},"required":false,"description":"Must match the value the metric requests use: it decides which sessions count, and therefore which deployments have anything to report.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only, and must match the metric requests for the same reason."},"required":false,"description":"Sable-admin only, and must match the metric requests for the same reason.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"example":"last7d","description":"Count only sessions started in this range, measured exactly as `GET /analytics/sessions` does. Omitted: all-time."},"required":false,"description":"Count only sessions started in this range, measured exactly as `GET /analytics/sessions` does. Omitted: all-time.","name":"timeRange","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Selectable deployments, busiest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsDeploymentsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/customer-domains":{"get":{"tags":["Analytics"],"summary":"List the customer domains the dashboard can be scoped to","description":"Options for the customer filter, derived from participant email domains in analytics scope. Reflects the date range and every other active filter EXCEPT `customerDomains` itself, so the list can always offer a domain that is not yet selected. Consumer mailboxes are included — unlike the unique-customer-domain metric, this is for finding sessions rather than counting nameable customers.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Selectable domains, busiest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDomainsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/question-themes":{"get":{"tags":["Analytics"],"summary":"Get question-theme analytics for an organization","description":"Top themes of the questions users asked, extracted from transcripts at session end, each with a few of its newest questions.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"example":10,"description":"Themes returned, most asked first. Defaults to the top 10."},"required":false,"description":"Themes returned, most asked first. Defaults to the top 10.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Set false to omit each theme's preview questions when only name + count are needed."},"required":false,"description":"Set false to omit each theme's preview questions when only name + count are needed.","name":"includeSamples","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Question theme counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionThemesResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/question-themes/questions":{"get":{"tags":["Analytics"],"summary":"List the questions behind one theme","description":"Drill-down for a theme: each question, the agent's answer, and the session link. Keyed on the theme id, so the link survives a rename and picks up every label merged into the theme.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"},{"schema":{"type":"string","enum":["recent","oldest"],"default":"recent","description":"Newest or oldest first."},"required":false,"description":"Newest or oldest first.","name":"sort","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":42},"required":true,"name":"themeId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Keyset cursor from the previous page's nextCursor."},"required":false,"description":"Keyset cursor from the previous page's nextCursor.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Questions for the theme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeQuestionsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or theme not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/question-themes/config":{"get":{"tags":["Analytics"],"summary":"List the org's question themes for editing","description":"Every theme the org has, with its all-time question count. Includes hidden themes (flagged) so the editor can un-hide them; excludes merge aliases. Gated on `analytics:write` rather than `analytics:read`: its only consumer is the admin editor, and the payload deliberately ignores the analytics scope filters, so it reports counts (including internal and test sessions) that no customer-facing surface shows. Hiding is a presentation choice, not an access boundary — a hidden theme's questions stay readable by id — but there is no reason to hand the curation view to a role that cannot curate.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"}],"responses":{"200":{"description":"The org's question themes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionThemeConfigListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]},"post":{"tags":["Analytics"],"summary":"Create a question theme","description":"Adds a theme the extractor hasn't coined, so an admin can stand one up ahead of the questions that belong in it. Returns the new theme alone — it starts with no questions, so it is invisible on every customer-facing surface until questions are moved into it or the extractor assigns some. A name a live theme already holds is refused (409); a name held only by a retired merge alias is taken over, retiring the alias.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuestionThemeBody"}}}},"responses":{"201":{"description":"The created theme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionThemeResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A live theme already holds this name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]},"put":{"tags":["Analytics"],"summary":"Rename or hide the org's question themes","description":"Applies a staged edit in one transaction. Renaming a theme to a name another theme already holds MERGES them: the questions move to the surviving theme and the renamed row becomes an alias, so the extractor's future uses of the old label keep landing on the survivor. Hiding removes a theme from the card, the questions page, and the question totals without touching its questions. Themes absent from the body are untouched. All-or-nothing.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuestionThemesBody"}}}},"responses":{"200":{"description":"The resulting question themes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionThemeConfigListResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"A theme in the body was missing or cross-org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/questions/duplicates":{"post":{"tags":["Analytics"],"summary":"Count identical copies of the selected questions","description":"Preflight for a bulk move or delete. Reports how many of the selected questions have identical siblings in the same theme (matching ignores case and surrounding whitespace) and how many extra rows 'all copies' would touch, so the confirmation can state the reach before anything is written. Counted server-side because the drill-down is paginated — a client-side count would miss copies on unfetched pages. All-time and unscoped by the dashboard filters, matching the theme editor's counts. A POST because the id list can be long; it writes nothing.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionDuplicatesBody"}}}},"responses":{"200":{"description":"Duplicate summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionDuplicatesResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found, or a question id does not belong to it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/moments/labels":{"post":{"tags":["Analytics"],"summary":"Name journey moments for the analytics chart","description":"Sets the display names the Popular moments card and the exported report caption bars with, in place of the moments' goals. Presentation only — the name rides on `instructions.moments[].analytics_name`, a key no runtime surface reads, so the agent, the caller-facing progress tracker, and the journeys editor are unaffected. Addressed by the moment's `_uid`, so it survives moments being reordered and follows the moment when its goal is edited. A merged bar covers several moments; naming it names each of them. Editing the goal orphans the name and the bar falls back to the new goal. A blank `label` clears one. The whole batch applies in a single transaction.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMomentLabelsBody"}}}},"responses":{"200":{"description":"Names stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMomentLabelsResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found, or the agent does not belong to it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/questions/move":{"post":{"tags":["Analytics"],"summary":"Move questions to another theme","description":"Repoints the selected questions at another theme, for when extraction filed them in the wrong place. With `includeDuplicates`, also moves every identical question in the same theme. The destination resolves through merge aliases to the surviving theme. Leaves each row's raw extractor label intact, so the extraction record stays auditable. All-or-nothing: one id that doesn't belong to the org rejects the batch. Not durable against re-extraction — a deliberate questions re-run resets curation by design.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveQuestionsBody"}}}},"responses":{"200":{"description":"Rows moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveQuestionsResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization, destination theme, or a question id not found for this org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/questions/delete":{"post":{"tags":["Analytics"],"summary":"Delete questions","description":"Removes the selected questions — extraction noise that isn't a real customer question. With `includeDuplicates`, also deletes every identical question in the same theme. A hard delete: the rows carry no soft-delete column, and a deliberate questions re-run would recreate them from the transcript anyway. All-or-nothing. A POST rather than a DELETE because the id list travels in the body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteQuestionsBody"}}}},"responses":{"200":{"description":"Rows deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteQuestionsResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found, or a question id does not belong to it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/analytics/feedback":{"get":{"tags":["Analytics"],"summary":"List session feedback for an organization","description":"Returns paginated session-level feedback (outro_feedback blob)","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor"},"required":false,"description":"Opaque pagination cursor","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","example":"jane@acme.com","description":"Free-text search across participant name, email, external user id, and agent name (case-insensitive substring)."},"required":false,"description":"Free-text search across participant name, email, external user id, and agent name (case-insensitive substring).","name":"search","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role"},"required":false,"description":"Sable-admin-only: preview data as this role","name":"asRole","in":"query"}],"responses":{"200":{"description":"List of sessions with feedback","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackListResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/certificates":{"get":{"tags":["Analytics"],"summary":"List completion certificates or grouped recipients","description":"Paginated certificates ordered by latest issuance. Request `view=recipients` to group every in-scope issuance by person; omitting it preserves the legacy row-per-certificate pagination contract. Revoked certificates are excluded, so every `certificateRef` resolves on the public `GET /certificates/{ref}`.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (required for non-admin users)"},"required":false,"description":"Organization ID (required for non-admin users)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["allTime","last7d","last30d","last90d","thisMonth","thisQuarter","thisYear"],"default":"last30d","example":"last30d"},"required":false,"name":"timeRange","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor"},"required":false,"description":"Opaque pagination cursor","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","example":"jane@acme.com","description":"Free-text search across the certificate's frozen recipient name and company, the participant's name, email and external user id, the deployment name, and the external session id (case-insensitive substring)."},"required":false,"description":"Free-text search across the certificate's frozen recipient name and company, the participant's name, email and external user id, the deployment name, and the external session id (case-insensitive substring).","name":"search","in":"query"},{"schema":{"type":"string","enum":["certificates","recipients"],"default":"certificates","example":"recipients","description":"Response pagination contract. Omit for the legacy row-per-certificate view; new clients request `recipients` to group issuances by person."},"required":false,"description":"Response pagination contract. Omit for the legacy row-per-certificate view; new clients request `recipients` to group issuances by person.","name":"view","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-04-07T03:00:00.000Z","description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate."},"required":false,"description":"Custom range start as an absolute ISO-8601 instant (the client resolves the picked local day to a timestamp). Overrides timeRange when paired with endDate.","name":"startDate","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-06-25T03:00:00.000Z","description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound)."},"required":false,"description":"Custom range end as an absolute ISO-8601 instant (exclusive upper bound).","name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time."},"required":false,"description":"IANA timezone used to align daily, weekly, monthly, and quarterly buckets to viewer-local time.","name":"timeZone","in":"query"},{"schema":{"type":"string","example":"1,2,3","description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope."},"required":false,"description":"Comma-separated agent ids to scope to. Empty keeps the whole org in scope.","name":"agentIds","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email have no domain and are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":30,"description":"Minimum session duration (seconds)."},"required":false,"description":"Minimum session duration (seconds).","name":"minSec","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":600,"description":"Maximum session duration (seconds)."},"required":false,"description":"Maximum session duration (seconds).","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The Calls routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"production,pending,internal,empty","description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it."},"required":false,"description":"Call type leaves with OR semantics: production, pending, internal, empty, sable_team. Omitted means every leaf the caller may see. The Calls routes take the same parameter, so both pages report the same population. `sable_team` requires the effective Sable-admin role, and selecting a leaf also lifts the scope rule that hides it.","name":"billingCategories","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role"},"required":false,"description":"Sable-admin-only: preview data as this role","name":"asRole","in":"query"}],"responses":{"200":{"description":"Issued certificates in scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificatesListResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/report":{"post":{"tags":["Analytics"],"summary":"Render the analytics report as a PDF","description":"Renders the same PDF the dashboard's Export dialog produces and returns a time-limited download link. The link is unauthenticated — anyone holding it can read the report until it expires — and the Questions and Session feedback sections carry verbatim participant names and free text.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsReportBody"}}}},"responses":{"200":{"description":"The rendered report and a link to download it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsReportResponse"}}}},"400":{"description":"Invalid request parameters, or no section could be loaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/report/jobs":{"post":{"tags":["Analytics"],"summary":"Enqueue the analytics report as a background job","description":"Same document as POST /analytics/report, rendered in the background. Returns 202 with a job id; poll GET /jobs/{jobId} for per-phase progress and, on completion, the download link. Prefer this from a browser: the synchronous route can run for minutes, which a serverless caller cannot wait out and cannot report progress during.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsReportBody"}}}},"responses":{"202":{"description":"Report job enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnqueuedAnalyticsReport"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:read"]}]}},"/analytics/feedback/{sessionId}":{"delete":{"tags":["Analytics"],"summary":"Clear a session's feedback","description":"Requires analytics:write. Clears the `outro_feedback` blob on one session so it drops out of the feedback list; the call/session and its transcript are left intact.","parameters":[{"schema":{"type":"string","pattern":"^[1-9]\\d*$","example":"123","description":"Numeric session id whose feedback should be cleared"},"required":true,"description":"Numeric session id whose feedback should be cleared","name":"sessionId","in":"path"},{"schema":{"type":"string","example":"1","description":"Organization ID (required for Sable admins)"},"required":false,"description":"Organization ID (required for Sable admins)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Feedback cleared","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFeedbackResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — analytics:write required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found (missing, cross-org, or no feedback)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["analytics:write"]}]}},"/auth/service-token":{"post":{"tags":["Auth"],"summary":"Exchange a Sable-admin login, the service token, the builder token for one of its orgs' Wiki, or a person's login for the apps dispatcher or kcp in their own org, for a short-lived internal-service token","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTokenExchangeRequest"}}}},"responses":{"200":{"description":"Token scoped to the audience and the caller's actor type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTokenExchangeResponse"}}}},"400":{"description":"Unsupported audience or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"No grant for this caller and audience (the builder token gets only a Wiki token naming one of its orgs)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Signing unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/firewall-bypass":{"get":{"tags":["Auth"],"summary":"Get the cookie value that lets Sable browsers past Parley's firewall","responses":{"200":{"description":"Firewall bypass cookie value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirewallBypassResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable-admin user required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/me":{"get":{"tags":["Auth"],"summary":"Get current authenticated user","parameters":[{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only permission preview role"},"required":false,"description":"Sable-admin-only permission preview role","name":"asRole","in":"query"}],"responses":{"200":{"description":"Authenticated user profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthMeResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connection-details":{"get":{"tags":["ConnectionDetails"],"summary":"Get connection details","description":"Public endpoint — resolves the runtime worker that serves the call, from an `env` pin or Brain routing, and with `hostedSession=true` reserves its room and account.","parameters":[{"schema":{"type":"string","enum":["true"],"description":"Reserve the hosted call room and account; omit for worker discovery."},"required":false,"description":"Reserve the hosted call room and account; omit for worker discovery.","name":"hostedSession","in":"query"},{"schema":{"type":"string","example":"agt_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a","description":"Agent public ID or slug"},"required":true,"description":"Agent public ID or slug","name":"agentPublicId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000","description":"Optional config version ID"},"required":false,"description":"Optional config version ID","name":"configId","in":"query"},{"schema":{"allOf":[{"$ref":"#/components/schemas/DeployEnvironment"},{"description":"Deployment environment (production or test)"}]},"required":false,"description":"Deployment environment (production or test)","name":"environment","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"pool-eu","description":"Brain (Hermes) environment override — name or ref from the env catalog. Routes the session to that environment instead of the one Brain routing picks."},"required":false,"description":"Brain (Hermes) environment override — name or ref from the env catalog. Routes the session to that environment instead of the one Brain routing picks.","name":"env","in":"query"},{"schema":{"type":"string","minLength":1,"example":"euw2","description":"Cell whose concierge claims the session (e.g. usw1, euw2). Moves the resolved sandbox environment to that cell under the same name; an unknown region, a non-sandbox environment, or one Brain says is not deployed in that cell, is a 400. A cell Brain reports as not serving places the session on the default cell, or another serving cell the environment is deployed in, when there is one. Ignored until Brain publishes its clusters."},"required":false,"description":"Cell whose concierge claims the session (e.g. usw1, euw2). Moves the resolved sandbox environment to that cell under the same name; an unknown region, a non-sandbox environment, or one Brain says is not deployed in that cell, is a 400. A cell Brain reports as not serving places the session on the default cell, or another serving cell the environment is deployed in, when there is one. Ignored until Brain publishes its clusters.","name":"region","in":"query"},{"schema":{"type":"string","example":"{\"a1b2c3d4\":\"env_prod\"}","description":"JSON map of the browser's sable_env_* cookies (pool-config hash → env), forwarded by parley so routing reuses the env this browser was sorted into when the pool is unchanged."},"required":false,"description":"JSON map of the browser's sable_env_* cookies (pool-config hash → env), forwarded by parley so routing reuses the env this browser was sorted into when the pool is unchanged.","name":"stickyEnvs","in":"query"},{"schema":{"type":"string","example":"us-west1","description":"Nearest nickel region discovered by client. Without an explicit region, a sandbox session moves to the cell deployed in this region, else on its continent."},"required":false,"description":"Nearest nickel region discovered by client. Without an explicit region, a sandbox session moves to the cell deployed in this region, else on its continent.","name":"nickelRegion","in":"query"},{"schema":{"type":"string","example":"acct_01j9abc","description":"Sandbox account public id whose snapshot the agent should boot with."},"required":false,"description":"Sandbox account public id whose snapshot the agent should boot with.","name":"accountId","in":"query"},{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg","description":"Meeting bot whose page places this call. An id that names no bot sent for this agent is refused with 404; a bot that reserved a room has its hosted session use that room."},"required":false,"description":"Meeting bot whose page places this call. An id that names no bot sent for this agent is refused with 404; a bot that reserved a room has its hosted session use that room.","name":"bot","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"example":"550e8400-e29b-41d4-a716-446655440000","description":"HttpOnly-cookie browser identifier used to resolve redirect-link personalization."},"required":false,"description":"HttpOnly-cookie browser identifier used to resolve redirect-link personalization.","name":"browserId","in":"query"},{"schema":{"type":"string","minLength":1,"example":"lnk_01961f2a-b3c4-7d5e-8f6a-9b0c1d2e3f4a","description":"Redirect-carried link ref from a released `?via=` address. Consulted only when the browser has no arrival of its own — it never outranks the browser's own claim."},"required":false,"description":"Redirect-carried link ref from a released `?via=` address. Consulted only when the browser has no arrival of its own — it never outranks the browser's own claim.","name":"viaLinkRef","in":"query"}],"responses":{"200":{"description":"Connection details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedConnectionDetails"}}}},"400":{"description":"Missing agentPublicId parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"CALLER_BLOCKED: the organization blocked this caller's browser, email or email domain, or the caller or their email domain reached the agent's daily call limit; EMAIL_VERIFICATION_REQUIRED: the agent verifies visitor emails and the request carries no valid proof; ACCOUNT_NOT_BOUND_TO_AGENT: the requested account is not bound to this agent; CALLER_PROOF_REQUIRED: the request asks for its own config version or ref, runtime environment, deployment environment, model, preset or worker and forwards no verified proof of its caller, while that override's call door switch refuses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent, environment or meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Agent link disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Agent or link is unavailable (in maintenance); AGENT_NOT_ROUTABLE: Brain routing gives the agent no environment that can serve the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["ConnectionDetails"],"summary":"Cancel a room nobody joined","description":"Closes the room a participant token joins and releases the account lock it holds, so the agent waiting there ends now rather than at its join grace. The token must verify against the keys of the cluster serving `serverUrl`. Idempotent: a room already gone returns 200. Refused while anyone but an agent is in the room.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCancelBody"}}}},"responses":{"200":{"description":"Room closed, or already gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCancelResponse"}}}},"403":{"description":"The participant token does not verify or does not join this room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No LiveKit cluster serves this server URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Someone other than an agent is in the room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connection-details/chosen-worker":{"post":{"tags":["ConnectionDetails"],"summary":"Record a call sent to a worker the caller chose","description":"For a call call-ui sends to a worker the caller named, which never asks `GET /connection-details`. Checks the caller credentials forwarded in `X-Sable-Platform-Session` and `X-Sable-Simulation-Authorization`, decides the call's path and caller as `GET /connection-details` does, and keeps both under the returned call id for the call's session. While call tickets are minted, also returns the decision sealed as `callContext`. Reserves nothing. Refuses to record a call only at the call door, which call-ui answers by starting the call unrecorded. Service-token-only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChosenWorkerCallBody"}}}},"responses":{"200":{"description":"The call id the decision is kept under, and its sealed context while tickets are minted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChosenWorkerCall"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"CALLER_PROOF_REQUIRED: the call is on a test path the request asked for and forwards no verified proof of its caller, while that override's call door switch refuses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/call-attempts/failed":{"post":{"tags":["CallAttempts"],"summary":"Report a call attempt outcome","description":"Sent by parley for a terminal startup failure, explicit startup abandonment, or attributed in-call failure. Persists tenant-scoped evidence before applying Slack alert policy. Room presence alone does not establish a usable interaction; abandonment never triggers a failure alert.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCallStartFailureBody"}}}},"responses":{"202":{"description":"Report accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCallStartFailureResponse"}}}},"400":{"description":"Invalid report body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"New unlinked failure-call limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/call-start-refusals/{callId}":{"put":{"operationId":"put_call_start_refusal","x-sable":{"kind":"resource"},"tags":["CallAttempts"],"summary":"Keep why a call's runtime exited before it joined","description":"Sent by a runtime that refuses its config or cannot build its preset, just before it exits. Kept by call id for an hour and returned only on a staff failure report for that call.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStartRefusal"}}}},"responses":{"204":{"description":"Refusal kept"},"400":{"description":"Invalid refusal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"No call store to keep the refusal in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/calls/{callId}/ticket":{"post":{"tags":["CallTickets"],"summary":"Mint a call ticket","description":"Signs what connection-details decided about a call, with its final path, for the runtime worker named by `target`. The caller proves itself with its own servicekit token in `X-Sable-S2S-Authorization`, from the identity CALL_TICKET_MINT names; with CALL_TICKET_MINT unset or off the route answers 503 CALL_TICKET_REFUSED with reason `off`. Every refusal is CALL_TICKET_REFUSED with its reason in `metadata.reason`.","parameters":[{"schema":{"type":"string","format":"uuid","example":"0b6f1c2e-3d4a-4b5c-8d6e-7f8091a2b3c4","description":"The call id connection-details returned."},"required":true,"description":"The call id connection-details returned.","name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallTicketRequest"}}}},"responses":{"200":{"description":"The ticket and when it expires","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallTicket"}}}},"400":{"description":"context_unreadable: the sealed context cannot be read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"minter_refused: no servicekit token of the configured minter with the mint purpose","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"context_wrong_call: the sealed context is another call's; target_not_chosen: the call was sent to a worker the caller named, and `target` is another; override_not_allowed: the caller may not ask for one of the overrides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"context_expired: the sealed context has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"off: minting is off; minter_unverifiable: the minter's keys did not answer; signer_unavailable: the signing key cannot be used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/visitor-email/validate":{"post":{"tags":["Calls"],"summary":"Validate a submitted pre-call email","description":"Checks syntax, disposable domains, test addresses, and DNS mail routing. Does not verify inbox ownership.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"requireWorkEmail":{"type":"boolean"}},"required":["email"]}}}},"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"valid":{"type":"boolean","enum":[true]},"email":{"type":"string","format":"email"}},"required":["valid","email"]},{"type":"object","properties":{"valid":{"type":"boolean","enum":[false]},"reason":{"type":"string","enum":["invalid_format","disposable","no_mail","personal"]}},"required":["valid","reason"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/calls/{callId}/visitor-email":{"post":{"tags":["AgentRuntime"],"summary":"Hand the visitor's email to an active call's agent","description":"Looks the person up by email and pushes the call's visitor facts, with the email, name, title and company, to the call's agents. When the agent researches companies, binds the email's domain to the call and starts that research. An email this agent refuses (blocked, or over a daily call cap) gets 403 `CALLER_BLOCKED`, and closing the call's room is attempted.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"Number of visitor facts pushed to the call's agents","content":{"application/json":{"schema":{"type":"object","properties":{"facts":{"type":"integer","minimum":0}},"required":["facts"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The caller is blocked or over a daily cap; closing the call's room is attempted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The call's room could not be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/calls/{callId}/visitor-form":{"post":{"tags":["AgentRuntime"],"summary":"Hand the pre-call form to an active call's agent","description":"For a call that started before its visitor submitted the pre-call form. Pushes the visitor's typed name, company, email and answers to the call's agent, waiting up to 25 seconds for the agent to join, and answers once the agent has them. Then does what the email route does: looks the person up, pushes what it found with the typed answers ahead, and starts company research. A body with no email is a returning visitor going in without the form: the call gets the profile this org saved for the browser instead (name, company and email), delivered the same way, or nothing when there is none with a usable email. Only the browser that started the call is accepted; any other gets 404. An email this agent refuses (blocked, or over a daily call cap) gets 403 `CALLER_BLOCKED`, and closing the call's room is attempted.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallVisitorFormBody"}}}},"responses":{"200":{"description":"Number of visitor facts pushed to the call's agents: the typed or saved ones and any the call's link served (0 when the call refused them, no agent joined, or a body with no email found no usable saved profile)","content":{"application/json":{"schema":{"type":"object","properties":{"facts":{"type":"integer","minimum":0}},"required":["facts"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The caller is blocked or over a daily cap; closing the call's room is attempted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not found, or not started by this browser","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The call's room could not be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/visitor-email/otp":{"post":{"tags":["Calls"],"summary":"Email a visitor verification code","description":"Runs the same checks as /visitor-email/validate, then emails a 6-digit code. A proof still valid for this org, email and browser answers `verified` without sending. 404 unless the published config, or the call's pinned `configId` when it is this agent's, verifies visitor emails before calls. With `callId`, requires an active call owned by this agent and browser whose effective pinned/published policy enables during-call verification. The challenge is bound to that call.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"browserId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i"},"clientIp":{"type":"string","minLength":1,"maxLength":64},"requireWorkEmail":{"type":"boolean"},"proof":{"type":"string","maxLength":4096},"configId":{"type":"string","maxLength":64},"callId":{"type":"string","format":"uuid"}},"required":["email","browserId"]}}}},"responses":{"200":{"description":"Code sent, or the email is already verified on this browser","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sent"]},"challengeId":{"type":"string","format":"uuid"},"resendAt":{"type":"integer"},"expiresAt":{"type":"integer"}},"required":["status","challengeId","resendAt","expiresAt"]},{"type":"object","properties":{"email":{"type":"string","format":"email"},"proof":{"type":"string"},"expiresAt":{"type":"integer"},"status":{"type":"string","enum":["verified"]}},"required":["email","proof","expiresAt","status"]}]}}}},"400":{"description":"Email rejected (`reason`), or an invalid request body or path","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["invalid_format","disposable","no_mail","personal"]}},"required":["reason"]},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The call's caller is blocked or over a daily cap; closing the call's room is attempted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or call not found, browser does not own the call, or email verification off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Call already verified with another email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many codes sent","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["rate_limited"]},"retryAt":{"type":"integer"}},"required":["reason","retryAt"]}}}},"503":{"description":"Email verification temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/visitor-email/otp/{challengeId}/verify":{"post":{"tags":["Calls"],"summary":"Check a visitor verification code","description":"Returns a signed proof of the visitor's email. Five wrong codes end the challenge. A during-call challenge requires the original callId, verifies that the call is still live for this browser, and records and delivers its verified identity.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"challengeId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":16},"callId":{"type":"string","format":"uuid"},"browserId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i"}},"required":["code","browserId"]}}}},"responses":{"200":{"description":"Verified","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"proof":{"type":"string"},"expiresAt":{"type":"integer"}},"required":["email","proof","expiresAt"]}}}},"400":{"description":"Wrong code (`reason`), or an invalid request body or path","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["wrong_code"]},"attemptsLeft":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["reason","attemptsLeft"]},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The call's caller is blocked or over a daily cap; closing the call's room is attempted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or call not found, or browser does not own the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Call already verified with another email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Challenge expired or locked","content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["expired","locked"]}},"required":["reason"]}}}},"503":{"description":"Email verification temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/waitlist":{"post":{"tags":["Calls"],"summary":"Email a waiting visitor when there is room","description":"A visitor on the busy screen leaves an email to hear when there is room for a call. They are emailed once, when a release finds room, and nothing is held for them. Signing up again while waiting keeps the original place.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinBody"}}}},"responses":{"200":{"description":"On the waitlist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoined"}}}},"400":{"description":"Email or page rejected (`reason`), or an invalid request","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WaitlistRejected"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Service token missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{agentId}/calls/{callId}/visitor-turn":{"post":{"tags":["AgentRuntime"],"summary":"Hand a visitor's turn to the call's qualification","description":"Checks whether the visitor's turn tells anything the agent's qualification rules ask about. When it does, keeps the turn as the visitor's own word and judges the call again.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"earlier":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["agent","visitor"]},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["speaker","text"]},"maxItems":4},"visitor_said":{"type":"string","minLength":1,"maxLength":2000}},"required":["visitor_said"]}}}},"responses":{"200":{"description":"Whether the turn was kept for qualification","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"boolean"}},"required":["saved"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/crm-connections":{"get":{"tags":["CRM Connections"],"summary":"Get the organization's active CRM connection","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"org_id","in":"query"}],"responses":{"200":{"description":"Active CRM connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]},"post":{"tags":["CRM Connections"],"summary":"Verify and persist an Ampersand CRM connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteCrmConnectionBody"}}}},"responses":{"201":{"description":"CRM connection persisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/refresh":{"post":{"tags":["CRM Connections"],"summary":"Re-verify the organization's active CRM connection if its last check has aged out","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionOrgBody"}}}},"responses":{"200":{"description":"Active CRM connection, re-verified when stale","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/crm-connections/api-key":{"post":{"tags":["CRM Connections"],"summary":"Verify and persist an API-key CRM connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCrmConnectionBody"}}}},"responses":{"201":{"description":"CRM connection persisted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/{publicId}/api-key":{"post":{"tags":["CRM Connections"],"summary":"Replace the stored API key on an existing CRM connection","parameters":[{"schema":{"type":"string","minLength":1,"example":"crm_123"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RekeyCrmApiKeyConnectionBody"}}}},"responses":{"200":{"description":"CRM connection re-keyed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/{publicId}/post-call-write-access":{"post":{"tags":["CRM Connections"],"summary":"Allow post-call CRM updates through this connection","parameters":[{"schema":{"type":"string","minLength":1,"example":"crm_123"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionOrgBody"}}}},"responses":{"200":{"description":"Post-call CRM write access enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]},"delete":{"tags":["CRM Connections"],"summary":"Revoke post-call CRM updates through this connection","parameters":[{"schema":{"type":"string","minLength":1,"example":"crm_123"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"org_id","in":"query"}],"responses":{"200":{"description":"Post-call CRM write access revoked and linked destinations disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/oauth/start":{"post":{"tags":["CRM Connections"],"summary":"Start a CRM OAuth connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCrmOAuthBody"}}}},"responses":{"200":{"description":"Provider authorization URL or existing connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOAuthStartResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/{publicId}/oauth/reauthorize":{"post":{"tags":["CRM Connections"],"summary":"Start CRM OAuth reauthorization","parameters":[{"schema":{"type":"string","minLength":1,"example":"crm_123"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionOrgBody"}}}},"responses":{"200":{"description":"Provider authorization URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOAuthUrlResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/oauth/recover":{"post":{"tags":["CRM Connections"],"summary":"Recover a completed CRM OAuth connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCrmOAuthBody"}}}},"responses":{"200":{"description":"Existing CRM connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOAuthConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/{publicId}/reauthorize":{"post":{"tags":["CRM Connections"],"summary":"Verify a reauthorized active CRM connection","parameters":[{"schema":{"type":"string","minLength":1,"example":"crm_123"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReauthorizeCrmConnectionBody"}}}},"responses":{"200":{"description":"CRM connection reauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/{publicId}":{"delete":{"tags":["CRM Connections"],"summary":"Revoke and archive an active CRM connection","parameters":[{"schema":{"type":"string","minLength":1,"example":"crm_123"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"org_id","in":"query"}],"responses":{"200":{"description":"CRM connection disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmConnectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/crm-connections/{publicId}/fields":{"get":{"tags":["CRM Connections"],"summary":"List CRM fields for pre-call context or post-call delivery mappings","parameters":[{"schema":{"type":"string","minLength":1,"example":"crm_123"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"org_id","in":"query"},{"schema":{"type":"string","enum":["pre_call","post_call"],"default":"pre_call"},"required":false,"name":"purpose","in":"query"}],"responses":{"200":{"description":"Fields on both the person and company objects, each tagged with its role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmFieldsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active connection exists, or CRM_CONNECTION_BUSY: another change is in progress; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections unavailable, or CRM_CONNECTION_QUEUE_TIMEOUT: admission timed out; retry shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/connections/usage":{"get":{"tags":["Connections"],"summary":"Journeys that use each of the organization's connections","description":"One request for the Connectors page: the active CRM connection and every Slack workspace, each with how many journeys depend on it and the first few by name.","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"org_id","in":"query"}],"responses":{"200":{"description":"Usage by connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionUsageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/agents/{id}/crm-context-mappings":{"get":{"tags":["Agents","CRM Connections"],"summary":"List the agent's CRM context mappings","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Context mappings for this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContextMappingListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]},"post":{"tags":["Agents","CRM Connections"],"summary":"Add a CRM context mapping, validated against the live CRM field list","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContextMappingBody"}}}},"responses":{"201":{"description":"Context mapping created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContextMappingResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/agents/{id}/crm-context-mappings/{mappingId}":{"patch":{"tags":["Agents","CRM Connections"],"summary":"Re-author a CRM context mapping","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"mappingId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContextMappingBody"}}}},"responses":{"200":{"description":"Context mapping updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContextMappingResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]},"delete":{"tags":["Agents","CRM Connections"],"summary":"Remove a CRM context mapping","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"mappingId","in":"path"}],"responses":{"204":{"description":"Context mapping removed"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/agents/{id}/crm-context-mappings/preview":{"post":{"tags":["Agents","CRM Connections"],"summary":"Render the agent's mappings against a real contact","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContextPreviewBody"}}}},"responses":{"200":{"description":"What the agent would know about this contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmContextPreviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"CRM provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/email-templates":{"get":{"tags":["Email templates"],"summary":"List the organization's email templates","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Templates","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplate"}}},"required":["templates"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read","integrations:read"]}]},"post":{"tags":["Email templates"],"summary":"Create an email template draft","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateInput"}}}},"responses":{"201":{"description":"Template created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/email-templates/preview":{"post":{"tags":["Email templates"],"summary":"Render a template with sample values, without saving or sending","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"html":{"type":"string","minLength":1},"variables":{"type":"object","additionalProperties":{"type":"string"}},"variableDefinitions":{"allOf":[{"$ref":"#/components/schemas/EmailVariableDefinitions"},{"nullable":true}]},"agentId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["subject","html"],"additionalProperties":false}}}},"responses":{"200":{"description":"Rendered email","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"}},"required":["subject","html","text"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read","integrations:read"]}]}},"/email-templates/{publicId}":{"get":{"tags":["Email templates"],"summary":"Get an email template","parameters":[{"schema":{"type":"string","minLength":1,"example":"etp_1234567890abcdefghijk"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read","integrations:read"]}]},"patch":{"tags":["Email templates"],"summary":"Update an email template draft","parameters":[{"schema":{"type":"string","minLength":1,"example":"etp_1234567890abcdefghijk"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatePatch"}}}},"responses":{"200":{"description":"Template updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]},"delete":{"tags":["Email templates"],"summary":"Delete an email template that no agent uses","parameters":[{"schema":{"type":"string","minLength":1,"example":"etp_1234567890abcdefghijk"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Template deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/email-templates/{publicId}/publish":{"post":{"tags":["Email templates"],"summary":"Publish the draft as the version agents send","parameters":[{"schema":{"type":"string","minLength":1,"example":"etp_1234567890abcdefghijk"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string","format":"date-time"}},"required":["expectedUpdatedAt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Template published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplate"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/email-template-bindings":{"get":{"tags":["Email templates"],"summary":"List which template each agent sends, and the agents that cannot use one","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Bindings","content":{"application/json":{"schema":{"type":"object","properties":{"bindings":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","enum":["follow_up","post_call"]},"agentId":{"type":"integer","nullable":true},"templatePublicId":{"type":"string","nullable":true},"agentSlug":{"type":"string","nullable":true,"description":"Null for the organization default."},"agentName":{"type":"string","nullable":true,"description":"Null for the organization default."},"followUpEnabled":{"type":"boolean","nullable":true,"description":"The agent's follow-up email toggle. When false, the binding is saved but nothing sends until it is turned on. Null for the organization default."},"templateName":{"type":"string"}},"required":["purpose","agentId","templatePublicId","agentSlug","agentName","followUpEnabled","templateName"]}},"reserved":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"integer"},"reason":{"type":"string","enum":["managed_follow_up"]}},"required":["agentId","reason"]}}},"required":["bindings","reserved"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read","integrations:read"]}]},"put":{"tags":["Email templates"],"summary":"Choose the template an agent (or the organization) sends, or clear the choice","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["follow_up","post_call"]},"agentId":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"templatePublicId":{"type":"string","nullable":true,"minLength":1}},"required":["purpose","agentId","templatePublicId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Binding saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateBinding"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write","integrations:write"]}]}},"/email-template-variables":{"get":{"tags":["Email templates"],"summary":"List the variables a follow-up email can use","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Variables","content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"example":{"type":"string"},"kind":{"type":"string","enum":["text","url"]},"description":{"type":"string"}},"required":["name","example","kind","description"]}},"purposes":{"type":"array","items":{"type":"string","enum":["follow_up"]}}},"required":["variables","purposes"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read","integrations:read"]}]}},"/email-template-starters":{"get":{"tags":["Email templates"],"summary":"List starter templates","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Starters","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateInput"}}},"required":["templates"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read","integrations:read"]}]}},"/copilot/admin/memories":{"get":{"tags":["CopilotMemory"],"summary":"List copilot memories (Sable admin only)","description":"Returns every non-deleted `copilot_memories` row matching the given scope key. Defaults to scope='agent' when omitted. Sable admin only.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["user_global","user","org","agent","user_agent"],"example":"agent","description":"Scope to query. Defaults to 'agent' — the endpoint returns one scope per call, so admins must re-query to inspect other tiers."},"required":false,"description":"Scope to query. Defaults to 'agent' — the endpoint returns one scope per call, so admins must re-query to inspect other tiers.","name":"scope","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":false,"name":"userId","in":"query"}],"responses":{"200":{"description":"Memory rows matching the scope key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMemoriesList"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/attachments/upload-url":{"post":{"tags":["CopilotAttachments"],"summary":"Mint a presigned GCS upload URL for a composer attachment","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestComposerUploadUrlBody"}}}},"responses":{"201":{"description":"Upload URL minted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestComposerUploadUrlResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/feedback":{"post":{"tags":["CopilotFeedback"],"summary":"Submit thumbs-up/down feedback on a copilot turn","description":"Upsert per (turn_id, user_id) for explicit feedback. Implicit-revert rows are always inserted. Returns the new/updated row id.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotFeedbackSubmitBody"}}}},"responses":{"200":{"description":"Feedback recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotFeedbackSubmitResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Turn not found or not in caller's org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/memory/view":{"post":{"tags":["CopilotMemory"],"summary":"Read a memory file or list a tier (SDK contract)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryViewBody"}}}},"responses":{"200":{"description":"Memory content (file) or directory listing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryViewResponse"}}}},"400":{"description":"Invalid path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/memory/create":{"post":{"tags":["CopilotMemory"],"summary":"Create a memory file (SDK contract)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreateBody"}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOkResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Path already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/memory/str_replace":{"post":{"tags":["CopilotMemory"],"summary":"Replace a substring in a memory file (SDK contract)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryStrReplaceBody"}}}},"responses":{"200":{"description":"Replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOkResponse"}}}},"400":{"description":"Invalid input or string not found/unique","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Concurrent modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/memory/insert":{"post":{"tags":["CopilotMemory"],"summary":"Insert text at offset in a memory file (SDK contract)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryInsertBody"}}}},"responses":{"200":{"description":"Inserted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOkResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Concurrent modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/memory/delete":{"post":{"tags":["CopilotMemory"],"summary":"Delete a memory file (SDK contract)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryDeleteBody"}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOkResponse"}}}},"400":{"description":"Invalid path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/memory/rename":{"post":{"tags":["CopilotMemory"],"summary":"Rename a memory file (SDK contract)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRenameBody"}}}},"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOkResponse"}}}},"400":{"description":"Invalid input or cross-tier rename","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Concurrent modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/threads":{"get":{"tags":["CopilotThreads"],"summary":"List recent copilot threads for the authenticated user","description":"Returns up to `limit` most-recent threads (active or closed) owned by the caller, scoped to the given agent context when `agentId` is supplied or to the caller's org context when omitted, ordered by lastMessageAt desc.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20,"example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["journey-editing","global-panel"]},"required":false,"name":"sessionHost","in":"query"},{"schema":{"type":"string","enum":["editing","knowledge-chat"]},"required":false,"name":"sessionMode","in":"query"}],"responses":{"200":{"description":"Thread list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotThreadList"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Caller has no platform user record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["CopilotThreads"],"summary":"Create a copilot thread (SDK contract)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCopilotThreadBody"}}}},"responses":{"201":{"description":"Thread created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotThreadFlat"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The Slack Buddy's token asked for a thread that isn't a Slack thread","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Client-supplied id already used by a non-active thread in this scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/threads/{id}/messages":{"get":{"tags":["CopilotThreads"],"summary":"Fetch messages for a thread (for hydration on resume)","parameters":[{"schema":{"type":"string","format":"uuid","example":"11111111-1111-1111-1111-111111111111"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200,"example":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Thread messages in sequence order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotThreadMessages"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Thread not found or not owned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["CopilotThreads"],"summary":"Append a message to a copilot thread (SDK contract)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendCopilotMessageBody"}}}},"responses":{"201":{"description":"Message appended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotThreadMessageFlat"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Thread not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/threads/{id}/last-turn-error":{"get":{"tags":["CopilotThreads"],"summary":"Project the most recent failed turn as a terminal error frame","description":"Returns the most recent turn's `metadata.error` when that turn produced no assistant message. Used on reconnect to recover terminal errors whose in-flight WebSocket frame was lost (best-effort broadcasts have no replay buffer).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Latest-turn error, or `error: null` when the latest turn succeeded or no turns exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotLastTurnErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Thread not found or not owned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/threads/{id}/close":{"post":{"tags":["CopilotThreads"],"summary":"Close a copilot thread","description":"Marks a thread as closed. The caller must own the thread (same orgId + userId); otherwise 404 is returned to avoid leaking thread existence across tenants.","parameters":[{"schema":{"type":"string","format":"uuid","example":"11111111-1111-1111-1111-111111111111"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":false,"name":"orgId","in":"query"}],"responses":{"204":{"description":"Thread closed"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Thread not found or not owned by caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/threads/{id}/reopen":{"post":{"tags":["CopilotThreads"],"summary":"Reopen a copilot thread","description":"Marks a previously-closed thread active again, closing any other active thread in the same user, context, and session-host scope first.","parameters":[{"schema":{"type":"string","format":"uuid","example":"11111111-1111-1111-1111-111111111111"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":false,"name":"orgId","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["none"]}]},"required":false,"name":"expectedActiveThreadId","in":"query"}],"responses":{"200":{"description":"Thread reopened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotThreadFlat"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Thread not found or not owned by caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active thread changed before the reopen could be applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/threads/{id}":{"get":{"tags":["CopilotThreads"],"summary":"Get a copilot thread by id (SDK contract)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Thread","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotThreadFlat"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Thread not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["CopilotThreads"],"summary":"Set the title on a copilot thread (SDK contract)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCopilotThreadTitleBody"}}}},"responses":{"200":{"description":"Title updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Thread not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/copilot/turns":{"post":{"tags":["CopilotTurns"],"summary":"Persist a SDK turn-recorder snapshot","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopilotTurnIngestBody"}}}},"responses":{"201":{"description":"Turn recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org or user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/deployment-previews/{prNumber}/start":{"put":{"tags":["Deployment Previews"],"summary":"Start a deployments PR preview publication","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"prNumber","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewStart"}}}},"responses":{"200":{"description":"Preview publication started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewStartedResponse"}}}},"400":{"description":"Invalid preview publication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Preview publication superseded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Preview publication too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/deployment-previews/{prNumber}/agents/{agentPublicId}/bundle":{"put":{"tags":["Deployment Previews"],"summary":"Store a deployments PR runtime bundle","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"prNumber","in":"path"},{"schema":{"type":"string","pattern":"^agt_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$","example":"agt_KSxyAZjQ26BSNs8U9SqNF"},"required":true,"name":"agentPublicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewEnvelope"}}}},"responses":{"200":{"description":"Preview bundle stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewStoredResponse"}}}},"400":{"description":"Invalid preview bundle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Preview bundle already exists with different content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Preview bundle too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Deployment Previews"],"summary":"Get a deployments PR runtime bundle","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"prNumber","in":"path"},{"schema":{"type":"string","pattern":"^agt_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$","example":"agt_KSxyAZjQ26BSNs8U9SqNF"},"required":true,"name":"agentPublicId","in":"path"}],"responses":{"200":{"description":"Preview bundle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewEnvelope"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Preview bundle not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Stored preview bundle is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/deployment-previews/{prNumber}/ready":{"put":{"tags":["Deployment Previews"],"summary":"Publish a complete deployments PR preview set","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"prNumber","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewReady"}}}},"responses":{"200":{"description":"Preview set published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewStoredResponse"}}}},"400":{"description":"Invalid preview manifest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Preview publication superseded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Preview manifest too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/deployment-previews/{prNumber}":{"delete":{"tags":["Deployment Previews"],"summary":"Delete every bundle for a deployments PR","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"prNumber","in":"path"}],"responses":{"200":{"description":"Preview bundles deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentPreviewDeletedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/agents/{agentPublicId}/ds-owner":{"get":{"tags":["DS Owners"],"summary":"Slack member ID of the DS who owns an agent","parameters":[{"schema":{"type":"string","pattern":"^agt_[A-Za-z0-9-]+$","example":"agt_XnL7TQXyHLKph4edh2Zzn"},"required":true,"name":"agentPublicId","in":"path"}],"responses":{"200":{"description":"The owning DS, or null when the agent has none","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DsOwner"}}}},"400":{"description":"Invalid agent id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/evals":{"post":{"tags":["Evals"],"summary":"Record a finalized call and start its post-call work","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEvalBody"}}}},"responses":{"201":{"description":"Post-call work queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallFinalizedResponse"}}}},"400":{"description":"Session not found or session has no agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Post-call work could not be queued; retry the notification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["evals:write"]}]}},"/sessions/artifacts/finalized":{"post":{"tags":["Evals"],"summary":"Record a finalized call and start its post-call work","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEvalBody"}}}},"responses":{"201":{"description":"Post-call work queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallFinalizedResponse"}}}},"400":{"description":"Session not found or session has no agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Post-call work could not be queued; retry the notification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["evals:write"]}]}},"/insights/calls/{callId}/retry-grading":{"post":{"tags":["Insights"],"summary":"Retry an eligible unassessed call (Sable admin only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid"},"expectedRunId":{"type":"string","nullable":true,"minLength":1,"maxLength":255}},"required":["requestId","expectedRunId"]}}}},"responses":{"200":{"description":"Existing or newly queued grading job, or a recovery blocker","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["queued","running","finished","blocked"]},"jobId":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["status","jobId","reason"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/insights/call-summary/slack":{"post":{"tags":["Insights"],"summary":"Manually send organization-specific last-24-hours QA reports to configured Slack channels (Sable admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reportMode":{"type":"string","enum":["organization_channels_v2"]},"timezone":{"type":"string","maxLength":100,"example":"America/Fortaleza","description":"Viewer timezone used for calendar bucket boundaries."},"requestId":{"type":"string","format":"uuid"}},"required":["reportMode","timezone","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Confirmed Slack delivery or a non-production dry run","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["sent","dry_run","partial"]},"recipient":{"type":"string"},"text":{"type":"string"},"threadText":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"deliveries":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"organizationName":{"type":"string"},"recipient":{"type":"string"},"status":{"type":"string","enum":["sent","dry_run","partial","not_sent","unknown"]},"text":{"type":"string"},"threadText":{"type":"string"},"sentAt":{"type":"string","nullable":true,"format":"date-time"},"warning":{"type":"string"}},"required":["organizationId","organizationName","recipient","status","text","threadText","sentAt"]}},"warning":{"type":"string"},"sentAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["status","recipient","text","threadText","start","end","deliveries","sentAt"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/insights/call-summary":{"get":{"tags":["Insights"],"summary":"Summarize the Review call inventory (requires `insights:read`)","parameters":[{"schema":{"type":"string","format":"date-time"},"required":true,"name":"start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"end","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgs","in":"query"}],"responses":{"200":{"description":"Current call outcomes and explicit human-review completion counts","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"unreviewed":{"type":"integer","minimum":0},"failedToStart":{"type":"integer","minimum":0},"experienceFailures":{"type":"integer","minimum":0},"passes":{"type":"integer","minimum":0},"unassessed":{"type":"integer","minimum":0},"processing":{"type":"integer","minimum":0},"callsOverOneMinute":{"type":"integer","minimum":0},"smallIssueCalls":{"type":"integer","minimum":0},"failureExamples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId"]},"maxItems":3},"smallIssueExamples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId"]},"maxItems":3},"issueGroups":{"type":"object","properties":{"failures":{"type":"array","items":{"type":"object","properties":{"typeId":{"type":"string"},"title":{"type":"string"},"callCount":{"type":"integer","minimum":0,"exclusiveMinimum":true},"examples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"},"description":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId","description"]},"maxItems":5}},"required":["typeId","title","callCount","examples"]}},"smallIssues":{"type":"array","items":{"type":"object","properties":{"typeId":{"type":"string"},"title":{"type":"string"},"callCount":{"type":"integer","minimum":0,"exclusiveMinimum":true},"examples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"},"description":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId","description"]},"maxItems":5}},"required":["typeId","title","callCount","examples"]}}},"required":["failures","smallIssues"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["total","unreviewed","failedToStart","experienceFailures","passes","unassessed","processing","callsOverOneMinute","smallIssueCalls","failureExamples","smallIssueExamples","start","end","updatedAt"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]},"post":{"tags":["Insights"],"summary":"Summarize the Review call inventory (requires `insights:read`)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"orgs":{"type":"string"}},"required":["start","end"],"additionalProperties":false}}}},"responses":{"200":{"description":"Current call outcomes and explicit human-review completion counts","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"unreviewed":{"type":"integer","minimum":0},"failedToStart":{"type":"integer","minimum":0},"experienceFailures":{"type":"integer","minimum":0},"passes":{"type":"integer","minimum":0},"unassessed":{"type":"integer","minimum":0},"processing":{"type":"integer","minimum":0},"callsOverOneMinute":{"type":"integer","minimum":0},"smallIssueCalls":{"type":"integer","minimum":0},"failureExamples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId"]},"maxItems":3},"smallIssueExamples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId"]},"maxItems":3},"issueGroups":{"type":"object","properties":{"failures":{"type":"array","items":{"type":"object","properties":{"typeId":{"type":"string"},"title":{"type":"string"},"callCount":{"type":"integer","minimum":0,"exclusiveMinimum":true},"examples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"},"description":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId","description"]},"maxItems":5}},"required":["typeId","title","callCount","examples"]}},"smallIssues":{"type":"array","items":{"type":"object","properties":{"typeId":{"type":"string"},"title":{"type":"string"},"callCount":{"type":"integer","minimum":0,"exclusiveMinimum":true},"examples":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"analysisCallId":{"type":"string"},"runId":{"type":"string"},"description":{"type":"string"}},"required":["organizationId","callId","analysisCallId","runId","description"]},"maxItems":5}},"required":["typeId","title","callCount","examples"]}}},"required":["failures","smallIssues"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["total","unreviewed","failedToStart","experienceFailures","passes","unassessed","processing","callsOverOneMinute","smallIssueCalls","failureExamples","smallIssueExamples","start","end","updatedAt"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/issue-types":{"get":{"tags":["Insights"],"summary":"List Litmus issue types (requires `insights:read`)","responses":{"200":{"description":"Revisioned Litmus issue taxonomy","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string","enum":["litmus.issue-type-catalog/v1"]},"revision":{"type":"string"},"defaultRuleIssueTypeId":{"type":"string"},"issueTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"definition":{"type":"string"},"include":{"type":"array","items":{"type":"string"}},"exclude":{"type":"array","items":{"type":"string"}},"ruleIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","retired"]},"supersedes":{"type":"array","items":{"type":"string"}}},"required":["id","title","definition","include","exclude","ruleIds","status","supersedes"]}}},"required":["schema","revision","defaultRuleIssueTypeId","issueTypes"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/call-metrics/query":{"post":{"tags":["Insights"],"summary":"Query Litmus call metrics (requires `insights:read`)","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"agents":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"agentId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","agentId"]},"maxItems":100},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"minItems":1,"maxItems":32},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128},"kind":{"type":"string","enum":["summary"]}},"required":["organizationScope","start","end","metrics","kind"]},{"type":"object","properties":{"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"agents":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"agentId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","agentId"]},"maxItems":100},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"minItems":1,"maxItems":32},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128},"kind":{"type":"string","enum":["series"]},"grain":{"type":"string","enum":["hour","day","week"]},"timezone":{"type":"string","minLength":1,"maxLength":128}},"required":["organizationScope","start","end","metrics","kind","grain","timezone"]},{"type":"object","properties":{"cohorts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["a","b"]},"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"agents":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"agentId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","agentId"]},"maxItems":100}},"required":["id","organizationScope","start","end"]},"minItems":2,"maxItems":2},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"minItems":1,"maxItems":32},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128},"kind":{"type":"string","enum":["summaryComparison"]}},"required":["cohorts","metrics","kind"]},{"type":"object","properties":{"cohorts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["a","b"]},"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"agents":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"agentId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","agentId"]},"maxItems":100}},"required":["id","organizationScope","start","end"]},"minItems":2,"maxItems":2},"metrics":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"minItems":1,"maxItems":32},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128},"kind":{"type":"string","enum":["seriesComparison"]},"grain":{"type":"string","enum":["hour","day","week"]},"timezone":{"type":"string","minLength":1,"maxLength":128}},"required":["cohorts","metrics","kind","grain","timezone"]}]}}}},"responses":{"200":{"description":"Metric summary or time series","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["summary"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"analysisProfileId":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["selector","value"]}}},"required":["kind","start","end","analysisProfileId","results"]},{"type":"object","properties":{"kind":{"type":"string","enum":["series"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"grain":{"type":"string","enum":["hour","day","week"]},"timezone":{"type":"string"},"analysisProfileId":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"points":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["start","value"]}}},"required":["selector","points"]}}},"required":["kind","start","end","grain","timezone","analysisProfileId","results"]},{"type":"object","properties":{"kind":{"type":"string","enum":["summaryComparison"]},"analysisProfileId":{"type":"string"},"cohorts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","enum":["a"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["selector","value"]}}},"required":["id","start","end","results"]},{"type":"object","properties":{"id":{"type":"string","enum":["b"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["selector","value"]}}},"required":["id","start","end","results"]}]},"minItems":2,"maxItems":2}},"required":["kind","analysisProfileId","cohorts"]},{"type":"object","properties":{"kind":{"type":"string","enum":["seriesComparison"]},"grain":{"type":"string","enum":["hour","day","week"]},"timezone":{"type":"string"},"analysisProfileId":{"type":"string"},"cohorts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","enum":["a"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"points":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["start","value"]}}},"required":["selector","points"]}}},"required":["id","start","end","results"]},{"type":"object","properties":{"id":{"type":"string","enum":["b"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"points":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["start","value"]}}},"required":["selector","points"]}}},"required":["id","start","end","results"]}]},"minItems":2,"maxItems":2}},"required":["kind","grain","timezone","analysisProfileId","cohorts"]}]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/calls/{callId}/artifacts":{"get":{"tags":["Insights"],"summary":"Read Litmus call evidence (requires `insights:read`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Call evidence and recording","content":{"application/json":{"schema":{"type":"object","properties":{"sessionStartedAt":{"type":"string","nullable":true},"recordingStartedAt":{"type":"string","nullable":true},"recordingUrl":{"type":"string","nullable":true,"format":"uri"},"recordingTracks":{"type":"array","items":{"type":"object","properties":{"trackSid":{"type":"string"},"participant":{"type":"string"},"kind":{"type":"string","enum":["audio","video"]},"name":{"type":"string","example":"browser-screen"},"offsetMs":{"type":"integer","minimum":0},"url":{"type":"string"}},"required":["trackSid","participant","kind","name","offsetMs","url"]},"description":"Present for track recordings; recordingUrl is null. Tracks start at offsetMs on recordingStartedAt."},"recordingDurationMs":{"type":"integer","minimum":0,"description":"Present with recordingTracks: the duration from recordingStartedAt to the latest track end."},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"timestamp":{"type":"string"},"data":{"type":"object","additionalProperties":true},"duration_ms":{"type":"number","nullable":true},"call_id":{"type":"string"}},"required":["id","type","timestamp","data"]}}},"required":["sessionStartedAt","recordingStartedAt","recordingUrl","events"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/findings-search/readiness":{"get":{"tags":["Insights"],"summary":"Check findings search readiness (requires `insights:read`)","responses":{"200":{"description":"Historical findings search preparation status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindingsSearchReadiness"}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/call-facets/query":{"post":{"tags":["Insights"],"summary":"Query Litmus call facets (requires `insights:read`)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"includeUnanalyzed":{"type":"boolean"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128}},"required":["organizationScope","start","end"]}}}},"responses":{"200":{"description":"Agent facets for the selected call scope","content":{"application/json":{"schema":{"type":"object","properties":{"callTypesSupported":{"type":"boolean"},"agents":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"callCount":{"type":"integer","minimum":0}},"required":["organizationId","id","name","callCount"]}}},"required":["callTypesSupported","agents"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/calls/search":{"post":{"tags":["Insights"],"summary":"Search Litmus calls (requires `insights:read`)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"includeUnanalyzed":{"type":"boolean"},"humanReview":{"type":"string","enum":["unreviewed","complete"]},"searchText":{"type":"string","minLength":2,"maxLength":256,"description":"Case-insensitive literal substring of call details: participant name, email, external user ID, organization, agent, or call ID. Does not search findings."},"excludeE2e":{"type":"boolean","description":"Exclude E2E calls."},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128},"callTypes":{"type":"array","items":{"type":"string","enum":["billed","organization","sable","e2e"]},"maxItems":4},"decisions":{"type":"array","items":{"type":"string","enum":["pass","fail","failed_to_start","unassessed","processing"]},"maxItems":32},"agents":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"agentId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","agentId"]},"maxItems":32},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32},"minimumDurationMs":{"type":"number","minimum":0},"maximumDurationMs":{"type":"number","minimum":0},"cursor":{"type":"string","nullable":true},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["organizationScope","start","end"],"additionalProperties":false}}}},"responses":{"200":{"description":"Cursor-paginated call analyses","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"runId":{"type":"string","nullable":true},"analysisStatus":{"type":"string","enum":["available","unavailable"]},"assessmentStatus":{"type":"string","enum":["pass","fail","failed_to_start","unassessed","processing"]},"assessmentFailureReason":{"type":"string","nullable":true,"enum":["provider_timeout"]},"humanReviewed":{"type":"boolean"},"humanReviewStatus":{"type":"string","enum":["not_started","in_progress","complete"]},"callStartedAt":{"type":"string","format":"date-time"},"callEndedAt":{"type":"string","nullable":true,"format":"date-time"},"durationMs":{"type":"number","nullable":true},"agentId":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":true},"callType":{"type":"string","nullable":true,"enum":["billed","organization","sable","e2e",null]},"decision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"evidenceCoverage":{"type":"string","nullable":true,"enum":["complete","partial",null]},"issueCount":{"type":"integer","nullable":true,"minimum":0},"issueOccurrenceCount":{"type":"integer","nullable":true,"minimum":0},"issueTypeIds":{"type":"array","items":{"type":"string"}},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"participant":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"externalUserId":{"type":"string","nullable":true}},"required":["name","email","externalUserId"]},"csat":{"type":"object","nullable":true,"properties":{"rating":{"type":"number","minimum":0},"scaleMax":{"type":"integer","minimum":1,"maximum":10}},"required":["rating","scaleMax"]},"matches":{"type":"array","items":{"type":"object","properties":{"issueId":{"type":"string"},"occurrenceId":{"type":"string","nullable":true},"startMs":{"type":"number","nullable":true,"minimum":0},"text":{"type":"string"},"highlights":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":0},"minItems":2,"maxItems":2}}},"required":["issueId","occurrenceId","startMs","text","highlights"]},"maxItems":2}},"required":["organizationId","callId","runId","callStartedAt","callEndedAt","durationMs","agentId","agentName","decision","evidenceCoverage","issueCount","issueOccurrenceCount","issueTypeIds","publishedAt","participant"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/calls/lookup":{"post":{"tags":["Insights"],"summary":"Find analyzed calls without a date filter (requires `insights:read`)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"search":{"type":"string","maxLength":128},"cursor":{"type":"string","nullable":true,"minLength":1,"maxLength":4096},"limit":{"type":"integer","minimum":1,"maximum":50},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128}},"required":["organizationScope"]}}}},"responses":{"200":{"description":"Matching calls","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string"},"agentId":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":true},"callStartedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"number"},"decision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"assessmentStatus":{"type":"string","enum":["pass","fail","failed_to_start","unassessed","processing"]},"assessmentFailureReason":{"type":"string","nullable":true,"enum":["provider_timeout"]},"issueCount":{"type":"integer","minimum":0},"issueOccurrenceCount":{"type":"integer","minimum":0}},"required":["organizationId","callId","agentId","agentName","callStartedAt","durationMs","decision","issueCount","issueOccurrenceCount"]}},"nextCursor":{"type":"string","nullable":true,"minLength":1,"default":null}},"required":["items"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/calls/compare":{"post":{"tags":["Insights"],"summary":"Compare two analyzed calls (requires `insights:read`)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationScope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["organizations"]},"organizationIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","organizationIds"]}]},"calls":{"type":"array","items":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","callId"]},"minItems":2,"maxItems":2},"analysisProfileId":{"type":"string","minLength":1,"maxLength":128}},"required":["organizationScope","calls"]}}}},"responses":{"200":{"description":"Exact-call metric comparison","content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","enum":["a"]},"call":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","callId"]},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["selector","value"]}}},"required":["id","call","results"]},{"type":"object","properties":{"id":{"type":"string","enum":["b"]},"call":{"type":"object","properties":{"organizationId":{"type":"string"},"callId":{"type":"string","minLength":1,"maxLength":255}},"required":["organizationId","callId"]},"results":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"object","properties":{"metric":{"type":"string","enum":["analyzed_call_count","hitl_intervened_call_count","analyzed_calls_per_day","submitted_call_count","call_analysis_coverage_rate","call_quality_evidence_coverage_rate","call_quality_failure_rate","call_quality_failure_count","analysis_job_failure_rate","agent_response_latency","provider_cached_input_token_ratio","local_model_response_cache_hit_rate","issue_affected_call_rate","issue_occurrence_count"]},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]},{"nullable":true}]},"issueTypeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":32}},"required":["metric"]},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["count"]},"value":{"type":"number"}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ratio"]},"value":{"type":"number"},"numerator":{"type":"number"},"denominator":{"type":"number"}},"required":["kind","value","numerator","denominator"]},{"type":"object","properties":{"kind":{"type":"string","enum":["duration"]},"valueMs":{"type":"number"},"percentile":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[95]},{"type":"number","enum":[99]}]},"samples":{"type":"number"}},"required":["kind","valueMs","percentile","samples"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rate"]},"value":{"type":"number"},"unit":{"type":"string","enum":["calls_per_day"]},"count":{"type":"integer","minimum":0},"durationDays":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["kind","value","unit","count","durationDays"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unavailable"]},"reason":{"type":"string"}},"required":["kind","reason"]}]}},"required":["selector","value"]}}},"required":["id","call","results"]}]},"minItems":2,"maxItems":2}},"required":["calls"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]}},"/insights/calls/{callId}/review":{"get":{"tags":["Insights"],"summary":"Get a Litmus call review (requires `insights:read`)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Current call review projection","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"startupFailure":{"type":"object","nullable":true,"properties":{"stage":{"type":"string","enum":["connection_details","room_connect","agent_never_joined","media_blocked","browser_claim_failed","agent_readiness_timeout","speech_delivery_failed","opening_view_failed","browser_first_frame_timeout","reconnect"],"description":"Where a startup or in-call failure was observed, including a browser first-frame timeout that may be reported before interrupting the call."},"error":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time"}},"required":["stage","error","receivedAt"]},"gradingComplete":{"type":"boolean"},"schema":{"type":"string","enum":["sable.insight-call-review/v4"]},"sessionId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"externalSessionId":{"type":"string","nullable":true},"reviewSessionStartedAt":{"type":"string","format":"date-time"},"callId":{"type":"string"},"runId":{"type":"string"},"humanReviewSupported":{"type":"boolean"},"callReview":{"type":"object","nullable":true,"properties":{"independent":{"type":"boolean"},"baselineRunId":{"type":"string","nullable":true},"pendingFindingIds":{"type":"array","items":{"type":"string"}},"snapshotFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"typeId":{"type":"string"},"title":{"type":"string"},"reviewerReason":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"startMs":{"type":"number"},"experienceClassification":{"type":"object","nullable":true,"properties":{"experienceBreaking":{"type":"boolean"}},"required":["experienceBreaking"]}},"required":["id","typeId","startMs"]}},"reviewed":{"type":"boolean"},"decision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"issueCount":{"type":"integer","nullable":true,"minimum":0},"issueOccurrenceCount":{"type":"integer","nullable":true,"minimum":0},"metricsPending":{"type":"boolean"},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["reviewed","reviewerId","reviewerEmail","revision","updatedAt"]},"automatedDecision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"additionalFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"review":{"type":"object","properties":{"experienceBreaking":{"type":"boolean","nullable":true},"context":{"type":"object","nullable":true,"properties":{"sourceId":{"type":"string"},"kind":{"type":"string","enum":["human_comment","intervention"]},"description":{"type":"string"},"startMs":{"type":"number","minimum":0}},"required":["sourceId","kind","description","startMs"]},"decision":{"type":"string","enum":["confirmed","misflag","unreviewed"]},"reason":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["accepted","dismissed","corrected",null]},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["decision","reason","reviewerId","reviewerEmail","revision","updatedAt"]}},"required":["id","review"]}},"ragAssessment":{"type":"object","nullable":true,"properties":{"assessmentId":{"type":"string"},"originalRunId":{"type":"string"},"policyRevision":{"type":"string"},"assessmentRevision":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["completed","inconclusive","not_observed","unavailable"]},"retrievalEventCount":{"type":"integer","minimum":0},"evaluatedTaskCount":{"type":"integer","minimum":0},"issueCount":{"type":"integer","minimum":0},"unknownRuleCount":{"type":"integer","minimum":0},"modelCalls":{"type":"integer","minimum":0},"inputTokens":{"type":"integer","minimum":0},"outputTokens":{"type":"integer","minimum":0}},"required":["assessmentId","originalRunId","policyRevision","assessmentRevision","createdAt","status","retrievalEventCount","evaluatedTaskCount","issueCount","unknownRuleCount","modelCalls","inputTokens","outputTokens"]},"callStartedAt":{"type":"string","format":"date-time"},"callEndedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"number"},"recording":{"type":"object","nullable":true,"properties":{"startMs":{"type":"number"},"endMs":{"type":"number"},"uncertaintyMs":{"type":"number"}},"required":["startMs","endMs","uncertaintyMs"]},"actors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"}},"required":["id","kind","label"]}},"decision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"assessmentStatus":{"type":"string","enum":["pass","fail","failed_to_start","unassessed","processing"]},"assessmentFailureReason":{"type":"string","nullable":true,"enum":["provider_timeout"]},"processingStatus":{"type":"string","nullable":true,"enum":["not_requested","waiting_for_record","queued","running","succeeded","failed","cancelled",null]},"evidenceCoverage":{"type":"string","enum":["complete","partial"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"participant":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"externalUserId":{"type":"string","nullable":true},"company":{"type":"string","nullable":true}},"required":["name","email","externalUserId","company"]},"feedback":{"allOf":[{"$ref":"#/components/schemas/OutroFeedback"},{"nullable":true}]},"deployment":{"type":"object","properties":{"agentId":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":true},"environment":{"type":"string","nullable":true},"configVersion":{"type":"object","nullable":true,"properties":{"number":{"type":"integer","minimum":0,"exclusiveMinimum":true},"environment":{"type":"string","nullable":true},"sourceRef":{"type":"string","nullable":true}},"required":["number","environment","sourceRef"]},"link":{"type":"object","nullable":true,"properties":{"ref":{"type":"string"},"label":{"type":"string","nullable":true}},"required":["ref","label"]}},"required":["agentId","agentName","environment","configVersion","link"]},"lifecycle":{"type":"object","properties":{"startedAt":{"type":"string","format":"date-time"},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"closedAt":{"type":"string","nullable":true,"format":"date-time"},"endedAt":{"type":"string","nullable":true,"format":"date-time"},"lastSeenAt":{"type":"string","nullable":true,"format":"date-time"},"durationMs":{"type":"number","nullable":true,"minimum":0},"completed":{"type":"boolean"},"endedBy":{"type":"string","nullable":true,"enum":["user","admin","agent",null]},"closureReason":{"type":"string","nullable":true}},"required":["startedAt","connectedAt","closedAt","endedAt","lastSeenAt","durationMs","completed","endedBy","closureReason"]},"summary":{"type":"string","nullable":true},"extraction":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["pending","complete","failed","skipped"]},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","number","boolean","date","select"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true}]},"evidence":{"type":"string","nullable":true},"rejected":{"type":"object","properties":{"reason":{"type":"string"},"raw":{"type":"string"}},"required":["reason","raw"]}},"required":["key","label","type","value","evidence"]}}},"required":["status","fields"]},"identifiers":{"type":"object","properties":{"correlationId":{"type":"string","nullable":true}},"required":["correlationId"]},"analysis":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"policyId":{"type":"string"},"policyRevision":{"type":"string"},"issueTypeCatalogRevision":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["createdAt","policyId","policyRevision","issueTypeCatalogRevision","warnings"]},"events":{"type":"object","properties":{"schema":{"type":"string","enum":["sable.insight-call-events/v1"]},"availability":{"type":"string","enum":["complete","partial"]},"sources":{"type":"object","properties":{"artifacts":{"type":"string","enum":["available","unavailable"]},"analysis":{"type":"string","enum":["available"]},"database":{"type":"string","enum":["available"]}},"required":["artifacts","analysis","database"]},"counts":{"type":"object","properties":{"all":{"type":"integer","minimum":0},"relevant":{"type":"integer","minimum":0},"failures":{"type":"integer","minimum":0}},"required":["all","relevant","failures"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"atMs":{"type":"number","minimum":0},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["tool_call","hitl","operational_failure","reported_error","state_change","lifecycle"]},"reviewAnchorId":{"type":"string","nullable":true},"severity":{"type":"string","enum":["info","warning","error"]},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"status":{"type":"string","nullable":true,"enum":["succeeded","failed","incomplete",null]},"durationMs":{"type":"number","nullable":true,"minimum":0},"relevant":{"type":"boolean"},"properties":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"truncated":{"type":"boolean"}},"required":["label","value","truncated"]}}},"required":["id","atMs","occurredAt","kind","severity","title","summary","status","durationMs","relevant","properties"]}}},"required":["schema","availability","sources","counts","events"]},"transcript":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reviewAnchorId":{"type":"string","nullable":true},"sequence":{"type":"number"},"startMs":{"type":"number","nullable":true},"endMs":{"type":"number","nullable":true},"speakerId":{"type":"string"},"text":{"type":"string"},"playouts":{"type":"array","items":{"type":"object","properties":{"audibleMs":{"type":"number","nullable":true},"delivered":{"type":"boolean","nullable":true}},"required":["audibleMs","delivered"]}}},"required":["id","reviewAnchorId","sequence","startMs","endMs","speakerId","text","playouts"]}},"taskOutcomeAnnotations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startMs":{"type":"number"},"description":{"type":"string"},"experienceClassification":{"type":"object","nullable":true,"properties":{"experienceBreaking":{"type":"boolean"},"reason":{"type":"string","minLength":1},"pattern":{"type":"string","nullable":true,"enum":["repeated-prompt-loop","user-request-ignored","wrong-action-or-destination","essential-action-failed-without-recovery","material-misinformation","user-interruption-ignored","meaningful-choice-bypassed","essential-response-cut-off",null]},"policyVersion":{"type":"string","enum":["experience-breaking/v1","experience-breaking/v2"]}},"required":["experienceBreaking","reason","pattern","policyVersion"],"oneOf":[{"type":"object","properties":{"experienceBreaking":{"enum":[true]},"policyVersion":{"enum":["experience-breaking/v1"]},"pattern":{"type":"string"}}},{"type":"object","properties":{"experienceBreaking":{"enum":[true]},"policyVersion":{"enum":["experience-breaking/v2"]}}},{"type":"object","properties":{"experienceBreaking":{"enum":[false]},"pattern":{"enum":[null]}}},{"type":"object","nullable":true,"enum":[null]}]},"review":{"type":"object","nullable":true,"properties":{"experienceBreaking":{"type":"boolean","nullable":true},"context":{"type":"object","nullable":true,"properties":{"sourceId":{"type":"string"},"kind":{"type":"string","enum":["human_comment","intervention"]},"description":{"type":"string"},"startMs":{"type":"number","minimum":0}},"required":["sourceId","kind","description","startMs"]},"decision":{"type":"string","enum":["confirmed","misflag","unreviewed"]},"reason":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["accepted","dismissed","corrected",null]},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["decision","reason","reviewerId","reviewerEmail","revision","updatedAt"]},"linearEligible":{"type":"boolean"},"linear":{"type":"object","nullable":true,"properties":{"deliveryState":{"type":"string"},"issueId":{"type":"string","nullable":true},"issueIdentifier":{"type":"string","nullable":true},"issueUrl":{"type":"string","nullable":true},"issueStatus":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["deliveryState","issueId","issueIdentifier","issueUrl","issueStatus","assigneeName","syncedAt"]}},"required":["id","startMs","description"]}},"issues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"typeId":{"type":"string"},"title":{"type":"string"},"occurrences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startMs":{"type":"number"},"descriptionParts":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"experienceClassification":{"type":"object","nullable":true,"properties":{"experienceBreaking":{"type":"boolean"},"reason":{"type":"string","minLength":1},"pattern":{"type":"string","nullable":true,"enum":["repeated-prompt-loop","user-request-ignored","wrong-action-or-destination","essential-action-failed-without-recovery","material-misinformation","user-interruption-ignored","meaningful-choice-bypassed","essential-response-cut-off",null]},"policyVersion":{"type":"string","enum":["experience-breaking/v1","experience-breaking/v2"]}},"required":["experienceBreaking","reason","pattern","policyVersion"],"oneOf":[{"type":"object","properties":{"experienceBreaking":{"enum":[true]},"policyVersion":{"enum":["experience-breaking/v1"]},"pattern":{"type":"string"}}},{"type":"object","properties":{"experienceBreaking":{"enum":[true]},"policyVersion":{"enum":["experience-breaking/v2"]}}},{"type":"object","properties":{"experienceBreaking":{"enum":[false]},"pattern":{"enum":[null]}}},{"type":"object","nullable":true,"enum":[null]}]},"review":{"type":"object","nullable":true,"properties":{"experienceBreaking":{"type":"boolean","nullable":true},"context":{"type":"object","nullable":true,"properties":{"sourceId":{"type":"string"},"kind":{"type":"string","enum":["human_comment","intervention"]},"description":{"type":"string"},"startMs":{"type":"number","minimum":0}},"required":["sourceId","kind","description","startMs"]},"decision":{"type":"string","enum":["confirmed","misflag","unreviewed"]},"reason":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["accepted","dismissed","corrected",null]},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["decision","reason","reviewerId","reviewerEmail","revision","updatedAt"]},"linearEligible":{"type":"boolean"},"linear":{"type":"object","nullable":true,"properties":{"deliveryState":{"type":"string"},"issueId":{"type":"string","nullable":true},"issueIdentifier":{"type":"string","nullable":true},"issueUrl":{"type":"string","nullable":true},"issueStatus":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["deliveryState","issueId","issueIdentifier","issueUrl","issueStatus","assigneeName","syncedAt"]}},"required":["id","startMs","descriptionParts"]}}},"required":["id","typeId","title","occurrences"]}}},"required":["schema","sessionId","reviewSessionStartedAt","callId","runId","callStartedAt","callEndedAt","durationMs","recording","actors","decision","evidenceCoverage","organization","participant","deployment","lifecycle","summary","extraction","identifiers","analysis","events","transcript","taskOutcomeAnnotations","issues"]},{"type":"object","properties":{"decision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"startupFailure":{"type":"object","nullable":true,"properties":{"stage":{"type":"string","enum":["connection_details","room_connect","agent_never_joined","media_blocked","browser_claim_failed","agent_readiness_timeout","speech_delivery_failed","opening_view_failed","browser_first_frame_timeout","reconnect"],"description":"Where a startup or in-call failure was observed, including a browser first-frame timeout that may be reported before interrupting the call."},"error":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time"}},"required":["stage","error","receivedAt"]},"processingStatus":{"type":"string","nullable":true,"enum":["not_requested","waiting_for_record","queued","running","succeeded","failed","cancelled",null]},"assessmentStatus":{"type":"string","enum":["pass","fail","failed_to_start","unassessed","processing"]},"assessmentFailureReason":{"type":"string","nullable":true,"enum":["provider_timeout"]},"schema":{"type":"string","enum":["sable.insight-call-review/unavailable"]},"externalSessionId":{"type":"string","nullable":true},"canReview":{"type":"boolean"},"humanReviewSupported":{"type":"boolean"},"callReview":{"type":"object","nullable":true,"properties":{"independent":{"type":"boolean"},"baselineRunId":{"type":"string","nullable":true},"pendingFindingIds":{"type":"array","items":{"type":"string"}},"snapshotFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"typeId":{"type":"string"},"title":{"type":"string"},"reviewerReason":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"startMs":{"type":"number"},"experienceClassification":{"type":"object","nullable":true,"properties":{"experienceBreaking":{"type":"boolean"}},"required":["experienceBreaking"]}},"required":["id","typeId","startMs"]}},"reviewed":{"type":"boolean"},"decision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"issueCount":{"type":"integer","nullable":true,"minimum":0},"issueOccurrenceCount":{"type":"integer","nullable":true,"minimum":0},"metricsPending":{"type":"boolean"},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["reviewed","reviewerId","reviewerEmail","revision","updatedAt"]},"additionalFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"review":{"type":"object","properties":{"experienceBreaking":{"type":"boolean","nullable":true},"context":{"type":"object","nullable":true,"properties":{"sourceId":{"type":"string"},"kind":{"type":"string","enum":["human_comment","intervention"]},"description":{"type":"string"},"startMs":{"type":"number","minimum":0}},"required":["sourceId","kind","description","startMs"]},"decision":{"type":"string","enum":["confirmed","misflag","unreviewed"]},"reason":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["accepted","dismissed","corrected",null]},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["decision","reason","reviewerId","reviewerEmail","revision","updatedAt"]}},"required":["id","review"]}},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"participant":{"type":"object","nullable":true,"properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"externalUserId":{"type":"string","nullable":true},"company":{"type":"string","nullable":true}},"required":["name","email","externalUserId","company"]},"feedback":{"allOf":[{"$ref":"#/components/schemas/OutroFeedback"},{"nullable":true}]},"deployment":{"type":"object","properties":{"agentId":{"type":"string","nullable":true},"agentName":{"type":"string","nullable":true},"environment":{"type":"string","nullable":true},"configVersion":{"type":"object","nullable":true,"properties":{"number":{"type":"integer","minimum":0,"exclusiveMinimum":true},"environment":{"type":"string","nullable":true},"sourceRef":{"type":"string","nullable":true}},"required":["number","environment","sourceRef"]},"link":{"type":"object","nullable":true,"properties":{"ref":{"type":"string"},"label":{"type":"string","nullable":true}},"required":["ref","label"]}},"required":["agentId","agentName","environment","configVersion","link"]},"startedAt":{"type":"string","format":"date-time"},"summary":{"type":"string","nullable":true},"transcript":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"content":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","role","content","createdAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"atMs":{"type":"number","minimum":0},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["tool_call","hitl","operational_failure","reported_error","state_change","lifecycle"]},"reviewAnchorId":{"type":"string","nullable":true},"severity":{"type":"string","enum":["info","warning","error"]},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"status":{"type":"string","nullable":true,"enum":["succeeded","failed","incomplete",null]},"durationMs":{"type":"number","nullable":true,"minimum":0},"relevant":{"type":"boolean"},"properties":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"truncated":{"type":"boolean"}},"required":["label","value","truncated"]}}},"required":["id","atMs","occurredAt","kind","severity","title","summary","status","durationMs","relevant","properties"]}},"callId":{"type":"string"},"sessionId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"consumerOrgId":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["schema","canReview","organization","participant","deployment","startedAt","summary","transcript","events","callId","sessionId","consumerOrgId"]}]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["insights:read"]}]},"put":{"tags":["Insights"],"summary":"Mark a call as human reviewed (Sable admin only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","nullable":true,"minLength":1,"maxLength":255},"reviewed":{"type":"boolean"},"expectedRevision":{"type":"integer","minimum":0},"findingRevisions":{"type":"object","additionalProperties":{"type":"integer","minimum":0}}},"required":["runId","reviewed","expectedRevision"]}}}},"responses":{"200":{"description":"Saved call review marker","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"object","properties":{"independent":{"type":"boolean"},"baselineRunId":{"type":"string","nullable":true},"pendingFindingIds":{"type":"array","items":{"type":"string"}},"snapshotFindings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"typeId":{"type":"string"},"title":{"type":"string"},"reviewerReason":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"startMs":{"type":"number"},"experienceClassification":{"type":"object","nullable":true,"properties":{"experienceBreaking":{"type":"boolean"}},"required":["experienceBreaking"]}},"required":["id","typeId","startMs"]}},"reviewed":{"type":"boolean"},"decision":{"type":"string","nullable":true,"enum":["pass","fail",null]},"issueCount":{"type":"integer","nullable":true,"minimum":0},"issueOccurrenceCount":{"type":"integer","nullable":true,"minimum":0},"metricsPending":{"type":"boolean"},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["reviewed","reviewerId","reviewerEmail","revision","updatedAt"]}},"required":["review"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis or call review changed; reload before saving","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/insights/calls/{callId}/findings/{findingId}/review":{"put":{"tags":["Insights"],"summary":"Review an individual Litmus finding (Sable admin only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"findingId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"experienceBreaking":{"type":"boolean"},"runId":{"type":"string","nullable":true,"minLength":1,"maxLength":255},"decision":{"type":"string","enum":["confirmed","misflag","unreviewed"]},"reason":{"type":"string","nullable":true,"maxLength":1000},"expectedRevision":{"type":"integer","minimum":0},"outcome":{"type":"string","nullable":true,"enum":["accepted","dismissed","corrected",null]}},"required":["runId","decision","reason","expectedRevision"]}}}},"responses":{"200":{"description":"Saved reviewer decision","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"object","properties":{"experienceBreaking":{"type":"boolean","nullable":true},"context":{"type":"object","nullable":true,"properties":{"sourceId":{"type":"string"},"kind":{"type":"string","enum":["human_comment","intervention"]},"description":{"type":"string"},"startMs":{"type":"number","minimum":0}},"required":["sourceId","kind","description","startMs"]},"decision":{"type":"string","enum":["confirmed","misflag","unreviewed"]},"reason":{"type":"string","nullable":true},"outcome":{"type":"string","nullable":true,"enum":["accepted","dismissed","corrected",null]},"reviewerId":{"type":"string"},"reviewerEmail":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true},"updatedAt":{"type":"string","format":"date-time"}},"required":["decision","reason","reviewerId","reviewerEmail","revision","updatedAt"]}},"required":["review"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis or finding review changed; reload before saving","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/insights/calls/{callId}/findings/{findingId}/linear":{"post":{"tags":["Insights"],"summary":"Create or link an Engineering issue for a confirmed Litmus finding (Sable admin only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"findingId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":255},"issueIdentifier":{"type":"string","pattern":"^ENG-[1-9]\\d*$/i"}},"required":["runId"]}}}},"responses":{"200":{"description":"Tracked finding","content":{"application/json":{"schema":{"type":"object","properties":{"linear":{"type":"object","nullable":true,"properties":{"deliveryState":{"type":"string"},"issueId":{"type":"string","nullable":true},"issueIdentifier":{"type":"string","nullable":true},"issueUrl":{"type":"string","nullable":true},"issueStatus":{"type":"string","nullable":true},"assigneeName":{"type":"string","nullable":true},"syncedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["deliveryState","issueId","issueIdentifier","issueUrl","issueStatus","assigneeName","syncedAt"]}},"required":["linear"]}}}},"400":{"description":"Invalid finding tracking request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call, finding, customer, or Engineering issue not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Finding is not eligible or Linear handoff conflicted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Litmus or Linear returned an invalid response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus or Linear is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/insights/calls/{callId}/review/translate":{"post":{"tags":["Insights"],"summary":"Translate a call review's transcript for display (Sable admin only)","description":"Renders the supplied review transcript lines in `targetLanguage`, reading `context` (the lines just before them) for consistency. Display-only and Sable-admin-only: the lines are the ones the review already returned, so they are sent rather than re-fetched from Litmus. Lines already in the target language come back with `translatedText: null`; lines the model could not translate are listed in `failedIds`.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateReviewTranscriptBody"}}}},"responses":{"200":{"description":"Translations for the supplied lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptTranslationResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Translation unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/insights/calls/{callId}/recording-url":{"get":{"tags":["Insights"],"summary":"Get a short-lived call recording URL (Sable admin only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"Short-lived verified recording URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"},"sha256":{"type":"string","minLength":64,"maxLength":64}},"required":["url","expiresAt","sha256"]}}}},"400":{"description":"Invalid Insights query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call analysis not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Analysis contract upgrade pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Invalid response from Litmus","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Litmus analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/grading/evaluations":{"get":{"tags":["Grading"],"summary":"List session-grading evaluations (scalar)","description":"Org-scoped, newest-first, cursor-paginated scalar list.","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":42},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"rubricId","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"true"},"required":false,"name":"passed","in":"query"},{"schema":{"type":"string","minLength":1,"example":"eyJjIjoiMjAyNi0wNC0xMFQxODozMDowMC4wMDBaIiwiaSI6IjU1MGU4NDAwLi4uIn0","description":"Opaque pagination cursor from a prior response's nextCursor; treat as opaque."},"required":false,"description":"Opaque pagination cursor from a prior response's nextCursor; treat as opaque.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":50,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"example":"veronica"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","example":"2026-05-01"},"required":false,"name":"dateFrom","in":"query"},{"schema":{"type":"string","example":"2026-06-02"},"required":false,"name":"dateTo","in":"query"},{"schema":{"type":"string","example":"consumer"},"required":false,"name":"asRole","in":"query"}],"responses":{"200":{"description":"List of evaluations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingEvaluationListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:read"]}]}},"/grading/evaluations/{id}":{"get":{"tags":["Grading"],"summary":"Get a single evaluation (full detail)","description":"Sable admins may pass `orgId` to read another org's scorecard; non-admins are scoped to their own org and a cross-org id 404s.","parameters":[{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Evaluation detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingEvaluation"}}}},"404":{"description":"Evaluation not found (missing or cross-org)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:read"]}]}},"/grading/sessions/{sessionId}/evaluation":{"get":{"tags":["Grading"],"summary":"Get the latest evaluation attempt for a session","description":"Sable admins may pass `orgId` to read another org's scorecard; non-admins are scoped to their own org and a cross-org session 404s.","parameters":[{"schema":{"type":"string","minLength":1,"example":"session_abc123"},"required":true,"name":"sessionId","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Latest evaluation for the session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingEvaluation"}}}},"404":{"description":"No evaluation for this session (missing or cross-org)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:read"]}]}},"/grading/evaluations/{sessionId}/run":{"post":{"tags":["Grading"],"summary":"Manually re-grade a session (fresh attempt)","description":"Sable admin only. The `{sessionId}` is the globally-unique external session id, which alone determines the org — the org is resolved from the session, so no `orgId` is required. Enqueues a new attempt.","parameters":[{"schema":{"type":"string","minLength":1,"example":"session_abc123"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Re-run enqueued; the new evaluation row","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingEvaluation"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not gradeable or no rubric bound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A re-run for this session is already in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/grading/evaluations/reap-stuck":{"post":{"tags":["Grading"],"summary":"Reap stuck 'running' evaluations (admin only)","description":"Bulk-marks evaluations stuck in 'running' longer than `thresholdMinutes` (default 30) as 'failed'. Sable admin only. Body is ignored — pass `thresholdMinutes` as a query param.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":1440,"example":30,"description":"Running evaluations older than this (minutes) are reaped; default 30"},"required":false,"description":"Running evaluations older than this (minutes) are reaped; default 30","name":"thresholdMinutes","in":"query"}],"responses":{"200":{"description":"Reap summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReapStuckGradingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/grading/rubrics":{"post":{"tags":["Grading"],"summary":"Create a grading rubric","description":"The target org is resolved from the orgId query param.","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGradingRubricBody"}}}},"responses":{"201":{"description":"Rubric created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingRubric"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:write"]}]},"get":{"tags":["Grading"],"summary":"List an org's grading rubrics","description":"The target org is resolved from the orgId query param.","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"List of rubrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingRubricListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:read"]}]}},"/grading/rubrics/{id}":{"get":{"tags":["Grading"],"summary":"Get a grading rubric","description":"The target org is resolved from the orgId query param.","parameters":[{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Rubric detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingRubric"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Rubric not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:read"]}]},"put":{"tags":["Grading"],"summary":"Update a grading rubric","description":"Full replace of the rubric's editable fields (validated by the same invariants as create). The target org is resolved from the orgId query param. Past scorecards are unaffected — each froze its own rubric snapshot.","parameters":[{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGradingRubricBody"}}}},"responses":{"200":{"description":"Rubric updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingRubric"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Rubric not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:write"]}]},"delete":{"tags":["Grading"],"summary":"Delete a grading rubric (soft delete + auto-unbind)","description":"Sable admin only. Soft-deletes the rubric and detaches it from every agent in the org that used it — those agents stop auto-grading until rebound. The target org is resolved from the orgId query param.","parameters":[{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Rubric deleted; returns how many agents were detached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGradingRubricResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Rubric not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/grading/rubrics/{id}/stats":{"get":{"tags":["Grading"],"summary":"Aggregate scorecard stats for a rubric","description":"Returns graded count, average score, pass rate, and needs-review count for one rubric.","parameters":[{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Rubric stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingRubricStatsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Rubric not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:read"]}]}},"/grading/agents/{agentId}/rubric":{"put":{"tags":["Grading"],"summary":"Bind (or unbind) a rubric to an agent","description":"Pass `{ rubricId: null }` to detach. The target org is resolved from the orgId query param.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":42},"required":true,"name":"agentId","in":"path"},{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"example":"org_abc123"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindGradingRubricBody"}}}},"responses":{"204":{"description":"Rubric bound / unbound"},"400":{"description":"Rubric and agent are not in the same org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Rubric not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["grading:write"]}]}},"/grading/evaluations/{id}/results":{"put":{"tags":["Grading"],"summary":"Submit participant scorecard results for a grading attempt","description":"Called by the evals service after running the participant scorecard program. Requires service token or Sable admin.","parameters":[{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitGradingResultsBody"}}}},"responses":{"200":{"description":"Results accepted; evaluation marked terminal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingEvaluation"}}}},"404":{"description":"Evaluation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Evaluation is not in a writable state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/grading/evaluations/{id}/fail":{"put":{"tags":["Grading"],"summary":"Mark a participant scorecard attempt as failed","description":"Called by the evals service when it cannot produce a participant scorecard. Requires service token or Sable admin.","parameters":[{"schema":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitGradingFailureBody"}}}},"responses":{"200":{"description":"Failure accepted; evaluation marked failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingEvaluation"}}}},"404":{"description":"Evaluation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Evaluation is not in a fail-able state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"API health check","responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/db/health":{"get":{"tags":["Health"],"summary":"Database health check","responses":{"200":{"description":"Database is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"Database is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Get a job by id","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/jobs":{"get":{"tags":["Jobs"],"summary":"List recent jobs for an org","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/JobStatus"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Jobs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListResponse"}}}}}}},"/jobs/{id}/cancel":{"post":{"tags":["Jobs"],"summary":"Cancel a job","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}/vendor-callback":{"post":{"tags":["Jobs"],"summary":"Vendor (fal) completion webhook","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"t","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}},"401":{"description":"Bad signature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/knowledge-base/source-names":{"get":{"tags":["KnowledgeBase"],"summary":"Look up names for referenced knowledge sources","description":"Returns only requested, existing sources in the authorized organization. Unknown IDs are omitted.","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"},{"schema":{"type":"string","example":"fd86e09c54464ac6","description":"Up to 100 comma-separated canonical source IDs"},"required":true,"description":"Up to 100 comma-separated canonical source IDs","name":"sourceIds","in":"query"}],"responses":{"200":{"description":"Source names","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSourceNamesResponse"}}}},"400":{"description":"Invalid source IDs or organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"Request cancelled"}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/status":{"post":{"tags":["KnowledgeBase"],"summary":"Observe source ingestion and readable index state","description":"Reads the source's pipeline metadata and checks its canonical fast-search chunks. Unknown metadata stays unknown. Pending or processing ingestion skips the index probe, since old chunks can outlive a refresh. Readable chunks establish index presence; use knowledge-base/search to verify topic retrieval.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceActionRequest"}}}},"responses":{"200":{"description":"Source observations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseSourceStatus"}}}},"400":{"description":"Invalid source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Search service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/media-items/{itemId}":{"get":{"tags":["KnowledgeBase"],"summary":"Resolve a legacy Knowledge Base media item","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647},"required":true,"name":"itemId","in":"path"},{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Media item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseMediaItemResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/usage":{"get":{"tags":["KnowledgeBase"],"summary":"Knowledge source usage","description":"Per-source counts of the calls whose knowledge searches returned each source, over a trailing window","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":30,"example":30,"description":"Trailing window in days"},"required":false,"description":"Trailing window in days","name":"days","in":"query"}],"responses":{"200":{"description":"Usage per source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSourceUsageResponse"}}}},"400":{"description":"Invalid usage query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Usage analytics is being upgraded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Usage analytics returned an invalid response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Usage analytics unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/source":{"get":{"tags":["KnowledgeBase"],"summary":"Read a single knowledge source by its stored identity","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"string","enum":["document","website","text","video","github"],"example":"document"},"required":true,"name":"sourceType","in":"query"},{"schema":{"type":"string","minLength":1,"pattern":"^[^/\\\\]+$","example":"product-manual.pdf"},"required":true,"name":"name","in":"query"}],"responses":{"200":{"description":"Source metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"Request cancelled"}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base":{"get":{"tags":["KnowledgeBase"],"summary":"List knowledge base sources","description":"Returns stored sources with pipeline metadata and deterministic source IDs, independently of index readiness","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":2048},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSourcesResponse"}}}},"400":{"description":"Invalid pagination cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"Request cancelled"}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/_crawl/{domain}/asset-links":{"get":{"tags":["KnowledgeBase"],"summary":"List crawled pages with extracted asset links","description":"Reads `_crawl/<domain>/*.md` blobs fast-search wrote during the most recent crawl and returns each page's `assets` custom-metadata payload. Used by the journey copilot's asset-suggestion workflow as the bulk-enumerate fallback when the agent hasn't navigated every page itself. `domain` is the bare hostname fast-search normalised at crawl time (e.g. `demandbase.com`, not `https://www.demandbase.com/`).","parameters":[{"schema":{"type":"string","minLength":1,"example":"demandbase.com"},"required":true,"name":"domain","in":"path"},{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Crawled pages with assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCrawledPagesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/sources/{sourceName}/crawl/pages":{"get":{"tags":["KnowledgeBase"],"summary":"List crawled pages for a source (paginated)","description":"Returns a paginated list of crawled pages for the given website source. Resolves `sourceName` to its domain via GCS source metadata. Supports filtering by title or URL with `q`, pagination via `cursor` and `limit`.","parameters":[{"schema":{"type":"string","minLength":1,"example":"minecraft.wiki--a1b2c3d4e5f6"},"required":true,"name":"sourceName","in":"path"},{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":100,"example":100,"description":"Page size (1–500, default 100)"},"required":false,"description":"Page size (1–500, default 100)","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor from previous response"},"required":false,"description":"Opaque pagination cursor from previous response","name":"cursor","in":"query"},{"schema":{"type":"string","description":"Case-insensitive filter on page title or URL","example":"Creeper"},"required":false,"description":"Case-insensitive filter on page title or URL","name":"q","in":"query"}],"responses":{"200":{"description":"Paginated list of crawled pages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCrawledPagesPaginatedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found or domain cannot be resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/sources/{sourceName}/crawl/pages/preview":{"get":{"tags":["KnowledgeBase"],"summary":"Preview crawled page content","description":"Returns the markdown content of a single crawled page. Resolves `sourceName` to its domain via GCS source metadata. Content is truncated at 100,000 characters.","parameters":[{"schema":{"type":"string","minLength":1,"example":"minecraft.wiki--a1b2c3d4e5f6"},"required":true,"name":"sourceName","in":"path"},{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"string","minLength":1,"example":"https://minecraft.wiki/wiki/Creeper","description":"URL-encoded page origin URL"},"required":true,"description":"URL-encoded page origin URL","name":"origin","in":"query"}],"responses":{"200":{"description":"Page content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawledPagePreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source or page not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/upload":{"post":{"tags":["KnowledgeBase"],"summary":"Upload a document","description":"Uploads a file to GCS, triggering fast-search ingestion via Pub/Sub.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"nullable":true},"orgId":{"type":"string"},"displayName":{"type":"string"}}}}}},"responses":{"201":{"description":"File uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"400":{"description":"Invalid file type or size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Upload failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:write"]}]}},"/knowledge-base/website":{"post":{"tags":["KnowledgeBase"],"summary":"Add website source","description":"Writes a website config to GCS, triggering fast-search to crawl the URL or sitemap.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWebsiteRequest"}}}},"responses":{"201":{"description":"Website added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWebsiteResponse"}}}},"400":{"description":"Invalid URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin-only fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/knowledge-base/youtube":{"post":{"tags":["KnowledgeBase"],"summary":"Add a video link source (YouTube or Loom)","description":"Matches the URL against the supported video providers (YouTube, Loom), then enqueues a `youtube.ingest` job that downloads the video server-side (yt-dlp, capped at 720p) and writes the resulting .mp4 into the org's KB as a normal video source — fast-search transcribes/indexes it like any uploaded video. Hosts are an allowlist, not whatever yt-dlp accepts. Returns 202 with a jobId to poll.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddYoutubeRequest"}}}},"responses":{"202":{"description":"Ingest job enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddYoutubeResponse"}}}},"400":{"description":"Not a supported video link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Video already in knowledge base","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/knowledge-base/github":{"post":{"tags":["KnowledgeBase"],"summary":"Add a private GitHub repo as a knowledge-base source","description":"Writes a github source config to GCS, triggering fast-search to walk the repo via a GitHub App installation. Repo content is indexed under a single source so delete / retry behave like a website source.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddGithubRequest"}}}},"responses":{"201":{"description":"Repo added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddGithubResponse"}}}},"400":{"description":"Invalid config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:write"]}]}},"/knowledge-base/upload-url":{"post":{"tags":["KnowledgeBase"],"summary":"Get a signed URL for direct GCS upload","description":"Returns a signed URL that the client can PUT the file to directly, bypassing server body-size limits. The GCS upload triggers fast-search ingestion via Pub/Sub.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlRequest"}}}},"responses":{"200":{"description":"Signed upload URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlResponse"}}}},"400":{"description":"Invalid file type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/knowledge-base/sources/{sourceName}/wiki":{"post":{"tags":["KnowledgeBase"],"summary":"Reference a file the browser uploaded in the org's wiki","description":"The browser calls this after its signed upload (`/knowledge-base/upload-url`) succeeds, since that upload never passes through sable-api. The stored file's metadata is read and a version-pinned reference is put into the org's wiki shard in the background; the answer does not wait for it.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"sourceName","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (required for Sable admins)"}}}}}},"responses":{"202":{"description":"Accepted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:write"]}]}},"/knowledge-base/ingest-from-url":{"post":{"tags":["KnowledgeBase"],"summary":"Ingest a file already in org-assets storage","description":"Server-side bridge from the org-assets GCS bucket (composer attachments) → `fast-search` (KB GCS bucket). The browser passes only the metadata + public URL; sable-api downloads the bytes server-side and writes to GCS via the same path as `/knowledge-base/upload`. Lets the journey-copilot index large composer attachments (videos, big PDFs) without round-tripping the bytes through Vercel — the inline POST hits Vercel's 4.5 MB serverless body cap.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFromUrlRequest"}}}},"responses":{"201":{"description":"File ingested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"400":{"description":"Invalid URL or file type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Storage path does not belong to caller's org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Upload failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Failed to download from storage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:write"]}]}},"/knowledge-base/delete":{"post":{"tags":["KnowledgeBase"],"summary":"Delete a source","description":"Deletes the source from GCS. fast-search auto-cleans Pinecone vectors via Pub/Sub.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceActionRequest"}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:delete"]}]}},"/knowledge-base/retry":{"post":{"tags":["KnowledgeBase"],"summary":"Retry indexing a source","description":"Re-uploads the source file to GCS, triggering fast-search to re-index it.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceActionRequest"}}}},"responses":{"200":{"description":"Retry triggered","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Source changed during refresh","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:write"]}]}},"/knowledge-base/search":{"post":{"tags":["KnowledgeBase"],"summary":"Search knowledge base","description":"Semantic search in the organization's default KB via the existing fast-search backend; this does not establish that an agent enables or invokes retrieval","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/source/info":{"post":{"tags":["KnowledgeBase"],"summary":"Fetch full transcript + metadata for a KB source","description":"Returns the joined transcript and metadata for a specific KB source. Used by the journey-copilot pull_info_from_kb tool when the user @-mentions a kb-article.","parameters":[{"schema":{"type":"string","example":"1","description":"Organization ID (admin only)"},"required":false,"description":"Organization ID (admin only)","name":"orgId","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceInfoRequest"}}}},"responses":{"200":{"description":"Source info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceInfoResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/knowledge-base/preview":{"post":{"tags":["KnowledgeBase"],"summary":"Get a signed preview URL for a source","description":"Returns a short-lived signed URL for previewing a file in the browser.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceActionRequest"}}}},"responses":{"200":{"description":"Signed URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/admin/live-calls":{"get":{"tags":["Admin"],"summary":"List in-progress calls across all orgs","description":"Sable-admin-only. Returns every live (not completed/stale), joinable call across all organizations for the admin ops app, with org, agent, participant, start time, and LiveKit room name.","parameters":[{"schema":{"type":"string","enum":["true","false"],"description":"Set to false to omit counts."},"required":false,"description":"Set to false to omit counts.","name":"includeCounts","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Set to false to drop internal calls (a Sable-email participant or a Sable caller) before the row limit."},"required":false,"description":"Set to false to drop internal calls (a Sable-email participant or a Sable caller) before the row limit.","name":"includeInternal","in":"query"}],"responses":{"200":{"description":"List of in-progress calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCallsResponse"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/counts":{"get":{"tags":["Admin"],"summary":"Count in-progress calls across all orgs","description":"Sable-admin-only. The uncapped live-call counts from the list endpoint, without the call rows.","responses":{"200":{"description":"Live-call counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCallCounts"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}":{"get":{"tags":["Admin"],"summary":"Get a call for the admin ops app, including ended calls","description":"Sable-admin-only. Returns durable call metadata plus an explicit live, ended, or unavailable status. Unlike the live list, this endpoint retains ended calls for Sentinel's call detail view.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Call detail and current joinability status","content":{"application/json":{"schema":{"type":"object","properties":{"call":{"$ref":"#/components/schemas/AdminLiveCallDetail"}},"required":["call"]}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/alerts":{"get":{"tags":["Admin"],"summary":"Open PagerDuty alerts raised for a call","description":"Sable-admin-only. Looks up open (triggered or acknowledged) PagerDuty incidents by the dedup keys this session's alerts would have used, so no state is stored to correlate them. Returns 502 if PagerDuty cannot be reached — deliberately not an empty list, which would read as 'already handled'.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Open alerts for the call; check `available` before trusting an empty list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCallAlertsResponse"}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"PagerDuty could not be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/alerts/resolve":{"post":{"tags":["Admin"],"summary":"Resolve the PagerDuty alerts raised for a call","description":"Sable-admin-only. Sends a PagerDuty resolve for each dedup key this session's alerts would have used. Idempotent — resolving a key with nothing open is a no-op, so the caller need not read state first. `resolved` counts keys PagerDuty accepted, not incidents that existed.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Resolve accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveLiveCallAlertsResponse"}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/call-email-verifications/{sessionId}":{"put":{"operationId":"putCallEmailVerification","x-sable":{"kind":"resource"},"tags":["Admin"],"summary":"Verify the caller's email by hand","description":"Marks the email the caller gave on this call as verified, during the call or after it ends. Repeating it changes nothing. Sable admins, or a Sable-org app through sable/platform with `transcripts:delete` for a Sable-org call. `verifiedBy` is read only from the app, for the teammate who clicked in Slack, and must be a Sable address; a signed-in admin is recorded as themselves.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"verifiedBy":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"The verified email and who verified it","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"verifiedBy":{"type":"string","nullable":true},"verifiedAt":{"type":"string","nullable":true}},"required":["email","verifiedBy","verifiedAt"]}}}},"400":{"description":"Invalid session id or verifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not a Sable admin, and not a Sable-org app with transcripts:delete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found, or not a Sable-org call for an app","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No email on the call, or it is verified with another email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:delete"]}]}},"/admin/live-calls/{sessionId}/end":{"post":{"tags":["Admin"],"summary":"End a live call","description":"Sable-admin-only. Atomically marks the session as admin-ended, then best-effort deletes its LiveKit room. `success` is false when the session had a room but deletion failed — the call, agent, and user session may still be live in that case.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Admin-end result; check `success` before treating the call as over","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndLiveCallResponse"}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/transcript":{"get":{"tags":["Admin"],"summary":"Get stored transcript for a call (incremental)","description":"Sable-admin-only. Returns persisted user/agent transcript turns for a session, ordered by insertion id. Pass `sinceId` to fetch only turns newer than a previously seen id, so polling payloads stay flat regardless of transcript length.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"sinceId","in":"query"}],"responses":{"200":{"description":"Transcript turns for the session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCallTranscriptResponse"}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Transcript read lost its database connection; poll again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/transcript/translate":{"post":{"tags":["Admin"],"summary":"Translate transcript turns for display","description":"Sable-admin-only. Renders the named transcript turns in `targetLanguage` so an operator can follow a call in a language they don't speak. Display-only: nothing is stored on the transcript. Turns already in the target language come back with `translatedText: null`; turns the model could not translate are listed in `failedIds`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateSessionMessagesBody"}}}},"responses":{"200":{"description":"Translations for the requested turns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptTranslationResponse"}}}},"400":{"description":"Invalid session id or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Translation unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/account-login":{"get":{"tags":["Admin"],"summary":"Get the selected account login summary for a call","description":"Sable-admin-only. Returns account login metadata without password material.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Selected account login summary, or null","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/LiveCallAccountLogin"}},"required":["account"]}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/account-login/reveal":{"post":{"tags":["Admin"],"summary":"Reveal the selected account password during a live call","description":"Sable-admin-only. Decrypts the saved password only while the session is effectively live.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Decrypted account password","content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"}},"required":["password"]}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No saved password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Call is no longer live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/cobrowse-session":{"get":{"tags":["Admin"],"summary":"Get the agent's live browser session for co-browse (view-only)","description":"Sable-admin-only. Returns the agent's active Nickel browser session (published as a participant attribute) so the ops app can render a read-only co-browse view without joining the call. Returns null when no browser is open.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Live browser session payload (or null)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CobrowseSessionResponse"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/journey-state":{"get":{"tags":["Admin"],"summary":"Get the agent's live journey state (moment/step view)","description":"Sable-admin-only. Returns the agent's live journey state (moment/step graph, current position, and any admin-queued forced target) published as a participant attribute, so the ops app can render the journey view without joining the call. Returns null when the agent publishes no journey state.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Live journey state payload (or null)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyStateResponse"}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/observe-token":{"post":{"tags":["Admin"],"summary":"Mint an observe-only LiveKit token for a live call","description":"Sable-admin-only. Mints a short-lived admin token with canPublish=false so sentinel can connect muted, RPC-steer the agent, and listen without user consent or handoff. Requires an active room and connected end-user. The participant identity carries the signed-in account's internal user id (`admin-<userId>-<suffix>`, nothing personal, since every participant can read it); staff resolve names via `GET /admin/live-calls/{sessionId}/viewers`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"}}}}}},"responses":{"200":{"description":"Observe token minted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminObserveTokenResponse"}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable / no user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"LiveKit could not be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/viewers":{"get":{"tags":["Admin"],"summary":"List other Sable staff observing a live call","description":"Sable-admin-only. Names the other signed-in staff observing the call, resolved from the user id in their observe-token identities. One entry per person, excluding the caller; empty when the call has no active room.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Other viewers, sorted by name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCallViewersResponse"}}}},"400":{"description":"Invalid session id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"LiveKit could not be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/join-request":{"post":{"tags":["Admin"],"summary":"Request the user's consent for an admin to join","description":"Sable-admin-only. Parks a pending consent on the user participant and pushes a prompt to the room so the user can accept/deny before the admin connects for intervention (voice/chat handoff).","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"}}}}}},"responses":{"200":{"description":"Consent request sent","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"}},"required":["requestId"]}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable / no user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Admin"],"summary":"Get the admin-join consent state for a call","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Consent state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminJoinState"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/join-cancel":{"post":{"tags":["Admin"],"summary":"Cancel a pending admin-join request","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"}},"required":["requestId"]}}}},"responses":{"200":{"description":"Canceled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/message":{"post":{"tags":["Admin"],"summary":"Send a chat message from the admin to the user","description":"Sable-admin-only. Pushes a chat message to the live call (rendered in parley as 'Sable Support') and persists it to the transcript. Sent on a data channel the AI agent does not consume, so the agent does not respond. Silent support chat: authorized whenever a Sable admin is connected (observe or intervention) — no user consent handshake required.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000},"displayName":{"type":"string"}},"required":["text"]}}}},"responses":{"200":{"description":"Message delivered and logged","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"string"}},"required":["messageId"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only, or the user has not consented to the admin joining","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable / no user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/agent-prompt":{"post":{"tags":["Admin"],"summary":"Record a prompt an observer fed the agent as the user's turn","description":"Sable-admin-only. Persists a prompt the observer sent the agent over LiveKit RPC (`promptAgentAsUser`) as a transcript message with role `admin_as_user`. Records ONLY — nothing is broadcast to the call, and the person on the call never sees it. sable-api cannot deliver the prompt itself (RPC needs a room participant), so sentinel calls this after the agent acks. Authorized like admin chat: a Sable admin must be connected to the room, which is the same precondition the RPC itself has.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000},"deliveredAt":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["text"]}}}},"responses":{"200":{"description":"Prompt recorded","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"string"}},"required":["messageId"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only, or the admin is not connected to the call","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/live-calls/{sessionId}/browser-input":{"post":{"tags":["Admin"],"summary":"Record that an admin sent input to the call's browser","description":"Sable-admin-only. Stamps `metadata.sable_admin_browser_input_at` on the session the first time an admin clicks, types or navigates in the agent's browser. Idempotent: later calls return the original time. The input itself goes straight from the console to the browser, so the console reports it here.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Recorded now, or already recorded earlier","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"type":"boolean","enum":[true]},"firstRecordedAt":{"type":"string","description":"ISO time of the first admin browser input."}},"required":["recorded","firstRecordedAt"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — admin only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/live-calls/{sessionId}/join-response":{"post":{"tags":["Admin"],"summary":"Record the user's accept/deny for an admin-join request","description":"Service-token only. Called by parley's server when the user responds to the consent prompt.","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"accepted":{"type":"boolean"}},"required":["requestId","accepted"]}}}},"responses":{"200":{"description":"Recorded","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call not joinable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or unknown request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/members":{"get":{"tags":["Members"],"summary":"List organization members","description":"Keyset-paginated, newest first, when `limit` is sent (`limit`, `cursor`); returns every member without it. `q` searches name and email. Always returns `total`, `matched` and `nextCursor`.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Omit it to get every member in one response, as before pagination existed."},"required":false,"description":"Page size. Omit it to get every member in one response, as before pagination existed.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64,"description":"`nextCursor` of the previous page. Needs `limit`."},"required":false,"description":"`nextCursor` of the previous page. Needs `limit`.","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Case-insensitive substring match on name and email. LIKE wildcards are literal."},"required":false,"description":"Case-insensitive substring match on name and email. LIKE wildcards are literal.","name":"q","in":"query"}],"responses":{"200":{"description":"List of members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListResponse"}}}},"400":{"description":"Invalid pagination cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]},"post":{"tags":["Members"],"summary":"Invite a member to an organization","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMemberBody"}}}},"responses":{"201":{"description":"Member invited","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/Member"}},"required":["member"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Member already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/organizations/{id}/members/{userId}":{"patch":{"tags":["Members"],"summary":"Update member role, access mode, custom role, or beta-tester status","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":42},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberBody"}}}},"responses":{"200":{"description":"Member updated","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/Member"}},"required":["member"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Member not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]},"delete":{"tags":["Members"],"summary":"Remove member from organization","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":42},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Member removed","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/Member"}},"required":["member"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Member not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/nickel/claim":{"post":{"tags":["Nickel"],"summary":"Claim a fresh, anonymous Nickel browser session (server-side)","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimSessionBody"}}}},"responses":{"200":{"description":"Claim payload — feed into nickel-ts-lib's createClaimedNickelConnector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimSessionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream Nickel exchange error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Nickel exchange not configured on sable-api","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/nickel/unclaim":{"post":{"tags":["Nickel"],"summary":"Release a previously-claimed Nickel browser session (server-side)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NickelUnclaimBody"}}}},"responses":{"204":{"description":"Release accepted (best-effort — pods also expire on idle)"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Nickel exchange not configured on sable-api","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitoring/figma-capacity/sessions":{"get":{"tags":["Monitoring"],"summary":"Operational call metadata for the Figma capacity monitor","description":"Keyless read for one allowlisted Google service account, bound to one org. Returns call timing, placement, billing status and lifecycle evidence only; no transcript, participant or contact fields.","parameters":[{"schema":{"type":"string","pattern":"^org_[A-Za-z0-9]+$","example":"org_bd67d5d86ce042669f794cc682550557"},"required":true,"name":"orgId","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"dateFrom","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"dateTo","in":"query"},{"schema":{"type":"string","maxLength":512},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["all","human"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","enum":["false"]},"required":false,"name":"includeSummary","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Google id token minted by the allowlisted collector identity for the configured audience."},"required":true,"description":"Google id token minted by the allowlisted collector identity for the configured audience.","name":"x-figma-monitor-id-token","in":"header"}],"responses":{"200":{"description":"One page of call metadata","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/FigmaMonitorSessionRow"}},"nextCursor":{"type":"string","nullable":true}},"required":["sessions","nextCursor"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/analytics-sources/agents":{"get":{"operationId":"listAnalyticsAgentsSource","x-sable":{"kind":"exception","reason":"Reads every org's agents on purpose, for Sable's own PostHog data warehouse to join call-page events to agent tags and org; the caller is one machine credential, not a member of an org, and that credential opens only this route."},"tags":["Analytics"],"summary":"The agents table PostHog's data warehouse pulls","description":"Read-only source for PostHog's Custom REST source. Authenticated by `X-Posthog-Source-Token`, which opens this route and nothing else; refused while POSTHOG_SOURCE_TOKEN is unset. Reads across ALL orgs. One flat row per agent, soft-deleted included, in `agent_id` order, paged by `cursor`/`next_cursor`. Full refresh only: a label change does not move `updated_at`.","parameters":[{"schema":{"type":"string","pattern":"^agt_[A-Za-z0-9]{1,64}$","description":"The `next_cursor` of the previous page. Omit it for the first page."},"required":false,"description":"The `next_cursor` of the previous page. Omit it for the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"description":"Agents per page. PostHog does not send it; the default applies."},"required":false,"description":"Agents per page. PostHog does not send it; the default applies.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The POSTHOG_SOURCE_TOKEN secret."},"required":true,"description":"The POSTHOG_SOURCE_TOKEN secret.","name":"x-posthog-source-token","in":"header"}],"responses":{"200":{"description":"One page of agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsAgentsSourcePage"}}}},"400":{"description":"Invalid cursor or limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid source token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/roles":{"get":{"tags":["Roles"],"summary":"List custom roles, presets, and grantable permissions","description":"Custom roles carry `memberCount`. Keyset-paginated, newest first, when `limit` is sent (`limit`, `cursor`); returns every custom role in name order without it. `q` searches the role name. Always returns `total`, `matched` and `nextCursor`; `baseRoles` is what Admin and Member grant.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size, newest first. Omit it to get every custom role in one response, in name order."},"required":false,"description":"Page size, newest first. Omit it to get every custom role in one response, in name order.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64,"description":"`nextCursor` of the previous page. Needs `limit`."},"required":false,"description":"`nextCursor` of the previous page. Needs `limit`.","name":"cursor","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Case-insensitive substring match on the role name. LIKE wildcards are literal."},"required":false,"description":"Case-insensitive substring match on the role name. LIKE wildcards are literal.","name":"q","in":"query"}],"responses":{"200":{"description":"Custom roles for the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRolesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]},"post":{"tags":["Roles"],"summary":"Create a custom role","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleBody"}}}},"responses":{"201":{"description":"Custom role created","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/CustomRole"}},"required":["role"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate name or role still in use)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/organizations/{id}/roles/{roleId}":{"patch":{"tags":["Roles"],"summary":"Update a custom role","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":3},"required":true,"name":"roleId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleBody"}}}},"responses":{"200":{"description":"Custom role updated","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/CustomRole"}},"required":["role"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate name or role still in use)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]},"delete":{"tags":["Roles"],"summary":"Delete a custom role","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":3},"required":true,"name":"roleId","in":"path"}],"responses":{"200":{"description":"Custom role deleted","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/CustomRole"}},"required":["role"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict (duplicate name or role still in use)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/sso-domains":{"get":{"operationId":"listSsoDomains","x-sable":{"kind":"exception","reason":"Joins the org's SignInProviders in kcp with Platform's domain proof and secrets; the dataset surface reads SQL only."},"tags":["SSO"],"summary":"List the organization's SSO domains","parameters":[{"schema":{"type":"string","minLength":1,"example":"org_acme"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"SSO domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSsoProvidersResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"kcp, where the organization's identity providers are written, can't be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/sso-domains/{domain}":{"get":{"operationId":"getSsoDomain","x-sable":{"kind":"exception","reason":"Joins the org's SignInProviders in kcp with Platform's domain proof and secrets; the dataset surface reads SQL only."},"tags":["SSO"],"summary":"Get one SSO domain, or what setting it up takes","description":"Answers for any valid domain: `connection` is omitted until one is saved. The identity provider asks for `serviceProvider` URLs before it issues a client id, so setup reads them first.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":253,"example":"acme.com"},"required":true,"name":"domain","in":"path"},{"schema":{"type":"string","minLength":1,"example":"org_acme"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"SSO domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoProviderResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"kcp, where the organization's identity providers are written, can't be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]},"put":{"operationId":"putSsoDomain","x-sable":{"kind":"resource"},"tags":["SSO"],"summary":"Connect or update the identity provider for a domain","description":"Idempotent. Writes the domain's SignInProvider in the organization's apps main (kcp) as the caller, and keeps the OIDC client secret in Platform. Keeps the domain's verification. Leave out the client secret or certificate to keep the stored one; switching to a different identity provider unlinks existing SSO sign-ins for the domain. A provider written from the organization's repo only takes its client secret here.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":253,"example":"acme.com"},"required":true,"name":"domain","in":"path"},{"schema":{"type":"string","minLength":1,"example":"org_acme"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutSsoProviderBody"}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoProviderResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another organization verified this domain, the provider is managed in the organization's repo, or SSO isn't available for the organization yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"kcp, where the organization's identity providers are written, can't be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]},"delete":{"operationId":"deleteSsoDomain","x-sable":{"kind":"resource"},"tags":["SSO"],"summary":"Stop SSO sign-in for a domain","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":253,"example":"acme.com"},"required":true,"name":"domain","in":"path"},{"schema":{"type":"string","minLength":1,"example":"org_acme"},"required":false,"name":"orgId","in":"query"}],"responses":{"204":{"description":"Removed"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"kcp, where the organization's identity providers are written, can't be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/sso-domains/{domain}/verify":{"post":{"operationId":"verifySsoDomain","x-sable":{"kind":"action"},"tags":["SSO"],"summary":"Check the domain's DNS record and turn SSO sign-in on","description":"Idempotent. 400 while the TXT record isn't visible yet; 409 when another organization proved it first.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":253,"example":"acme.com"},"required":true,"name":"domain","in":"path"},{"schema":{"type":"string","minLength":1,"example":"org_acme"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoProviderResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another organization verified this domain, the provider is managed in the organization's repo, or SSO isn't available for the organization yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"kcp, where the organization's identity providers are written, can't be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["members:manage"]}]}},"/organizations/{id}/assets/generate":{"post":{"tags":["AssetGeneration"],"summary":"Generate image candidates","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequestBody"}}}},"responses":{"200":{"description":"Generated candidates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/organizations/{id}/assets/generate/refine":{"post":{"tags":["AssetGeneration"],"summary":"Refine an existing image","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefineRequestBody"}}}},"responses":{"200":{"description":"Refined result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/organizations/{id}/assets/generate/save":{"post":{"tags":["AssetGeneration"],"summary":"Save a generated candidate to the org asset library","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveRequestBody"}}}},"responses":{"200":{"description":"Saved asset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveGeneratedAssetResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Generation expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/organizations/{id}/assets/video":{"post":{"tags":["VideoGeneration"],"summary":"Enqueue an async video-generation job and save it to the org library","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVideoRequestBody"}}}},"responses":{"202":{"description":"Job enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVideoResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Beta access required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/organizations/{id}/assets/search":{"get":{"tags":["OrgAssets"],"summary":"Semantic search over org assets","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Search query","example":"conference photo"},"required":true,"description":"Search query","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":20,"default":8,"description":"Max results","example":8},"required":false,"description":"Max results","name":"top_k","in":"query"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"publicId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string","nullable":true},"score":{"type":"number"},"snippet":{"type":"string"}},"required":["id","publicId","name","type","url","score","snippet"]}}},"required":["results"]}}}},"400":{"description":"Invalid query params","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/internal/oauth/clients":{"post":{"tags":["OAuth"],"summary":"Dynamic client registration (RFC 7591)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRegisterClientBody"}}}},"responses":{"201":{"description":"Client registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRegisterClientResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/internal/oauth/clients/{clientId}":{"get":{"tags":["OAuth"],"summary":"Fetch a registered client (redirect_uri validation for the consent page)","parameters":[{"schema":{"type":"string","example":"oauth_client_abc123"},"required":true,"name":"clientId","in":"path"},{"schema":{"type":"string","description":"When supplied, the response reports whether it is an acceptable redirect for this client. Ask rather than comparing against redirect_uris yourself: loopback URIs match on everything but the port (RFC 8252 7.3), and a consent screen that re-implements that rule will drift from the token endpoint that enforces it."},"required":false,"description":"When supplied, the response reports whether it is an acceptable redirect for this client. Ask rather than comparing against redirect_uris yourself: loopback URIs match on everything but the port (RFC 8252 7.3), and a consent screen that re-implements that rule will drift from the token endpoint that enforces it.","name":"redirect_uri","in":"query"}],"responses":{"200":{"description":"Client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientResponse"}}}},"404":{"description":"Unknown client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/internal/oauth/token":{"post":{"tags":["OAuth"],"summary":"Token endpoint (authorization_code, refresh_token, device_code)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenBody"}}}},"responses":{"200":{"description":"Tokens issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenResponse"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/internal/oauth/device/authorize":{"post":{"tags":["OAuth"],"summary":"Device authorization request (RFC 8628 §3.1)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDeviceAuthorizationBody"}}}},"responses":{"200":{"description":"Device and user codes issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDeviceAuthorizationResponse"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}}}},"/internal/oauth/revoke":{"post":{"tags":["OAuth"],"summary":"Token revocation (RFC 7009)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRevokeBody"}}}},"responses":{"200":{"description":"Revoked (always 200)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth/authorization-codes":{"post":{"tags":["OAuth"],"summary":"Mint a one-time authorization code (user-authenticated)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthCreateAuthorizationCodeBody"}}}},"responses":{"201":{"description":"Code minted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthCreateAuthorizationCodeResponse"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth/device/approve":{"post":{"tags":["OAuth"],"summary":"Approve a device's user code (user-authenticated)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDeviceApproveBody"}}}},"responses":{"200":{"description":"Approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDeviceApproveResponse"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth/device/lookup":{"post":{"tags":["OAuth"],"summary":"Describe a pending device's user code before the user decides (user-authenticated)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDeviceLookupBody"}}}},"responses":{"200":{"description":"Pending request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDeviceApproveResponse"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth/device/deny":{"post":{"tags":["OAuth"],"summary":"Deny a device's user code (user-authenticated)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDeviceDenyBody"}}}},"responses":{"200":{"description":"Denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"OAuth error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth/grants":{"get":{"tags":["OAuth"],"summary":"List active OAuth connections for an org","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"org_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Omit to list every grant."},"required":false,"description":"Page size. Omit to list every grant.","name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"description":"Rows to skip; only with `limit`."},"required":false,"description":"Rows to skip; only with `limit`.","name":"offset","in":"query"},{"schema":{"type":"string","maxLength":100,"description":"Matches the client name or id."},"required":false,"description":"Matches the client name or id.","name":"search","in":"query"}],"responses":{"200":{"description":"Grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthGrantListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth/grants/{id}":{"delete":{"tags":["OAuth"],"summary":"Revoke an OAuth connection","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"org_id","in":"query"}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/onboarding/requests":{"post":{"tags":["Onboarding"],"summary":"Create or reuse a customer onboarding request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOnboardingRequestBody"}}}},"responses":{"201":{"description":"Onboarding request created or reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOnboardingRequestResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Customer access conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Onboarding"],"summary":"List recent customer onboarding requests","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Restrict the results to a single organization"},"required":false,"description":"Restrict the results to a single organization","name":"orgId","in":"query"}],"responses":{"200":{"description":"Recent onboarding requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRequestListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/onboarding/requests/{id}":{"delete":{"tags":["Onboarding"],"summary":"Cancel a pending customer onboarding request","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":30},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Onboarding request canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentOnboardingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Pending request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/onboarding/requests/{id}/platform-access":{"put":{"tags":["Onboarding"],"summary":"Set platform access for an onboarding customer","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":30},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOnboardingPlatformAccessBody"}}}},"responses":{"200":{"description":"Updated platform access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOnboardingPlatformAccessResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Onboarding request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Onboarding not submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/onboarding/current":{"get":{"tags":["Onboarding"],"summary":"Get the authenticated customer's onboarding request","parameters":[{"schema":{"type":"string","description":"Organization ID (required for Sable admins)"},"required":false,"description":"Organization ID (required for Sable admins)","name":"orgId","in":"query"}],"responses":{"200":{"description":"Current onboarding request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentOnboardingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Onboarding request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/onboarding/current/responses":{"post":{"tags":["Onboarding"],"summary":"Create an additional onboarding response","parameters":[{"schema":{"type":"string","description":"Organization ID (required for Sable admins)"},"required":false,"description":"Organization ID (required for Sable admins)","name":"orgId","in":"query"}],"responses":{"201":{"description":"Pending follow-up onboarding response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentOnboardingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Onboarding request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Follow-up unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/onboarding/current/submit":{"post":{"tags":["Onboarding"],"summary":"Finalize the authenticated customer's onboarding request","parameters":[{"schema":{"type":"string","description":"Organization ID (required for Sable admins)"},"required":false,"description":"Organization ID (required for Sable admins)","name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitOnboardingBody"}}}},"responses":{"200":{"description":"Submitted onboarding request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentOnboardingResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Onboarding request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Invalid file counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/assets/upload-url":{"post":{"tags":["OrgAssets"],"summary":"Get signed upload URL for org asset","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UploadUrlBody"},{"type":"object","properties":{"onboardingRequestId":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}]}}}},"responses":{"200":{"description":"Signed upload URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAssetUploadUrlResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/assets":{"post":{"tags":["OrgAssets"],"summary":"Create org asset record","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateOrgAssetBody"},{"type":"object","properties":{"onboardingRequestId":{"type":"integer","minimum":0,"exclusiveMinimum":true}}}]}}}},"responses":{"201":{"description":"Asset created","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/OrgAsset"}},"required":["asset"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["OrgAssets"],"summary":"List all org assets","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List of org assets","content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/OrgAsset"}},"nextCursor":{"type":"string","nullable":true}},"required":["assets","nextCursor"]}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/organizations/{id}/assets/used-by-agent/{agentId}":{"get":{"tags":["OrgAssets"],"summary":"List the org assets one agent uses","description":"Assets referenced by the agent's config, its branding or its newest published version. Asset retrieval is org-wide: this answers what the agent's configuration points at, not what it may search.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"agentId","in":"path"}],"responses":{"200":{"description":"Assets used by the agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAssetsUsedByAgentResponse"}}}},"404":{"description":"Organization or agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/organizations/{id}/assets/pages/upload-urls":{"post":{"tags":["OrgAssets"],"summary":"Sign uploads for an HTML page and its companion files (Sable admins and agent builds)","description":"One HTML file, which becomes the page's entry, plus the scripts, styles, data, images, and fonts it loads by relative path, stored together under the assets CDN's pages route. The CDN serves them with a `sandbox allow-scripts allow-popups allow-popups-to-escape-sandbox allow-forms` CSP: uploaded pages stay in an opaque origin, while external links can open tabs without inheriting the page's sandbox.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageUploadUrlsBody"}}}},"responses":{"200":{"description":"Signed upload URLs, one per file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageUploadUrlsResponse"}}}},"400":{"description":"Invalid page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admins and agent builds only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"File type not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/assets/pages/{publicId}/complete":{"post":{"tags":["OrgAssets"],"summary":"Save an uploaded HTML page as an org asset (Sable admins and agent builds)","description":"Idempotent: repeating a completion that already landed returns the saved page with 200. 409 means the upload id belongs to a different asset, or the name is taken with nameStrategy `fail`.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid","example":"1ffe0cf8-5c45-448e-93c2-7f903d38d8e8"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletePageUploadBody"}}}},"responses":{"200":{"description":"Page was already saved by an earlier call","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/OrgAsset"}},"required":["asset"]}}}},"201":{"description":"Page saved","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/OrgAsset"}},"required":["asset"]}}}},"400":{"description":"Files missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admins and agent builds only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Upload id belongs to a different asset, or the name is taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"File type not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/assets/{publicId}/replace-url":{"post":{"tags":["OrgAssets"],"summary":"Sign an upload URL for replacing an existing asset's bytes","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"example":"oa_abc123"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceUrlBody"}}}},"responses":{"200":{"description":"Signed replace URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceUrlResponse"}}}},"400":{"description":"Invalid request, or the asset is an HTML page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/organizations/{id}/assets/{assetId}":{"patch":{"tags":["OrgAssets"],"summary":"Update an org asset","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"assetId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgAssetBody"}}}},"responses":{"200":{"description":"Asset updated","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/OrgAsset"}},"required":["asset"]}}}},"400":{"description":"Invalid replace, or the asset is an HTML page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]},"delete":{"tags":["OrgAssets"],"summary":"Soft-delete an org asset. Returns 409 with the usage list if the asset is referenced anywhere; pass ?force=true to override.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"assetId","in":"path"},{"schema":{"type":"boolean","example":false,"description":"Set to true to soft-delete even when the asset is referenced in agent configs, branding, or published config-versions. The blob is purged ≥30 days later."},"required":false,"description":"Set to true to soft-delete even when the asset is referenced in agent configs, branding, or published config-versions. The blob is purged ≥30 days later.","name":"force","in":"query"}],"responses":{"200":{"description":"Asset deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Asset is referenced in agent configs / branding / published config-versions. The `usages` list lives in `metadata.usages` of the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["org-assets:delete"]}]}},"/organizations/{id}/assets/{assetId}/usages":{"get":{"tags":["OrgAssets"],"summary":"List org-scoped references to this asset (powers the where-used UI and the 409 conflict modal).","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"assetId","in":"path"}],"responses":{"200":{"description":"Usage list","content":{"application/json":{"schema":{"type":"object","properties":{"usages":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["org_branding","agent_branding","agent_config","config_version","certificate_design","index_membership"]},"orgId":{"type":"number"},"agentId":{"type":"number"},"agentName":{"type":"string"},"agentSlug":{"type":"string"},"configVersionId":{"type":"string"},"certificateId":{"type":"number"},"field":{"type":"string"}},"required":["kind","orgId"]}}},"required":["usages"]}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/organizations/{id}/assets/info":{"post":{"tags":["OrgAssets"],"summary":"Fetch full transcript + metadata for an org asset","description":"Returns the joined transcript and metadata for a specific org asset. Used by the journey-copilot pull_info_from_asset tool when the user @-mentions an asset.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetInfoRequest"}}}},"responses":{"200":{"description":"Asset info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetInfoResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/organizations/{id}/assets/reindex":{"post":{"tags":["OrgAssets"],"summary":"Re-trigger fast-search indexing for every org asset (Sable admin only)","description":"Walks the org-assets GCS prefix and re-saves each object so fast-search re-emits OBJECT_FINALIZE and re-indexes. Used to refresh embeddings after a fast-search resolver / model change.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Reindex triggered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexOrgAssetsResponse"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/labels":{"get":{"tags":["Labels"],"summary":"List an organization's labels (requires `labels:read`)","parameters":[{"schema":{"type":"string","example":"org_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"}],"responses":{"200":{"description":"Labels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelListResponse"}}}},"400":{"description":"Malformed organization id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `labels:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["labels:read"]}]},"post":{"tags":["Labels"],"summary":"Create a label (requires `labels:write`)","parameters":[{"schema":{"type":"string","example":"org_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLabelBody"}}}},"responses":{"201":{"description":"Created label","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelResponse"}}}},"400":{"description":"Malformed id or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `labels:write`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A label with this name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["labels:write"]}]}},"/organizations/{id}/labels/{labelId}":{"patch":{"tags":["Labels"],"summary":"Rename or recolor a label (requires `labels:write`)","description":"The `test` label can be recolored but not renamed.","parameters":[{"schema":{"type":"string","example":"org_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647,"example":1},"required":true,"name":"labelId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLabelBody"}}}},"responses":{"200":{"description":"Updated label","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelResponse"}}}},"400":{"description":"Malformed id or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `labels:write`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Label not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken, or renaming the test label","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["labels:write"]}]},"delete":{"tags":["Labels"],"summary":"Delete a label and its assignments (Sable admin only)","description":"The `test` label can't be deleted.","parameters":[{"schema":{"type":"string","example":"org_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647,"example":1},"required":true,"name":"labelId","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Malformed organization or label id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Label not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The test label can't be deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents/{id}/labels":{"get":{"tags":["Labels"],"summary":"List an agent's labels (requires `labels:read`)","parameters":[{"schema":{"type":"string","example":"agt_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"}],"responses":{"200":{"description":"Assigned labels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelListResponse"}}}},"400":{"description":"Malformed agent id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `labels:read`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["labels:read"]}]},"put":{"tags":["Labels"],"summary":"Replace an agent's labels (requires `labels:write`)","description":"Calls to an agent labeled `test` skip Sable's on-call alerts.","parameters":[{"schema":{"type":"string","example":"agt_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAgentLabelsBody"}}}},"responses":{"200":{"description":"Assigned labels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelListResponse"}}}},"400":{"description":"Malformed agent id, or a label of another organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `labels:write`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["labels:write"]}]}},"/agents/{id}/labels/{labelId}":{"put":{"tags":["Labels"],"summary":"Add one label to an agent (requires `labels:write`)","description":"Idempotent, and leaves the agent's other labels as they are.","parameters":[{"schema":{"type":"string","example":"agt_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647,"example":1},"required":true,"name":"labelId","in":"path"}],"responses":{"200":{"description":"Assigned labels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelListResponse"}}}},"400":{"description":"Malformed agent or label id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `labels:write`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or label not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The agent already has the most labels it can","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["labels:write"]}]},"delete":{"tags":["Labels"],"summary":"Remove one label from an agent (requires `labels:write`)","description":"Idempotent, and leaves the agent's other labels as they are.","parameters":[{"schema":{"type":"string","example":"agt_8bVq3nWmRtYx2KpLc4Hd7","description":"Numeric id or public id"},"required":true,"description":"Numeric id or public id","name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647,"example":1},"required":true,"name":"labelId","in":"path"}],"responses":{"204":{"description":"Removed, or was not assigned"},"400":{"description":"Malformed agent or label id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `labels:write`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent or label not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["labels:write"]}]}},"/voices/conversation-languages":{"get":{"tags":["Voices"],"summary":"Product conversation-language options, without agent or voice configuration","responses":{"200":{"description":"Conversation languages","content":{"application/json":{"schema":{"type":"object","properties":{"languages":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]}}},"required":["languages"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/locales":{"get":{"tags":["Voices"],"summary":"Every locale a voice can be marked good at, with its region and a sample line","responses":{"200":{"description":"Locales","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLocaleListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/voices/lookup":{"post":{"tags":["Voices"],"summary":"Ask the provider about a voice and pre-fill its catalog row (Sable admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLookupBody"}}}},"responses":{"200":{"description":"What the provider knows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLookupResponse"}}}},"400":{"description":"The provider has no voice with this id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The provider did not answer the lookup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices":{"get":{"tags":["Voices"],"summary":"List every catalog voice (Sable admin only)","responses":{"200":{"description":"Voices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Voices"],"summary":"Add a voice to the catalog (Sable admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceBody"}}}},"responses":{"201":{"description":"Created voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceResponse"}}}},"400":{"description":"Invalid voice, or the provider has no voice with this id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Voice or name already in the catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The provider did not answer the lookup","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/voices/{voiceId}":{"patch":{"tags":["Voices"],"summary":"Change a catalog voice's name, gender or languages (Sable admin only)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647,"example":1},"required":true,"name":"voiceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVoiceBody"}}}},"responses":{"200":{"description":"Updated voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceResponse"}}}},"400":{"description":"Invalid voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Voice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Voices"],"summary":"Remove a voice from the catalog (Sable admin only)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":2147483647,"example":1},"required":true,"name":"voiceId","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Voice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"An agent uses this voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/voices":{"get":{"tags":["Voices"],"summary":"List the catalog voices an organization can give its agents","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["cartesia","elevenlabs"]},"required":false,"name":"provider","in":"query"}],"responses":{"200":{"description":"Voices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:read"]}]}},"/admin/pronunciation":{"get":{"tags":["Pronunciation"],"summary":"Read global pronunciation defaults (Sable admin only)","responses":{"200":{"description":"Global pronunciation defaults","content":{"application/json":{"schema":{"type":"object","properties":{"terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"]},"validated_on":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true}},"required":["provider","voice_id","model"]},"sample_sentence":{"type":"string"},"label":{"type":"string","maxLength":200},"language":{"type":"string","default":"en"}},"required":["term","replace","class"],"additionalProperties":true},"maxItems":50}},"required":["terms"]}}}},"400":{"description":"Invalid dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Pronunciation"],"summary":"Replace global pronunciation defaults (Sable admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"]},"validated_on":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true}},"required":["provider","voice_id","model"]},"sample_sentence":{"type":"string"},"label":{"type":"string","maxLength":200},"language":{"type":"string","default":"en"}},"required":["term","replace","class"],"additionalProperties":true},"maxItems":50}},"required":["terms"]}}}},"responses":{"200":{"description":"Global pronunciation defaults","content":{"application/json":{"schema":{"type":"object","properties":{"terms":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":200},"replace":{"type":"string","minLength":1,"maxLength":200},"class":{"type":"string","enum":["expansion","casing","uppercase","hyphenation","homophone","respelling","ipa"]},"validated_on":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai","cartesia","deepgram","rime","minimax","google","none"]},"voice_id":{"type":"string","nullable":true},"model":{"type":"string","nullable":true}},"required":["provider","voice_id","model"]},"sample_sentence":{"type":"string"},"label":{"type":"string","maxLength":200},"language":{"type":"string","default":"en"}},"required":["term","replace","class"],"additionalProperties":true},"maxItems":50}},"required":["terms"]}}}},"400":{"description":"Invalid dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/content":{"get":{"tags":["OrgContent"],"summary":"List org content (assets + KB sources)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"kb","in":"query"},{"schema":{"type":"string","enum":["servable","indexed","all"],"default":"all"},"required":false,"name":"capability","in":"query"},{"schema":{"type":"string","enum":["image","video","document","link","audio"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["upload","url","website","generated","transcript"]},"required":false,"name":"sourceKind","in":"query"}],"responses":{"200":{"description":"Content list","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/OrgContent"}}},"required":["content"]}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]},"post":{"tags":["OrgContent"],"summary":"Commit content metadata after upload","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContentCreateBody"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContent"}}}},"400":{"description":"Invalid gcsPath / publicId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/content/{publicId}":{"get":{"tags":["OrgContent"],"summary":"Get a single content row","parameters":[{"schema":{"type":"string","minLength":1,"example":"01abc..."},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContent"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]},"patch":{"tags":["OrgContent"],"summary":"Update content metadata (name, summary, etc.)","parameters":[{"schema":{"type":"string","minLength":1,"example":"01abc..."},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContentPatchBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContent"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Name taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]},"delete":{"tags":["OrgContent"],"summary":"Soft-delete content (returns 409 with usages if in use; pass ?force=true to override)","parameters":[{"schema":{"type":"string","minLength":1,"example":"01abc..."},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"boolean","example":false},"required":false,"name":"force","in":"query"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentUsageList"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"In use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["org-assets:delete"]}]}},"/content/upload-url":{"post":{"tags":["OrgContent"],"summary":"Sign a GCS upload URL for new content (assets + KB)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContentUploadUrlBody"}}}},"responses":{"200":{"description":"Signed upload URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContentUploadUrlResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Org not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/content/{publicId}/usages":{"get":{"tags":["OrgContent"],"summary":"List org-scoped references to this content (powers the where-used UI)","parameters":[{"schema":{"type":"string","minLength":1,"example":"01abc..."},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Usages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentUsageList"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/content/{publicId}/reindex":{"post":{"tags":["OrgContent"],"summary":"Re-trigger fast-search indexing for one content row","description":"Dispatches by source_kind: uploads re-save the GCS object at gcsPath; website/url KB sources re-save their config blob. transcript/generated rows have no reindex backend and return status='skipped'.","parameters":[{"schema":{"type":"string","minLength":1,"example":"01abc..."},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Reindex result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["queued","skipped"]},"reason":{"type":"string"}},"required":["status"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:write","settings:write"]}]}},"/internal/jobs/redrive-figma-disposals":{"post":{"tags":["InternalJobs"],"summary":"Re-queue retained Figma files whose participant share exhausted its retry budget","description":"Resets exhausted, retained, unshared Figma disposals retired at or after `since` (capped to the last 7 days) to their final attempt so the reconcile sweep retries the share. Quarantined, ambiguous-create, deleted and in-flight rows are left alone. `dryRun` defaults to true and only lists the rows.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time"},"dryRun":{"type":"boolean","default":true}},"required":["since"]}}}},"responses":{"200":{"description":"Figma disposal redrive report","content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"},"count":{"type":"integer","minimum":0},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"orgId":{"type":"integer"},"agentId":{"type":"integer"},"callId":{"type":"string","nullable":true},"retiredAt":{"type":"string","nullable":true}},"required":["id","orgId","agentId","callId","retiredAt"]}}},"required":["dryRun","count","resources"]}}}}}}},"/internal/jobs/redrive-slack-channel-provisions":{"post":{"tags":["InternalJobs"],"summary":"Re-queue demo Slack channels whose provisioning exhausted its retry budget","description":"Failed channels keep their reserve slot, so the pool cannot refill past them. Resets exhausted, failed `slack_channel` (and legacy `atlassian_slack_channel`) provisions last updated at or after `since` (capped to the last 7 days) to their final attempt so the reconcile sweep retries them once. Ambiguous-create, deleted and in-flight rows are left alone. `dryRun` defaults to true and only lists the rows.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time"},"dryRun":{"type":"boolean","default":true}},"required":["since"]}}}},"responses":{"200":{"description":"Slack channel provision redrive report","content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"},"count":{"type":"integer","minimum":0},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"orgId":{"type":"integer"},"agentId":{"type":"integer"},"lastError":{"type":"string","nullable":true},"updatedAt":{"type":"string"}},"required":["id","orgId","agentId","lastError","updatedAt"]}}},"required":["dryRun","count","resources"]}}}}}}},"/internal/jobs/recover-figma-reservations":{"post":{"tags":["InternalJobs"],"summary":"Recover abandoned Figma reservations after verifying call inactivity","responses":{"200":{"description":"Figma reservation recovery report","content":{"application/json":{"schema":{"type":"object","properties":{"recovered":{"type":"integer","minimum":0}},"required":["recovered"]}}}}}}},"/internal/jobs/reconcile-session-resources":{"post":{"tags":["InternalJobs"],"summary":"Replenish session resource pools and dispose ended calls' resources","responses":{"200":{"description":"Session resource reconciliation report","content":{"application/json":{"schema":{"type":"object","properties":{"reconciled":{"type":"integer","minimum":0}},"required":["reconciled"]}}}}}}},"/internal/jobs/reconcile-call-finalizations":{"post":{"tags":["InternalJobs"],"summary":"Reconcile operational closure from verified runtime session seals","description":"Claims a bounded, retry-fair batch of connected calls without operational closure and verifies session.json manifests. Missing or invalid artifacts remain visible for retry. A separate pass then closes connected calls whose liveness window lapsed (15 minutes after the last heartbeat for hosted calls the loop has inspected, 2 hours otherwise); expiry never invents endedAt or duration. A last pass closes calls that never connected and have no spoken messages two hours after they started, as never_connected.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Call finalization reconciliation report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconcileCallFinalizationsReport"}}}}}}},"/internal/jobs/backfill-call-lifecycle":{"post":{"tags":["InternalJobs"],"summary":"One-shot closure of historical calls that predate connection evidence","description":"Closes rows created before connected_at existed that are still open two hours after they started, and also repairs rows the browser beacon already closed without connection evidence, so the population it mutates is larger than the still-open one. Spoken messages backfill connected_at (source legacy_messages); without them the row takes started_at (source legacy_browser), which is the same observation the live path records when the browser creates a session. A still-open row closes as liveness_expired; one the beacon already closed keeps its closed_at and reason. Never writes endedAt or duration. Idempotent and re-runnable: repeat with the maximum limit until scanned is 0. Not a cron.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":5000,"default":500},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Call lifecycle backfill report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillCallLifecycleReport"}}}}}}},"/internal/jobs/purge-deleted-assets":{"post":{"tags":["InternalJobs"],"summary":"Purge soft-deleted content (blob + row) after the 30-day grace window","description":"Walks org_content rows soft-deleted >30 days ago, deletes the GCS blob, then deletes the row. Blob-delete failures retain the row for the next retry. Designed to be called daily by a Cloud Scheduler job.","responses":{"200":{"description":"Purge report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeDeletedContentReport"}}}}}}},"/internal/jobs/reap-stuck":{"post":{"tags":["InternalJobs"],"summary":"Fail jobs stuck past their deadline or idle threshold","description":"Finds every queued/running job that is either past its explicit deadlineAt or (when no deadline is set) has not been updated within the stuck-job threshold (default 35 min). Marks each as failed and closes any open step rows. Designed to be called every 30 minutes by a Cloud Scheduler job.","responses":{"200":{"description":"Reap report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReapStuckJobsReport"}}}}}}},"/internal/jobs/sweep-webhook-retries":{"post":{"tags":["InternalJobs"],"summary":"Deliver due webhook retries","description":"Attempts every integration_deliveries row whose nextRetryAt is due (pending/failed). Each delivery reschedules on failure per the backoff schedule and auto-disables its integration once retries are exhausted. Designed to be called every minute by a Cloud Scheduler job.","responses":{"200":{"description":"Sweep report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepWebhookRetriesReport"}}}}}}},"/internal/jobs/sweep-idle-copilot-threads":{"post":{"tags":["InternalJobs"],"summary":"Close copilot threads idle for more than 24 hours","description":"Closes active copilot threads whose last message is older than 24 hours, freeing their active-thread uniqueness slot. Designed to be called every 15 minutes by a Cloud Scheduler job.","responses":{"200":{"description":"Idle-thread sweep report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepIdleCopilotThreadsReport"}}}}}}},"/internal/jobs/release-waitlist":{"post":{"tags":["InternalJobs"],"summary":"Email a batch of waiting visitors when there is room","description":"Reads how calls have started, ended and been refused, decides whether there is room and how many waiting visitors to email (`lib/waitlist/release-policy.ts`), and emails the oldest. Also deletes signups past retention. Designed to be called every 5 minutes by a Cloud Scheduler job; overlapping calls are safe.","responses":{"200":{"description":"What the release decided and sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistReleaseReport"}}}}}}},"/internal/jobs/sweep-web-chat":{"post":{"tags":["InternalJobs"],"summary":"Delete expired web-chat counters and retained transcripts","description":"Deletes expired rate-limit counters and web-chat transcripts older than the 90-day retention window. Transcript deletion enforces the retention policy, so this must run daily.","responses":{"200":{"description":"Web-chat sweep report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepWebChatReport"}}}}}}},"/internal/jobs/post-agent-stage-digest":{"post":{"tags":["InternalJobs"],"summary":"Post the day's agent stage changes to Sable's channel","description":"Posts which agents went live, were taken offline or corrected in the window, the changes a lock for production, a deploy environment of `test` or the backfill made, and how many agents are live now, to `AGENT_STAGE_DIGEST_SLACK_CHANNEL`. The window defaults to the previous UTC day; `start` and `end` name another. Posts once per window: a retry answers `already_posted`. With no channel configured it answers `off` and posts nothing. A failed post answers 503 and keeps no record, so the retry posts. Designed to be called daily by a Cloud Scheduler job.","parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"end","in":"query"}],"responses":{"200":{"description":"Whether the digest was posted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStageDigestReport"}}}}}}},"/internal/jobs/backfill-insights":{"post":{"tags":["InternalJobs"],"summary":"Enqueue insight analysis for un-analyzed ended sessions","description":"Finds ended, org-owned sessions still owed part of the post-call analysis and drives each through the standard per-session enqueue path. Three arms, each with its own versioned idempotency key: a first analysis (no terminal session_insights row and no live/succeeded `insights:{id}` job — never-analyzed sessions, plus orphans a prior attempt left behind); an already-analyzed session with no call summary yet (no live/succeeded `insights:{id}:summary:{version}` job), which drains calls that ended before the summary shipped; and a questions re-extraction (no live/succeeded `insights:{id}:questions:{version}` job), which re-drives history after an extraction-prompt fix. A session owed both analyzed-arms takes summary first and questions on a later tick. Bounded by `limit` (default 120, max 500): job dispatch is immediate, so the batch bounds how many jobs a single tick dispatches — a Cloud Scheduler job calls this every minute to drain the backlog gradually and idles once the query returns nothing. Idempotent: each arm has its own key, and re-running only picks up sessions still lacking a result for the current version.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":120,"description":"Max sessions to enqueue this run — the peak concurrency of the burst."},"required":false,"description":"Max sessions to enqueue this run — the peak concurrency of the burst.","name":"limit","in":"query"}],"responses":{"200":{"description":"Backfill report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillInsightsReport"}}}}}}},"/organizations":{"get":{"tags":["Organizations"],"summary":"List all organizations","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List of organizations","content":{"application/json":{"schema":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}},"nextCursor":{"type":"string","nullable":true}},"required":["organizations","nextCursor"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Organizations"],"summary":"Create a new organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationBody"}}}},"responses":{"201":{"description":"Organization created","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Domain conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}":{"get":{"tags":["Organizations"],"summary":"Get organization by numeric or public ID","parameters":[{"schema":{"anyOf":[{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},{"type":"string"}],"description":"Numeric organization ID or public organization ID","example":"org_bd67d5d86ce042669f794cc682550557"},"required":true,"description":"Numeric organization ID or public organization ID","name":"id","in":"path"}],"responses":{"200":{"description":"Organization found","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid organization ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Organizations"],"summary":"Update organization","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationBody"}}}},"responses":{"200":{"description":"Organization updated","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Domain conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Organizations"],"summary":"Soft-delete organization","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Organization soft-deleted","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/branding":{"patch":{"tags":["Organizations"],"summary":"Update organization branding","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrandingBody"}}}},"responses":{"200":{"description":"Branding updated","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/entitlements":{"patch":{"tags":["Organizations"],"summary":"Update organization product entitlements (Sable admin only)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationEntitlementsBody"}}}},"responses":{"200":{"description":"Entitlements updated","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/org-slug":{"put":{"tags":["Organizations"],"summary":"Set the slug of the Sable Apps org linked to an organization (Sable admin only)","parameters":[{"schema":{"anyOf":[{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},{"type":"string"}],"description":"Numeric organization ID or public organization ID","example":"org_bd67d5d86ce042669f794cc682550557"},"required":true,"description":"Numeric organization ID or public organization ID","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrganizationOrgSlugBody"}}}},"responses":{"200":{"description":"The organization with the slug set","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another organization holds the slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suspension-reasons/{reason}":{"put":{"operationId":"putSuspensionReason","x-sable":{"kind":"resource"},"tags":["Organizations"],"summary":"Suspend an organization for a reason (requires `organizations:suspend`)","description":"Idempotent. While the organization is suspended for any reason, every one of its agents refuses calls with 503. A reason already held keeps who set it and when.","parameters":[{"schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","example":"contract-overage","description":"Lowercase words joined by `-`. Each setter names its own reason and lifts only that one."},"required":true,"description":"Lowercase words joined by `-`. Each setter names its own reason and lifts only that one.","name":"reason","in":"path"},{"schema":{"type":"string","pattern":"^org_","example":"org_acme","description":"The organization; Sable admins and Sable's own apps name it, anyone else suspends only their own."},"required":false,"description":"The organization; Sable admins and Sable's own apps name it, anyone else suspends only their own.","name":"orgId","in":"query"}],"responses":{"200":{"description":"The organization with every reason it is suspended for","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid reason or orgId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `organizations:suspend`; lifting a reason also requires having set it, or being a Sable admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["organizations:suspend"]}]},"delete":{"operationId":"deleteSuspensionReason","x-sable":{"kind":"resource"},"tags":["Organizations"],"summary":"Lift one reason an organization is suspended for (requires `organizations:suspend`)","description":"Idempotent. Only whoever set the reason, or a Sable admin, lifts it; an app sets and lifts as itself in any org it runs in. Other reasons keep the organization suspended; lifting a reason it is not suspended for changes nothing.","parameters":[{"schema":{"type":"string","maxLength":64,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","example":"contract-overage","description":"Lowercase words joined by `-`. Each setter names its own reason and lifts only that one."},"required":true,"description":"Lowercase words joined by `-`. Each setter names its own reason and lifts only that one.","name":"reason","in":"path"},{"schema":{"type":"string","pattern":"^org_","example":"org_acme","description":"The organization; Sable admins and Sable's own apps name it, anyone else suspends only their own."},"required":false,"description":"The organization; Sable admins and Sable's own apps name it, anyone else suspends only their own.","name":"orgId","in":"query"}],"responses":{"200":{"description":"The organization with every reason it is suspended for","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"400":{"description":"Invalid reason or orgId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires `organizations:suspend`; lifting a reason also requires having set it, or being a Sable admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["organizations:suspend"]}]}},"/organizations/{id}/restore":{"post":{"tags":["Organizations"],"summary":"Restore soft-deleted organization","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Organization restored","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/conduit-key":{"post":{"tags":["Organizations"],"summary":"Create or rotate an Aidan MCP key","description":"Returns the plaintext MCP key once. The API stores only its hash.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Aidan MCP key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateMcpApiKeyResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Organizations"],"summary":"Revoke an Aidan MCP key","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Aidan MCP key revoked","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"}},"required":["organization"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/recording/sessions":{"post":{"tags":["Recording"],"summary":"Start a new recording session","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecordingSessionBody"}}}},"responses":{"201":{"description":"Session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingSessionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/recording/sessions/{publicId}/observations/upload-urls":{"post":{"tags":["Recording"],"summary":"Mint signed direct-to-GCS PUT URLs for one observation's artifacts","description":"Returns a signed PUT URL per requested artifact slot (screenshots + a11y sidecars) so the browser uploads bytes straight to GCS, bypassing the platform's serverless request-body limit. Call finalize afterwards to commit observation.json.","parameters":[{"schema":{"type":"string","example":"rec_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationUploadUrlsBody"}}}},"responses":{"200":{"description":"Signed upload URLs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationUploadUrlsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Session is closed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/recording/sessions/{publicId}/observations/{observationPublicId}/finalize":{"post":{"tags":["Recording"],"summary":"Commit an observation whose sidecars are already in GCS","description":"Writes observation.json (the commit marker) for an observation whose screenshots + a11y sidecars were already PUT to GCS via signed URLs, and bumps the session observation count.","parameters":[{"schema":{"type":"string","example":"rec_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"},{"schema":{"type":"string","example":"obs_AbCdEf1234567890XYZ12"},"required":true,"name":"observationPublicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeObservationBody"}}}},"responses":{"201":{"description":"Observation finalized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationCreatedResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Session is closed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/recording/sessions/{publicId}/finish":{"post":{"tags":["Recording"],"summary":"Mark a recording session as finished","parameters":[{"schema":{"type":"string","example":"rec_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Session finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingSessionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/recording/sessions/{publicId}/observations":{"get":{"tags":["Recording"],"summary":"List all observations recorded in a session","parameters":[{"schema":{"type":"string","example":"rec_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Observations sorted by timestamp ascending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:read"]}]}},"/recording/sessions/{publicId}/discard":{"post":{"tags":["Recording"],"summary":"Mark a recording session as discarded (user cancelled mid-flow)","parameters":[{"schema":{"type":"string","example":"rec_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Session discarded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingSessionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/sessions/{sessionId}/recording-url":{"get":{"tags":["Session Artifacts"],"summary":"Get signed URL for session recording","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Signed recording URL, or signed URLs per track for a call recorded track by track","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","nullable":true,"example":"https://..."},"tracks":{"type":"array","items":{"type":"object","properties":{"trackSid":{"type":"string"},"participant":{"type":"string"},"kind":{"type":"string","enum":["audio","video"]},"name":{"type":"string","example":"browser-screen"},"offsetMs":{"type":"integer","minimum":0},"url":{"type":"string"}},"required":["trackSid","participant","kind","name","offsetMs","url"]},"description":"Present when the call was recorded track by track; `url` is then null. Each track starts `offsetMs` after the recording's `recording_started_at`."},"durationMs":{"type":"integer","minimum":0,"description":"Present with `tracks`: the recording's length, from its start to the latest track end."}},"required":["url"]}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","evals:read"]}]}},"/sessions/{sessionId}/artifacts":{"get":{"tags":["Session Artifacts"],"summary":"Get session artifacts (events + metadata) from storage","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Session artifacts","content":{"application/json":{"schema":{"type":"object","properties":{"sessionStartedAt":{"type":"string","nullable":true,"example":"2026-01-01T00:00:00Z"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"timestamp":{"type":"string"},"data":{"type":"object","additionalProperties":true},"duration_ms":{"type":"number","nullable":true},"call_id":{"type":"string"}},"required":["id","type","timestamp","data"]}}},"required":["sessionStartedAt","events"]}}}},"404":{"description":"Artifacts not found for session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["evals:read"]}]}},"/sessions/{sessionId}/media-timeline":{"get":{"tags":["Session Artifacts"],"summary":"Lightweight media timeline — segments describing what was shown over time","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Media timeline segments derived from the event stream","content":{"application/json":{"schema":{"type":"object","properties":{"sessionStartedAt":{"type":"string","nullable":true},"recordingStartedAt":{"type":"string","nullable":true},"segments":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string"},"url":{"type":"string","nullable":true},"timestamp":{"type":"string"},"arguments":{"type":"object","additionalProperties":true}},"required":["mode","url","timestamp"]}}},"required":["sessionStartedAt","recordingStartedAt","segments"]}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","evals:read"]}]}},"/sessions/{sessionId}/artifact-files":{"get":{"tags":["Session Artifacts"],"summary":"List raw session artifact files (Sable-internal)","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Raw session artifact files","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["metadata","events","screenshot","recording","other"]},"size":{"type":"number"}},"required":["path","name","kind"]}}},"required":["files"]}}}}}}},"/sessions/{sessionId}/artifact-files/download-url":{"get":{"tags":["Session Artifacts"],"summary":"Signed download URL for a raw session artifact file (Sable-internal)","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":500,"pattern":"^[^/]+(?:\\/[^/]+)*$"},"required":true,"name":"path","in":"query"}],"responses":{"200":{"description":"Short-lived signed download URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/artifact-files/download-urls":{"get":{"tags":["Session Artifacts"],"summary":"Signed download URLs for every raw session artifact file at once (Sable-internal)","description":"One listing, one response. Built for the archive stream, which would otherwise pay a round trip per artifact — a debug session carries hundreds.","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","example":"events,screenshot"},"required":false,"name":"kinds","in":"query"}],"responses":{"200":{"description":"Signed download URLs, one per matching artifact file","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["metadata","events","screenshot","recording","other"]},"size":{"type":"number"},"url":{"type":"string"}},"required":["path","name","kind","url"]}}},"required":["files"]}}}}}}},"/sessions/{sessionId}/debug-review":{"post":{"tags":["Session Artifacts"],"summary":"Mint upload URLs for a debug-review submission (Sable-internal)","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300,"example":"Agent stalled on pricing question"},"room":{"type":"string","nullable":true,"maxLength":200,"example":"candy-corp-demo"},"agent":{"type":"string","nullable":true,"maxLength":200},"reviewCount":{"type":"integer","minimum":1,"maximum":200,"example":3},"reporter":{"type":"object","nullable":true,"properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":200}}},"slots":{"type":"array","items":{"type":"string","enum":["bundle","runtime","reviews"],"example":"bundle"},"minItems":1,"example":["bundle","reviews"]},"screenshots":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":1,"maximum":999},"ext":{"type":"string","enum":["png","jpg"]}},"required":["index","ext"]},"maxItems":200}},"required":["title","reviewCount","slots"]}}}},"responses":{"200":{"description":"Signed upload URLs, one per requested slot","content":{"application/json":{"schema":{"type":"object","properties":{"submissionId":{"type":"string","example":"dbg_a1b2c3d4"},"folder":{"type":"string","example":"RM_AXUZcHUH7viW/debug-review/dbg_a1b2c3d4"},"platformUrl":{"type":"string","nullable":true,"example":"https://app.withsable.com/org_abc/calls?session=1234"},"uploads":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string","enum":["bundle","runtime","reviews","screenshot"]},"index":{"type":"number"},"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["slot","url","headers"]}}},"required":["submissionId","folder","platformUrl","uploads"]}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Session is at its debug-review limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/debug-reviews":{"get":{"tags":["Session Artifacts"],"summary":"List a session's debug-review submissions (Sable-internal)","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Submissions, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"reviews":{"type":"array","items":{"type":"object","properties":{"submissionId":{"type":"string"},"title":{"type":"string"},"room":{"type":"string","nullable":true},"agent":{"type":"string","nullable":true},"reviewCount":{"type":"number"},"reporter":{"type":"object","nullable":true,"properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":200}}},"createdAt":{"type":"string"},"sizes":{"type":"object","properties":{"bundle":{"type":"number"},"runtime":{"type":"number"},"reviews":{"type":"number"}}},"expectedSlots":{"type":"array","items":{"type":"string","enum":["bundle","runtime","reviews"],"example":"bundle"}},"notes":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["agent","bug"]},"quotedText":{"type":"string"},"current":{"type":"string"},"desired":{"type":"string"},"createdAt":{"type":"number"},"stageMode":{"type":"string","nullable":true},"stageUrl":{"type":"string","nullable":true},"stageAt":{"type":"number","nullable":true},"screenshotUrl":{"type":"string","nullable":true}},"required":["id","kind","quotedText","current","desired","createdAt"]}}},"required":["submissionId","title","room","agent","reviewCount","reporter","createdAt","sizes","expectedSlots","notes"]}}},"required":["reviews"]}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/debug-reviews/{submissionId}/{slot}/download-url":{"get":{"tags":["Session Artifacts"],"summary":"Signed download URL for one debug-review file (Sable-internal)","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","pattern":"^dbg_[1-9A-HJ-NP-Za-km-z]{21}$","example":"dbg_Z15cdttj92YRynYmyDQYK"},"required":true,"name":"submissionId","in":"path"},{"schema":{"type":"string","enum":["bundle","runtime","reviews"],"example":"bundle"},"required":true,"name":"slot","in":"path"}],"responses":{"200":{"description":"Short-lived signed download URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://storage.googleapis.com/..."}},"required":["url"]}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/coarse-storyboard":{"get":{"tags":["Session Artifacts"],"summary":"Read coarse storyboard timing and signed picture access","parameters":[{"schema":{"type":"string","maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Coarse timing and expiring, generation-pinned download URL, or null when absent","content":{"application/json":{"schema":{"type":"object","nullable":true,"properties":{"videoGeneration":{"type":"string"},"durationMs":{"type":"integer","minimum":0,"exclusiveMinimum":true},"width":{"type":"number","enum":[480]},"height":{"type":"number","enum":[270]},"images":{"type":"array","items":{"type":"object","properties":{"offset":{"type":"integer"},"length":{"type":"integer"},"atMs":{"type":"array","items":{"type":"integer"}}},"required":["offset","length","atMs"]}},"download":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"integer","minimum":0,"exclusiveMinimum":true},"generation":{"type":"string","pattern":"^[1-9]\\d{0,19}$"}},"required":["url","expiresAt","generation"]}},"required":["videoGeneration","durationMs","width","height","images","download"]}}}},"400":{"description":"Invalid session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found or preview unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"Request cancelled"},"503":{"description":"Storyboard unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["evals:read"]}]}},"/sessions/{sessionId}/activity":{"get":{"tags":["Session Artifacts"],"summary":"Read latest evaluation activity, falling back to session artifacts only when absent","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Activity, or null when no activity is available","content":{"application/json":{"schema":{"type":"object","nullable":true,"properties":{"sessionStartedAt":{"type":"string","nullable":true},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"client_event_id":{"type":"string"},"type":{"type":"string"},"timestamp":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["type","timestamp","data"],"additionalProperties":true}}},"required":["sessionStartedAt","events"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"499":{"description":"Request cancelled"}},"x-sable-permission-guards":[{"anyOf":["evals:read"]}]}},"/transcripts/{sessionId}/reviews":{"get":{"tags":["Transcripts"],"summary":"List a session's post-call reviews (Sable-internal)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Reviews, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSessionReviewsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Transcripts"],"summary":"Create a post-call review (Sable-internal)","description":"Persists a reviewer note without sending it to Slack.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionReviewBody"}}}},"responses":{"201":{"description":"Review created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionReviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/call-reviews":{"get":{"tags":["Transcripts"],"summary":"List a session's post-call reviews by its external session id (Sable-internal)","description":"The reviews `GET /transcripts/{sessionId}/reviews` returns, `?feedback=true` customer comments included, keyed by the RM_ id on the call's debug line. Also takes the CLI's login, so `sable bundle` saves them with the call.","parameters":[{"schema":{"type":"string","example":"RM_AXUZcHUH7viW"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Reviews","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSessionReviewsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/{sessionId}/customer-feedback":{"post":{"tags":["Transcripts"],"summary":"Save a customer's call feedback comments as reviews (parley service token)","description":"Called by parley after it relays a `?feedback=true` submission to Slack. Each comment becomes a `source: customer` review on the call. Retries of the same `submissionId` are no-ops.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerFeedbackBody"}}}},"responses":{"201":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerFeedbackResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/{sessionId}/reviews/submit":{"post":{"tags":["Transcripts"],"summary":"Submit selected post-call reviews to Slack (Sable-internal)","description":"Creates a fresh Slack parent thread with one reply per explicit action; retries reuse that action's thread.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitSessionReviewsBody"}}}},"responses":{"200":{"description":"Submission result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitSessionReviewsResponse"}}}},"400":{"description":"Call is still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/{sessionId}/reviews/{reviewId}":{"patch":{"tags":["Transcripts"],"summary":"Edit a post-call review (Sable-internal)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":45},"required":true,"name":"reviewId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionReviewBody"}}}},"responses":{"200":{"description":"Review updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReview"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session or review not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Transcripts"],"summary":"Delete a post-call review (Sable-internal)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":45},"required":true,"name":"reviewId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSessionReviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session or review not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/{sessionId}/reviews/{reviewId}/linear":{"post":{"tags":["Transcripts"],"summary":"Create or link an Engineering issue for a saved human review (Sable-internal)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":45},"required":true,"name":"reviewId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackSessionReviewInLinearBody"}}}},"responses":{"200":{"description":"Tracked review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReview"}}}},"400":{"description":"Invalid issue identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session, review, or issue not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Customer or issue needs attention","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Linear request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Linear integration unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/{sessionId}/profile":{"get":{"tags":["Transcripts"],"summary":"Current saved profile associated with a call (Sable-internal)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Latest saved profile for this call; may include updates not yet received by the main agent","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","minimum":0,"exclusiveMinimum":true},"generation":{"type":"integer","minimum":0,"exclusiveMinimum":true},"revision":{"type":"integer","minimum":0},"observed_at":{"type":"string","format":"date-time"},"text":{"type":"string","nullable":true}},"required":["sequence","generation","revision","observed_at","text"]}},"current":{"type":"object","nullable":true,"properties":{"content":{"type":"object","nullable":true,"properties":{"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":120},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"text":{"type":"string","minLength":1,"maxLength":2000},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["crm","custom_link","form","call","web","unknown"]},"id":{"type":"string","minLength":1,"maxLength":300}},"required":["type","id"],"additionalProperties":false},"minItems":1,"maxItems":64}},"required":["id","text"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["key","title","items"],"additionalProperties":false},"maxItems":20},"card":{"type":"object","properties":{"location":{"type":"object","properties":{"value":{"type":"object","properties":{"city":{"type":"string","maxLength":128},"region":{"type":"string","maxLength":8},"country":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"whyTheyCame":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"whatMatters":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"minItems":1,"maxItems":3},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"outcome":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"nextStep":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"title":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":120},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"profileUrl":{"type":"object","properties":{"value":{"type":"string","maxLength":1024,"format":"uri"},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"photo":{"type":"object","properties":{"value":{"type":"string","maxLength":1024,"format":"uri"},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"basedIn":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":120},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"background":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"links":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string","maxLength":1024,"format":"uri"},"minItems":1,"maxItems":3},"source":{"type":"string","minLength":1,"maxLength":40},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string","maxLength":1024,"format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"seq":{"type":"integer","minimum":0},"seqCall":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["value","source","confidence","updatedAt"],"additionalProperties":false},"enrichedFor":{"type":"string","pattern":"^[a-f0-9]{64}$"},"enrichPending":{"type":"boolean","enum":[true]}},"additionalProperties":false}},"required":["sections"],"additionalProperties":false},"revision":{"type":"integer","minimum":0},"updatedAt":{"type":"string","format":"date-time"},"revoked":{"type":"boolean"},"lookup_for_agent":{"type":"array","items":{"type":"string"},"description":"Lines from the caller card that the main agent receives with this profile"}},"required":["content","revision","updatedAt","revoked","lookup_for_agent"]},"verified":{"type":"boolean","description":"Whether a link naming this person was opened by this browser, on this call or an earlier one"}},"required":["snapshots","current","verified"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/{sessionId}/caller-card":{"get":{"tags":["Transcripts"],"summary":"Who the caller is and what we know about them","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Caller identity and card for this call","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"domain":{"type":"string","nullable":true},"returning":{"type":"boolean"},"live":{"type":"boolean"},"recentlyEnded":{"type":"boolean"},"card":{"type":"object","properties":{"location":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"whyTheyCame":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"whatMatters":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"outcome":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"nextStep":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"title":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"profileUrl":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"photo":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"basedIn":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"background":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"links":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]}}}},"required":["name","email","company","domain","returning","live","recentlyEnded","card"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts/{sessionId}/person":{"get":{"tags":["Transcripts"],"summary":"The person on a call, with their other calls when the org keeps their profile","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"The call's person","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["call","remember"],"description":"remember: the org keeps this person's profile across calls; call: only this call's profile and call"},"revoked":{"type":"boolean"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"emailVerified":{"type":"boolean"},"company":{"type":"object","nullable":true,"properties":{"domain":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["domain","name"]},"card":{"type":"object","properties":{"location":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"whyTheyCame":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"whatMatters":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"outcome":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"nextStep":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"title":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"profileUrl":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"photo":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"basedIn":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"background":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]},"links":{"type":"object","properties":{"value":{"nullable":true},"source":{"type":"string"},"confidence":{"type":"string","enum":["stated","verified","inferred"]},"url":{"type":"string"},"updatedAt":{"type":"string"}},"required":["source","confidence","updatedAt"]}}},"sections":{"type":"array","nullable":true,"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":120},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"text":{"type":"string","minLength":1,"maxLength":2000},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["crm","custom_link","form","call","web","unknown"]},"id":{"type":"string","minLength":1,"maxLength":300}},"required":["type","id"],"additionalProperties":false},"minItems":1,"maxItems":64}},"required":["id","text"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["key","title","items"],"additionalProperties":false},"maxItems":20,"description":"Profile sections"},"pinned":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]},"description":"Team-pinned facts; readers with members:manage only, null otherwise"},"calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"startedAt":{"type":"string"},"agentName":{"type":"string","nullable":true},"durationSeconds":{"type":"number","nullable":true},"participantName":{"type":"string","nullable":true}},"required":["id","startedAt","agentName","durationSeconds","participantName"]}}},"required":["mode","revoked","name","email","emailVerified","company","card","sections","pinned","calls"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts/{sessionId}/company":{"get":{"tags":["Transcripts"],"summary":"The company of the person on a call, its kept people and their calls","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"The call's company; domain is null when the person has no company","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"research":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"url":{"type":"string"},"as_of":{"type":"string"}},"required":["name","value","url","as_of"]},"description":"Public-web facts for the domain"},"brand":{"$ref":"#/components/schemas/VisitorBrand"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"emailVerified":{"type":"boolean"},"sessionId":{"type":"integer"}},"required":["name","email","emailVerified","sessionId"]}},"calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"startedAt":{"type":"string"},"agentName":{"type":"string","nullable":true},"durationSeconds":{"type":"number","nullable":true},"participantName":{"type":"string","nullable":true}},"required":["id","startedAt","agentName","durationSeconds","participantName"]}}},"required":["domain","name","research","brand","people","calls"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts/{sessionId}/research":{"get":{"tags":["Transcripts"],"summary":"Company research delivered to a call (Sable-internal)","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":123},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"The public-web facts delivered to this call, recorded at delivery; never starts a search","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","nullable":true},"status":{"type":"string","enum":["delivered","superseded","pending","none"]},"facts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"url":{"type":"string"},"as_of":{"type":"string"}},"required":["name","value","url","as_of"]}}},"required":["domain","status","facts"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions":{"get":{"tags":["Sessions"],"summary":"List sessions with latest eval status","description":"Returns sessions joined with their latest eval attempt. Non-admins are scoped to their own org; Sable admins can pass an explicit `orgId`.","parameters":[{"schema":{"type":"string","example":"32","description":"Numeric org ID or public org_xxx. Sable admins must supply this to scope the list to a specific tenant; for non-admins it is derived from the auth token and ignored if passed."},"required":false,"description":"Numeric org ID or public org_xxx. Sable admins must supply this to scope the list to a specific tenant; for non-admins it is derived from the auth token and ignored if passed.","name":"orgId","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned by a previous call."},"required":false,"description":"Opaque pagination cursor returned by a previous call.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"example":120,"description":"Minimum session duration in seconds."},"required":false,"description":"Minimum session duration in seconds.","name":"minDuration","in":"query"}],"responses":{"200":{"description":"Paginated session list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}}},"x-sable-permission-guards":[{"anyOf":["evals:read"]}]}},"/simulations/digital-humans":{"get":{"tags":["Simulations"],"summary":"List digital humans for the caller's organization","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)"},"required":false,"description":"Filter by organization ID (admin only)","name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":"42","description":"Only digital humans bound to this agent (or unbound)"},"required":false,"description":"Only digital humans bound to this agent (or unbound)","name":"agentId","in":"query"}],"responses":{"200":{"description":"List of digital humans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalHumanListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]},"post":{"tags":["Simulations"],"summary":"Create a digital human","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDigitalHumanBody"}}}},"responses":{"201":{"description":"Digital human created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalHumanResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Digital human name already exists in this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:write"]}]}},"/simulations/digital-humans/{publicId}":{"get":{"tags":["Simulations"],"summary":"Get a digital human by public ID","parameters":[{"schema":{"type":"string","minLength":1,"example":"dh_01961f2a-b3c4-7d5e-8f6a-9b0c1d"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Digital human","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalHumanResponse"}}}},"400":{"description":"Unsupported saved call replay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Digital human not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]},"patch":{"tags":["Simulations"],"summary":"Update a digital human","parameters":[{"schema":{"type":"string","minLength":1,"example":"dh_01961f2a-b3c4-7d5e-8f6a-9b0c1d"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDigitalHumanBody"}}}},"responses":{"200":{"description":"Digital human updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalHumanResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Digital human not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Digital human name already exists in this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:write"]}]},"delete":{"tags":["Simulations"],"summary":"Delete a digital human (soft delete; past run snapshots are unaffected)","parameters":[{"schema":{"type":"string","minLength":1,"example":"dh_01961f2a-b3c4-7d5e-8f6a-9b0c1d"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Digital human deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDigitalHumanResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Digital human not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:delete"]}]}},"/simulations/runs":{"post":{"tags":["Simulations"],"summary":"Launch a simulation run (a digital-human suite against an agent)","description":"Snapshots the referenced digital humans into the run row, then enqueues the `simulation.run` async-job, which dispatches the external simulation worker. Returns 201 immediately with the run in `pending` status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSimulationRunBody"}}}},"responses":{"201":{"description":"Run created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRunResponse"}}}},"400":{"description":"Invalid request body or unknown digital humans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:write"]}]},"get":{"tags":["Simulations"],"summary":"List simulation runs (newest first)","parameters":[{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":"42"},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"example":"20"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRunListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]}},"/simulations/call-replays":{"post":{"tags":["Simulations"],"summary":"Compile a completed call into threads and launch its replay","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallReplayRunBody"}}}},"responses":{"201":{"description":"Replay launched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRunResponse"}}}},"400":{"description":"Call cannot be replayed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read"]},{"anyOf":["simulations:write"]}]}},"/simulations/runs/{id}":{"get":{"tags":["Simulations"],"summary":"Get a simulation run by ID","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRunResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]}},"/simulations/runs/{id}/cancel":{"post":{"tags":["Simulations"],"summary":"Cancel a pending or running simulation run","description":"Marks the run canceled and closes its parked async-job. It also asks brain to delete the run's pods (best-effort), so in-flight calls hang up. A late result callback is ignored (status CAS). Idempotent: canceling an already-canceled run returns 200 and retries both.","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Run canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRunResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Run already reached a terminal state (complete/failed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:write"]}]}},"/simulations/runs/{id}/sessions":{"get":{"tags":["Simulations"],"summary":"List the journey sessions produced by a simulation run","description":"Simulated calls are real Parley sessions stamped with a `sim:<runId>:…` correlation id; this resolves them to Calls-page session ids, with live sessions flagged while the run executes.","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Sessions ordered by start time","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRunSessionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]}},"/simulations/runs/{id}/result":{"post":{"tags":["Simulations"],"summary":"Receive brain's terminal simulation result","description":"Callback endpoint handed to brain at dispatch time (RFC-0046 prod path). Brain POSTs the finished run's envelope here — a succeeded run carries the evals suite report, a failed one the reason — and this completes or fails the run. Authenticates by the `t` token minted into the callback URL at dispatch (brain's Authorization header does not survive API Gateway), or by service token / Sable-admin JWT. Guarded by status: only runs in 'running' state accept a result.","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"t","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainSimulationResultBody"}}}},"responses":{"200":{"description":"Run finalized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRunResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Run is not in 'running' status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:write"]}]}},"/agent-builds":{"post":{"tags":["AgentBuilds"],"summary":"Start building an agent for a company's website","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentBuildBody"}}}},"responses":{"202":{"description":"Build started, or the build already in flight for this domain, depth and kind","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentBuildResponse"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agent-builds:write"]}]},"get":{"tags":["AgentBuilds"],"summary":"List agent builds, newest first, by status (requires `agent-builds:read`)","parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentBuildStatus"},{"description":"Only builds in this status, as the response reports it (`stalled` is a running build gone quiet)."}]},"required":false,"description":"Only builds in this status, as the response reports it (`stalled` is a running build gone quiet).","name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Page size, newest first."},"required":false,"description":"Page size, newest first.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64,"description":"`nextCursor` of the previous page."},"required":false,"description":"`nextCursor` of the previous page.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Agent builds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentBuildsResponse"}}}},"400":{"description":"Invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agent-builds:read"]}]}},"/agent-builds/{id}":{"get":{"tags":["AgentBuilds"],"summary":"Get an agent build: status, stage, steps and cost","parameters":[{"schema":{"type":"string","example":"bld_3dWZFLNmQndrJhQhapc5J"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Agent build","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuild"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agent-builds:read"]}]}},"/agent-builds/{id}/approve":{"post":{"tags":["AgentBuilds"],"summary":"Approve a built agent for delivery","parameters":[{"schema":{"type":"string","example":"bld_3dWZFLNmQndrJhQhapc5J"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAgentBuildBody"}}}},"responses":{"200":{"description":"Agent build","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuild"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not awaiting review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agent-builds:write"]}]}},"/agent-builds/{id}/reject":{"post":{"tags":["AgentBuilds"],"summary":"Reject a built agent","parameters":[{"schema":{"type":"string","example":"bld_3dWZFLNmQndrJhQhapc5J"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewAgentBuildBody"}}}},"responses":{"200":{"description":"Agent build","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuild"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent build not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not awaiting review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agent-builds:write"]}]}},"/agent-builds/{id}/callback/progress":{"post":{"tags":["AgentBuilds"],"summary":"Builder progress callback (per-build callback token)","parameters":[{"schema":{"type":"string","example":"bld_3dWZFLNmQndrJhQhapc5J"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuildProgressBody"}}}},"responses":{"200":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuildCallbackResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Bad callback token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent-builds/{id}/callback/finish":{"post":{"tags":["AgentBuilds"],"summary":"Builder finish callback: RESULT, cost and score (per-build callback token)","parameters":[{"schema":{"type":"string","example":"bld_3dWZFLNmQndrJhQhapc5J"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuildFinishBody"}}}},"responses":{"200":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentBuildCallbackResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Bad callback token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/simulations/sanity-runs":{"post":{"tags":["Simulations"],"summary":"Submit one ungraded hosted Sanity simulation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSanityRun"}}}},"responses":{"201":{"description":"Run queued","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/SimulationRun"},"runtimeSelection":{"$ref":"#/components/schemas/SanityRuntimeSelection"}},"required":["run"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:write"]}]}},"/simulations/runs/{id}/sanity-worker":{"post":{"tags":["Simulations"],"summary":"Run-scoped Sanity worker authentication and saved-call verification","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"operation":{"type":"string","enum":["token"]}},"required":["operation"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","enum":["replay"]}},"required":["operation"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","enum":["runtime-source"]}},"required":["operation"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","enum":["bundle"]},"agent":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","agent"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","enum":["classification"]},"room":{"type":"string","minLength":1,"maxLength":200}},"required":["operation","room"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","enum":["learner"]},"state":{"type":"object","additionalProperties":true}},"required":["operation","state"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Worker context or saved call","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Learner exchange rate limited; retry with backoff","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/simulations/runs/{id}/sanity-live":{"get":{"tags":["Simulations"],"summary":"Read resumable live events and the latest product screenshot","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":100000,"default":0},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"Live evidence index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanityLiveEvidence"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]}},"/simulations/runs/{id}/sanity-artifacts":{"get":{"tags":["Simulations"],"summary":"Download a sealed Sanity evidence archive","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Short-lived download","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresIn":{"type":"number"}},"required":["url","expiresIn"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]}},"/simulations/runs/{id}/sanity-learner":{"get":{"tags":["Simulations"],"summary":"Read the external learner's current request and input receipts","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Current learner state","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]},"post":{"tags":["Simulations"],"summary":"Submit a learner response or upload its supporting evidence","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"operation":{"type":"string","enum":["submit"]},"response":{"type":"object","additionalProperties":true}},"required":["operation","response"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","enum":["upload"]},"requestId":{"type":"string","format":"uuid"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"bytes":{"type":"integer","minimum":0,"maximum":20000000}},"required":["operation","requestId","sha256","bytes"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Input queued, not yet delivered","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:write"]}]}},"/simulations/runs/{id}/sanity-viewer":{"get":{"tags":["Simulations"],"summary":"Watch the same simulation using a hidden subscribe-only connection","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"viewerId","in":"query"}],"responses":{"200":{"description":"Short-lived observer connection","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]}},"/simulations/runs/{id}/sanity-files":{"get":{"tags":["Simulations"],"summary":"List live run artifacts or download one by its recorded path","parameters":[{"schema":{"type":"string","format":"uuid","example":"9c1f9c3e-1234-4a5b-8c6d-7e8f9a0b1c2d"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":1000},"required":false,"name":"path","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":100000,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Artifact listing or download","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Login required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission or job capability denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Run or evidence not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale or duplicate input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Hosted service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["simulations:read"]}]}},"/skills":{"get":{"tags":["Skills"],"summary":"List skills for the caller's organization","parameters":[{"schema":{"type":"string","example":"1","description":"Filter by organization ID (admin only)."},"required":false,"description":"Filter by organization ID (admin only).","name":"orgId","in":"query"}],"responses":{"200":{"description":"List of skills","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:read"]}]},"post":{"tags":["Skills"],"summary":"Create a skill (optionally bound to a recording session)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillBody"}}}},"responses":{"201":{"description":"Skill created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Recording session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/skills/{publicId}":{"patch":{"tags":["Skills"],"summary":"Rename a skill or change its description","parameters":[{"schema":{"type":"string","example":"skl_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkillBody"}}}},"responses":{"200":{"description":"Skill updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]},"delete":{"tags":["Skills"],"summary":"Soft-delete a skill","parameters":[{"schema":{"type":"string","example":"skl_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Skill deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:delete"]}]}},"/skills/{publicId}/generation-inputs":{"get":{"tags":["Skills"],"summary":"Fetch the recorded demo inputs a skill is generated from","description":"Returns the manual meta plus the ordered observation trail (with a11y sidecars) pulled from GCS. Consumed by the platform Skills Generator server action.","parameters":[{"schema":{"type":"string","example":"skl_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Generator input bundle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillGenerationInputsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:read"]}]}},"/skills/{publicId}/document":{"get":{"tags":["Skills"],"summary":"Fetch the stored SKILL.md for a skill","description":"Reads the generated SKILL.md from SKILLS_GCS_BUCKET so it can be viewed/edited in the platform.","parameters":[{"schema":{"type":"string","example":"skl_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"responses":{"200":{"description":"Skill document (or exists=false when not yet generated)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSkillDocumentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:read"]}]},"post":{"tags":["Skills"],"summary":"Store a generated SKILL.md for a skill","description":"Writes the generated SKILL.md to SKILLS_GCS_BUCKET so Ita's agent can pull it.","parameters":[{"schema":{"type":"string","example":"skl_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreSkillDocumentBody"}}}},"responses":{"200":{"description":"Document stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreSkillDocumentResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/skills/{publicId}/fail":{"post":{"tags":["Skills"],"summary":"Mark a skill's generation as failed","description":"Called by the platform generator server action when the LLM call or GCS upload fails.","parameters":[{"schema":{"type":"string","example":"skl_AbCdEf1234567890XYZ12"},"required":true,"name":"publicId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkSkillFailedBody"}}}},"responses":{"200":{"description":"Skill marked failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["skills:write"]}]}},"/apps/panels":{"get":{"operationId":"list_app_panels","x-sable":{"kind":"exception","reason":"Platform's navigation: an org's panels are the snapshot its sable/platform arranges, not a dataset"},"tags":["App panels"],"summary":"List the organization's app panels","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"},{"schema":{"type":"string","maxLength":63,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The org's Sable Apps workspace to reach its apps in, instead of main"},"required":false,"description":"The org's Sable Apps workspace to reach its apps in, instead of main","name":"workspace","in":"query"}],"responses":{"200":{"description":"App panels","content":{"application/json":{"schema":{"type":"object","properties":{"panels":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*\\/[a-z0-9]+(?:-[a-z0-9]+)*$"},"install":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The name the org installed the app under, unique in the org"},"panel":{"type":"string","pattern":"^[a-z][a-z0-9-]*$","description":"The panel's name among the app's panels"},"module":{"type":"string","pattern":"^\\/\\.well-known\\/sable\\/(panel|panels\\/[a-z][a-z0-9-]*)\\.js$","description":"The path the app serves the panel's module at"},"at":{"type":"string"},"label":{"type":"string","minLength":1},"icon":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"position":{"type":"integer","minimum":0}},"required":["app","install","panel","module","at","label","position"]}},"warming":{"type":"boolean","description":"The organization's panels are being read for the first time"}},"required":["panels","warming"]}}}},"304":{"description":"Unchanged since the request's If-None-Match"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires settings:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/apps/panels/session":{"post":{"operationId":"open_app_panel_session","x-sable":{"kind":"exception","reason":"Mints the viewer's token for one app's own page; the API holds no panel resource"},"tags":["App panels"],"summary":"Open an organization's app panel for the viewer","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"},{"schema":{"type":"string","maxLength":63,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The org's Sable Apps workspace to reach its apps in, instead of main"},"required":false,"description":"The org's Sable Apps workspace to reach its apps in, instead of main","name":"workspace","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"install":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The name the org installed the app under, unique in the org"},"panel":{"type":"string","pattern":"^[a-z][a-z0-9-]*$","default":"default","description":"The panel's name among the app's panels"}},"required":["install"]}}}},"responses":{"200":{"description":"Where to frame the panel, and the viewer's token","content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string","format":"uri","description":"The org's own install of the app, which the page frames"},"token":{"type":"string","description":"The viewer's token, valid only at `origin`"}},"required":["origin","token"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Requires settings:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Panel or workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The organization's app panels could not be read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Viewer token signing is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/slack/events":{"post":{"tags":["Slack"],"summary":"Receive signed Slack lifecycle events","responses":{"200":{"description":"Event accepted or URL challenge returned","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},{"type":"object","properties":{"challenge":{"type":"string"}},"required":["challenge"]}]}}}},"400":{"description":"Malformed event payload","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Invalid Slack signature or application identity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/slack/agent/interactions":{"post":{"tags":["Slack"],"summary":"Handle signed Slack interactions with the Buddy's messages","description":"Verifies Slack's signature and acknowledges within Slack's three-second window. A follow-up button asks the Buddy that question in the thread, as the clicker; a feedback button rates the answer for a linked member. Link buttons need only the 200, and a click that can't be handled is still acknowledged.","responses":{"200":{"description":"Interaction acknowledged","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"Malformed interaction payload","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Invalid Slack signature or application identity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"413":{"description":"Payload larger than any Slack interaction","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/slack/agent/commands":{"post":{"tags":["Slack"],"summary":"Handle the Buddy's signed /aidan slash command","description":"Verifies Slack's signature and the app id, then hands the question to the Buddy, which answers through the command's response_url so only the person who typed it sees the answer. Answers at once with a short message only they see.","responses":{"200":{"description":"What Slack shows the person at once","content":{"application/json":{"schema":{"type":"object","properties":{"response_type":{"type":"string","enum":["ephemeral"]},"text":{"type":"string"},"blocks":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["response_type","text"]}}}},"401":{"description":"Invalid Slack signature or application identity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"413":{"description":"Payload larger than any Slack command","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/slack/agent/events":{"post":{"tags":["Slack"],"summary":"Receive signed Slack events for the Buddy","description":"Verifies Slack's signature and acknowledges within Slack's three-second window. app_uninstalled switches the workspace's install off and ends its Sable account links. tokens_revoked for the Buddy's bot user marks the install to be installed again. user_change for a deactivated member ends that member's links. Other events are handed to the Buddy when it answers messages, and acknowledged otherwise.","responses":{"200":{"description":"Event accepted or URL challenge returned","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},{"type":"object","properties":{"challenge":{"type":"string"}},"required":["challenge"]}]}}}},"400":{"description":"Malformed event payload","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Invalid Slack signature or application identity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"413":{"description":"Payload larger than any Slack event","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/slack/agent/installations/{teamId}/channels":{"get":{"tags":["Slack"],"summary":"List the channels a post-call destination can use in a workspace","description":"Open public and private channels Aidan can see in the org's workspace, by name. A Sable admin also reaches Sable's own workspace from any org.","parameters":[{"schema":{"type":"string","pattern":"^[TE][A-Z0-9]+$","description":"The Slack workspace (team) id"},"required":true,"description":"The Slack workspace (team) id","name":"teamId","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Channels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Workspace must be installed again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/slack/agent/installations/{teamId}/members":{"get":{"tags":["Slack"],"summary":"List the people a post-call destination can DM in a workspace","description":"The workspace's people, without bots or deactivated members. Workspace reach as for channels.","parameters":[{"schema":{"type":"string","pattern":"^[TE][A-Z0-9]+$","description":"The Slack workspace (team) id"},"required":true,"description":"The Slack workspace (team) id","name":"teamId","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"People","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackMemberListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Workspace must be installed again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/slack/agent/installations/{teamId}":{"delete":{"operationId":"disconnect_slack_agent_installation","x-sable":{"kind":"exception","reason":"attempts to revoke the workspace's token at Slack and ends the install and member links locally; a side effect on Slack, not an edit of one dataset resource"},"tags":["Slack"],"summary":"Disconnect the Buddy from a Slack workspace","description":"Asks Slack to revoke the workspace's token, then ends the install and its member links as Slack's app_uninstalled event would. The install ends here even when Slack cannot confirm; the response says so.","parameters":[{"schema":{"type":"string","pattern":"^[TE][A-Z0-9]+$","description":"The Slack workspace (team) id"},"required":true,"description":"The Slack workspace (team) id","name":"teamId","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectSlackAgentInstallationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/slack/agent/installations":{"get":{"tags":["Slack"],"summary":"List the workspaces the Buddy is installed in","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Installed workspaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAgentInstallationListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read"]}]}},"/slack/agent/oauth/start":{"post":{"tags":["Slack"],"summary":"Start installing the Buddy in Slack","description":"Returns Slack's consent URL. The install must be completed by the same person within ten minutes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSlackAgentInstallBody"}}}},"responses":{"200":{"description":"Authorize URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackOAuthStartResponse"}}}},"400":{"description":"Invalid request or expired install","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Workspace already connected to another organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/slack/agent/oauth/complete":{"post":{"tags":["Slack"],"summary":"Complete installing the Buddy in Slack","description":"Exchanges the code Slack sent to the redirect URL. A workspace connected to another organization is refused.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSlackOAuthBody"}}}},"responses":{"200":{"description":"Installed workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAgentInstallCompleteResponse"}}}},"400":{"description":"Invalid request or expired install","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Workspace already connected to another organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/slack/agent/link/preview":{"post":{"tags":["Slack"],"summary":"Show which Slack member a Buddy link would connect","description":"Names the Slack member and workspace of a link Sable Buddy sent, so the signed-in person can check them before confirming. Changes nothing. The same checks as completing the link apply, so a member already linked to another person is refused here too, and a person of another organization than the workspace's sees the member only once their emails match and the Slack account is a Slack Connect guest's.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSlackAgentLinkBody"}}}},"responses":{"200":{"description":"The Slack member and workspace the link would connect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAgentLinkPreviewResponse"}}}},"400":{"description":"Invalid, expired or used link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not a signed-in person or, for a person of another organization, the Slack member's email is not theirs or the Slack account is the workspace's own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Slack member already linked to another user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the email check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack refused the email check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/slack/agent/link/complete":{"post":{"tags":["Slack"],"summary":"Connect a Slack member to the signed-in Sable user","description":"Completes the link Aidan sent a Slack member. The signed-in person must sign in with the Slack member's email. They may belong to another organization than the workspace's only when the Slack account is a Slack Connect guest's, from another workspace; Aidan then answers them with their own organization's access. The link works once and for 15 minutes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSlackAgentLinkBody"}}}},"responses":{"200":{"description":"Linked Slack member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAgentLinkCompleteResponse"}}}},"400":{"description":"Invalid, expired or used link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not a signed-in person, the Slack member's email is not the user's, or the user is of another organization and the Slack account is the workspace's own","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Slack member already linked to another user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the email check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack refused the email check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/slack/agent/link/google/start":{"get":{"tags":["Slack"],"summary":"Verify Google identity to connect Aidan without a platform session","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"required":true,"name":"state","in":"query"}],"responses":{"302":{"description":"Continue to Google"},"400":{"description":"Invalid connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/slack/agent/link/google/callback":{"get":{"tags":["Slack"],"summary":"Complete Aidan identity verification without signing into the platform","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"required":true,"name":"state","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096},"required":false,"name":"code","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error","in":"query"}],"responses":{"200":{"description":"Connection instructions","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/slack/agent/link/google/approve":{"post":{"tags":["Slack"],"summary":"Approve the Slack account from the Google-authenticated browser","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},"required":["token"]}}}},"responses":{"200":{"description":"Slack confirmation instructions","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or expired approval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/slack-agent/turn-credentials":{"post":{"tags":["Slack"],"summary":"Hand the Buddy's Durable Object the credentials for one turn attempt","description":"Called by copilot-worker's BuddyThreadDO with the Buddy worker token, at the start of every attempt at answering a Slack member. Returns the workspace's bot token and, for a linked member, a 15-minute JWT for their Sable user; for an unlinked member, a single-use connect link instead. Scoped by orgId: a workspace not installed for that org is not found.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAgentTurnCredentialsBody"}}}},"responses":{"200":{"description":"The turn's credentials, or the member's connect link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackAgentTurnCredentials"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid Buddy worker token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The conversation audience is invalid or the worker cannot enforce rep access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No active Buddy install for this org in that workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The workspace's tokens are being rotated; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/internal/slack-agent/channel-org-suggestion":{"post":{"tags":["Slack"],"summary":"Suggest the org a Slack Connect channel belongs to","description":"Called by copilot-worker's BuddyThreadDO with the Buddy worker token when Aidan refuses in a Slack Connect channel tied to no org. Reads the channel's outside members with the workspace's bot token and returns the one org that lists all their email domains, or null. Aidan only suggests linking it; nothing is tied.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"slackTeamId":{"type":"string","maxLength":32,"pattern":"^[A-Z0-9]+$"},"slackChannelId":{"type":"string","maxLength":32,"pattern":"^[A-Z0-9]+$"}},"required":["orgId","slackTeamId","slackChannelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"The suggested org, or null","content":{"application/json":{"schema":{"type":"object","properties":{"org":{"type":"object","nullable":true,"properties":{"name":{"type":"string","minLength":1},"publicId":{"type":"string","minLength":1}},"required":["name","publicId"]}},"required":["org"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid Buddy worker token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/slack/aidan/interactions":{"post":{"tags":["Slack"],"summary":"Acknowledge Slack interactivity payloads for Aidan","description":"Returns an empty 200 so Slack does not show a configuration warning next to link buttons. The body is never read or stored.","responses":{"200":{"description":"Acknowledged"}}}},"/slack/oauth/start":{"post":{"tags":["Slack"],"summary":"Start Slack OAuth","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSlackOAuthBody"}}}},"responses":{"200":{"description":"Authorize URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackOAuthStartResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OAuth state conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/slack/oauth/complete":{"post":{"tags":["Slack"],"summary":"Complete Slack OAuth","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSlackOAuthBody"}}}},"responses":{"200":{"description":"Connected installation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackOAuthCompleteResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OAuth state conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/slack/installations":{"get":{"tags":["Slack"],"summary":"List Slack installations","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Installations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackInstallationListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OAuth state conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:read","integrations:write"]}]}},"/slack/installations/{id}/channels":{"get":{"tags":["Slack"],"summary":"List accessible Slack channels","parameters":[{"schema":{"type":"string","minLength":1,"example":"sli_01JABC"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Channels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OAuth state conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/slack/installations/{id}/reconnect":{"post":{"tags":["Slack"],"summary":"Reconnect a Slack installation","parameters":[{"schema":{"type":"string","minLength":1,"example":"sli_01JABC"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconnectSlackInstallationBody"}}}},"responses":{"200":{"description":"Authorize URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackOAuthStartResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OAuth state conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/slack/installations/{id}":{"delete":{"tags":["Slack"],"summary":"Disconnect a Slack installation","parameters":[{"schema":{"type":"string","minLength":1,"example":"sli_01JABC"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectSlackInstallationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Installation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OAuth state conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Slack rate limited the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Slack rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["settings:write"]}]}},"/telemetry/events":{"post":{"tags":["Telemetry"],"summary":"Ingest a batch of client-emitted events (service-token only)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryBatchBody"}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryBatchResponse"}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing/invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"JWT auth not permitted on this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/customer-domains":{"get":{"tags":["Transcripts"],"summary":"List the customer domains the Calls tab can be scoped to","description":"Options for the Calls customer filter, drawn from the same scope as the call list — the analytics facet excludes automated calls and scopes by agent org, so it would both offer domains this list has none of and hide domains visible on the AI Employee tab.","parameters":[{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","example":"MjAyNC0wMS0wMVQwMDowMDowMFpfMTIz"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^[1-9]\\d*$","example":"35","description":"One-based page for a direct jump. Omit for the first page; cannot be combined with cursor."},"required":false,"description":"One-based page for a direct jump. Omit for the first page; cannot be combined with cursor.","name":"page","in":"query"},{"schema":{"type":"string","example":"50"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","example":"john@example.com"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","example":"glean,notion","description":"Comma-separated agent names"},"required":false,"description":"Comma-separated agent names","name":"agentNames","in":"query"},{"schema":{"type":"string","example":"12,34","description":"Comma-separated numeric agent IDs"},"required":false,"description":"Comma-separated numeric agent IDs","name":"agentIds","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z","description":"Inclusive lower bound for session start time."},"required":false,"description":"Inclusive lower bound for session start time.","name":"dateFrom","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-02-01T00:00:00Z","description":"Exclusive upper bound for session start time."},"required":false,"description":"Exclusive upper bound for session start time.","name":"dateTo","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"true"},"required":false,"name":"completed","in":"query"},{"schema":{"type":"string","enum":["all","human","agent"],"example":"human","description":"Filter by call source: human (not automated), agent (correlation ID or verified simulation), or all"},"required":false,"description":"Filter by call source: human (not automated), agent (correlation ID or verified simulation), or all","name":"source","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The analytics routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The analytics routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"30","description":"Minimum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete."},"required":false,"description":"Minimum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete.","name":"minSec","in":"query"},{"schema":{"type":"string","example":"600","description":"Maximum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete."},"required":false,"description":"Maximum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete.","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["include","exclude","only"],"description":"How to combine this organization's configured Sable website deployment with the selected call types. Omit to filter solely by billing category. Has no effect in organizations without a configured website deployment."},"required":false,"description":"How to combine this organization's configured Sable website deployment with the selected call types. Omit to filter solely by billing category. Has no effect in organizations without a configured website deployment.","name":"websiteCallType","in":"query"},{"schema":{"type":"string","example":"production,internal","description":"Comma-separated billing leaves with OR semantics: production, pending, internal, empty, sable_team. pending is a call still in progress; empty is a finished call without connection evidence or a recorded end, or a finished call without nonblank agent speech. Closure does not require liveness expiry. sable_team requires the effective Sable-admin role."},"required":false,"description":"Comma-separated billing leaves with OR semantics: production, pending, internal, empty, sable_team. pending is a call still in progress; empty is a finished call without connection evidence or a recorded end, or a finished call without nonblank agent speech. Closure does not require liveness expiry. sable_team requires the effective Sable-admin role.","name":"billingCategories","in":"query"},{"schema":{"type":"string","maxLength":64,"pattern":"^(web|zoom|google_meet)(,(web|zoom|google_meet))*$","example":"google_meet,zoom","description":"Comma-separated ways the call joined, with OR semantics: web, zoom, google_meet. A call that recorded no join method counts as web. Omit to keep every call."},"required":false,"description":"Comma-separated ways the call joined, with OR semantics: web, zoom, google_meet. A call that recorded no join method counts as web. Omit to keep every call.","name":"joinMethods","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","maxLength":3800,"example":"lnk_x8k2p1_spring-launch,lnk_q7d3m9","description":"Comma-separated deployment-link refs (at most 50); a session matches when it arrived through any one of them exactly."},"required":false,"description":"Comma-separated deployment-link refs (at most 50); a session matches when it arrived through any one of them exactly.","name":"linkRefs","in":"query"},{"schema":{"type":"string","maxLength":254,"format":"email","example":"ae@customer.com","description":"Calls that arrived through one of this org's links whose post-call recipients (`notify_emails`) include this address, case-insensitively: the calls that address sees with the own-calls-only role."},"required":false,"description":"Calls that arrived through one of this org's links whose post-call recipients (`notify_emails`) include this address, case-insensitively: the calls that address sees with the own-calls-only role.","name":"notifyEmail","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Selectable domains, busiest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCustomerDomainsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts":{"get":{"tags":["Transcripts"],"summary":"List transcript sessions (paginated)","description":"Lists transcript sessions with cursor-based pagination, filtering, and search. Returns lightweight rows without messages.","parameters":[{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","example":"MjAyNC0wMS0wMVQwMDowMDowMFpfMTIz"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^[1-9]\\d*$","example":"35","description":"One-based page for a direct jump. Omit for the first page; cannot be combined with cursor."},"required":false,"description":"One-based page for a direct jump. Omit for the first page; cannot be combined with cursor.","name":"page","in":"query"},{"schema":{"type":"string","example":"50"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","example":"john@example.com"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","example":"glean,notion","description":"Comma-separated agent names"},"required":false,"description":"Comma-separated agent names","name":"agentNames","in":"query"},{"schema":{"type":"string","example":"12,34","description":"Comma-separated numeric agent IDs"},"required":false,"description":"Comma-separated numeric agent IDs","name":"agentIds","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z","description":"Inclusive lower bound for session start time."},"required":false,"description":"Inclusive lower bound for session start time.","name":"dateFrom","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-02-01T00:00:00Z","description":"Exclusive upper bound for session start time."},"required":false,"description":"Exclusive upper bound for session start time.","name":"dateTo","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"true"},"required":false,"name":"completed","in":"query"},{"schema":{"type":"string","enum":["all","human","agent"],"example":"human","description":"Filter by call source: human (not automated), agent (correlation ID or verified simulation), or all"},"required":false,"description":"Filter by call source: human (not automated), agent (correlation ID or verified simulation), or all","name":"source","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The analytics routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The analytics routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"30","description":"Minimum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete."},"required":false,"description":"Minimum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete.","name":"minSec","in":"query"},{"schema":{"type":"string","example":"600","description":"Maximum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete."},"required":false,"description":"Maximum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete.","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["include","exclude","only"],"description":"How to combine this organization's configured Sable website deployment with the selected call types. Omit to filter solely by billing category. Has no effect in organizations without a configured website deployment."},"required":false,"description":"How to combine this organization's configured Sable website deployment with the selected call types. Omit to filter solely by billing category. Has no effect in organizations without a configured website deployment.","name":"websiteCallType","in":"query"},{"schema":{"type":"string","example":"production,internal","description":"Comma-separated billing leaves with OR semantics: production, pending, internal, empty, sable_team. pending is a call still in progress; empty is a finished call without connection evidence or a recorded end, or a finished call without nonblank agent speech. Closure does not require liveness expiry. sable_team requires the effective Sable-admin role."},"required":false,"description":"Comma-separated billing leaves with OR semantics: production, pending, internal, empty, sable_team. pending is a call still in progress; empty is a finished call without connection evidence or a recorded end, or a finished call without nonblank agent speech. Closure does not require liveness expiry. sable_team requires the effective Sable-admin role.","name":"billingCategories","in":"query"},{"schema":{"type":"string","maxLength":64,"pattern":"^(web|zoom|google_meet)(,(web|zoom|google_meet))*$","example":"google_meet,zoom","description":"Comma-separated ways the call joined, with OR semantics: web, zoom, google_meet. A call that recorded no join method counts as web. Omit to keep every call."},"required":false,"description":"Comma-separated ways the call joined, with OR semantics: web, zoom, google_meet. A call that recorded no join method counts as web. Omit to keep every call.","name":"joinMethods","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","maxLength":3800,"example":"lnk_x8k2p1_spring-launch,lnk_q7d3m9","description":"Comma-separated deployment-link refs (at most 50); a session matches when it arrived through any one of them exactly."},"required":false,"description":"Comma-separated deployment-link refs (at most 50); a session matches when it arrived through any one of them exactly.","name":"linkRefs","in":"query"},{"schema":{"type":"string","maxLength":254,"format":"email","example":"ae@customer.com","description":"Calls that arrived through one of this org's links whose post-call recipients (`notify_emails`) include this address, case-insensitively: the calls that address sees with the own-calls-only role."},"required":false,"description":"Calls that arrived through one of this org's links whose post-call recipients (`notify_emails`) include this address, case-insensitively: the calls that address sees with the own-calls-only role.","name":"notifyEmail","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Defaults to true: the first page also counts every matching call and lists the deployment picker. Send false to get rows alone and read those from `GET /transcripts/summary`."},"required":false,"description":"Defaults to true: the first page also counts every matching call and lists the deployment picker. Send false to get rows alone and read those from `GET /transcripts/summary`.","name":"includeSummary","in":"query"}],"responses":{"200":{"description":"Paginated list of transcript sessions","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/TranscriptSessionRow"}},"nextCursor":{"type":"string","nullable":true},"agents":{"type":"array","items":{"type":"string"}},"agentOptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","nullable":true},"name":{"type":"string"},"slug":{"type":"string","nullable":true},"deployEnvironment":{"type":"string","nullable":true},"isDeleted":{"type":"boolean"}},"required":["id","name","slug","deployEnvironment","isDeleted"]}},"totalCount":{"type":"number","nullable":true},"capabilities":{"type":"object","properties":{"billingClassification":{"type":"boolean"}},"required":["billingClassification"]}},"required":["sessions","nextCursor","agents","agentOptions","totalCount","capabilities"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts/summary":{"get":{"tags":["Transcripts"],"summary":"Count the calls a Calls filter matches and list its deployment options","description":"The total and deployment picker for the same filters as `GET /transcripts`, which can then skip them with `includeSummary=false` and return rows without waiting on a count of every matching call. `cursor`, `page` and `limit` are ignored.","parameters":[{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","example":"MjAyNC0wMS0wMVQwMDowMDowMFpfMTIz"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^[1-9]\\d*$","example":"35","description":"One-based page for a direct jump. Omit for the first page; cannot be combined with cursor."},"required":false,"description":"One-based page for a direct jump. Omit for the first page; cannot be combined with cursor.","name":"page","in":"query"},{"schema":{"type":"string","example":"50"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","example":"john@example.com"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","example":"glean,notion","description":"Comma-separated agent names"},"required":false,"description":"Comma-separated agent names","name":"agentNames","in":"query"},{"schema":{"type":"string","example":"12,34","description":"Comma-separated numeric agent IDs"},"required":false,"description":"Comma-separated numeric agent IDs","name":"agentIds","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00Z","description":"Inclusive lower bound for session start time."},"required":false,"description":"Inclusive lower bound for session start time.","name":"dateFrom","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2024-02-01T00:00:00Z","description":"Exclusive upper bound for session start time."},"required":false,"description":"Exclusive upper bound for session start time.","name":"dateTo","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"true"},"required":false,"name":"completed","in":"query"},{"schema":{"type":"string","enum":["all","human","agent"],"example":"human","description":"Filter by call source: human (not automated), agent (correlation ID or verified simulation), or all"},"required":false,"description":"Filter by call source: human (not automated), agent (correlation ID or verified simulation), or all","name":"source","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Include internal-team participants (the org's own email domains). Defaults to excluded."},"required":false,"description":"Include internal-team participants (the org's own email domains). Defaults to excluded.","name":"includeInternal","in":"query"},{"schema":{"type":"string","example":"adobe.com,delta.com","description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email are excluded whenever this is set."},"required":false,"description":"Comma-separated participant email domains to scope to; a session matches any one of them. Empty keeps every domain. Sessions with no participant email are excluded whenever this is set.","name":"customerDomains","in":"query"},{"schema":{"type":"string","enum":["true","false"],"example":"false","description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The analytics routes take the same flag — send both the same value or the two pages disagree."},"required":false,"description":"Sable-admin only: include Sable/Prolific and org-suppressed participants. Ignored for everyone else. The analytics routes take the same flag — send both the same value or the two pages disagree.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","example":"30","description":"Minimum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete."},"required":false,"description":"Minimum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete.","name":"minSec","in":"query"},{"schema":{"type":"string","example":"600","description":"Maximum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete."},"required":false,"description":"Maximum measured session duration in seconds (inclusive). Sessions with no measured duration are excluded, even if they are effectively complete.","name":"maxSec","in":"query"},{"schema":{"type":"string","enum":["include","exclude","only"],"description":"How to combine this organization's configured Sable website deployment with the selected call types. Omit to filter solely by billing category. Has no effect in organizations without a configured website deployment."},"required":false,"description":"How to combine this organization's configured Sable website deployment with the selected call types. Omit to filter solely by billing category. Has no effect in organizations without a configured website deployment.","name":"websiteCallType","in":"query"},{"schema":{"type":"string","example":"production,internal","description":"Comma-separated billing leaves with OR semantics: production, pending, internal, empty, sable_team. pending is a call still in progress; empty is a finished call without connection evidence or a recorded end, or a finished call without nonblank agent speech. Closure does not require liveness expiry. sable_team requires the effective Sable-admin role."},"required":false,"description":"Comma-separated billing leaves with OR semantics: production, pending, internal, empty, sable_team. pending is a call still in progress; empty is a finished call without connection evidence or a recorded end, or a finished call without nonblank agent speech. Closure does not require liveness expiry. sable_team requires the effective Sable-admin role.","name":"billingCategories","in":"query"},{"schema":{"type":"string","maxLength":64,"pattern":"^(web|zoom|google_meet)(,(web|zoom|google_meet))*$","example":"google_meet,zoom","description":"Comma-separated ways the call joined, with OR semantics: web, zoom, google_meet. A call that recorded no join method counts as web. Omit to keep every call."},"required":false,"description":"Comma-separated ways the call joined, with OR semantics: web, zoom, google_meet. A call that recorded no join method counts as web. Omit to keep every call.","name":"joinMethods","in":"query"},{"schema":{"type":"string","enum":["2"],"example":"2","description":"Marks an explicit Call type selection as using the five-leaf billing contract."},"required":false,"description":"Marks an explicit Call type selection as using the five-leaf billing contract.","name":"billingContractVersion","in":"query"},{"schema":{"type":"string","maxLength":3800,"example":"lnk_x8k2p1_spring-launch,lnk_q7d3m9","description":"Comma-separated deployment-link refs (at most 50); a session matches when it arrived through any one of them exactly."},"required":false,"description":"Comma-separated deployment-link refs (at most 50); a session matches when it arrived through any one of them exactly.","name":"linkRefs","in":"query"},{"schema":{"type":"string","maxLength":254,"format":"email","example":"ae@customer.com","description":"Calls that arrived through one of this org's links whose post-call recipients (`notify_emails`) include this address, case-insensitively: the calls that address sees with the own-calls-only role."},"required":false,"description":"Calls that arrived through one of this org's links whose post-call recipients (`notify_emails`) include this address, case-insensitively: the calls that address sees with the own-calls-only role.","name":"notifyEmail","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Total matching calls and the deployments the picker offers","content":{"application/json":{"schema":{"type":"object","properties":{"totalCount":{"type":"number"},"agentOptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","nullable":true},"name":{"type":"string"},"slug":{"type":"string","nullable":true},"deployEnvironment":{"type":"string","nullable":true},"isDeleted":{"type":"boolean"}},"required":["id","name","slug","deployEnvironment","isDeleted"]}}},"required":["totalCount","agentOptions"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User or organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts/evidence:resolve":{"post":{"tags":["Transcripts"],"summary":"Resolve semantic evidence calls","description":"Resolves exact external session IDs to Calls rows without applying the page's ordinary filters. Used for semantic-evidence citations and to open the call behind a session-keyed record such as a scorecard.","parameters":[{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalSessionIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255,"example":"RM_c8RDBfhwZght"},"minItems":1,"maxItems":50}},"required":["externalSessionIds"]}}}},"responses":{"200":{"description":"Visible transcript rows matching the requested evidence IDs","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/TranscriptSessionRow"}}},"required":["sessions"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read"]}]}},"/transcripts/{id}":{"get":{"tags":["Transcripts"],"summary":"Get transcript session detail","description":"Returns a single transcript session with all messages and eval data.","parameters":[{"schema":{"type":"string","example":"123"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Transcript session with messages","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/TranscriptSessionDetail"},"capabilities":{"type":"object","properties":{"billingClassification":{"type":"boolean"}},"required":["billingClassification"]}},"required":["session","capabilities"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]},"delete":{"tags":["Transcripts"],"summary":"Delete a transcript session","description":"Soft-deletes a transcript session. Requires transcripts:delete.","parameters":[{"schema":{"type":"string","example":"123"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Session deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — transcripts:delete required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:delete"]}]}},"/transcripts/{id}/word-timings":{"get":{"tags":["Transcripts"],"summary":"Load word timings from saved call traces","parameters":[{"schema":{"type":"string","example":"123"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"responses":{"200":{"description":"Approximate word playback positions or availability","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ready","unavailable"]},"reason":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"words":{"type":"array","items":{"type":"object","properties":{"startChar":{"type":"integer","minimum":0},"endChar":{"type":"integer","minimum":0,"exclusiveMinimum":true},"start":{"type":"number","minimum":0},"end":{"type":"number","minimum":0}},"required":["startChar","endChar","start","end"]}}},"required":["id","words"]}}},"required":["status","messages"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Word timings temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts/{id}/translate":{"post":{"tags":["Transcripts"],"summary":"Translate transcript messages for display","description":"Renders the named messages of a visible session in `targetLanguage` for the call drawer. Display-only: nothing is stored on the transcript. Messages already in the target language come back with `translatedText: null`; messages the model could not translate are listed in `failedIds`.","parameters":[{"schema":{"type":"string","example":"123"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","example":"1"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)"},"required":false,"description":"Sable-admin-only: preview data as this role (reduces data visibility to match the role)","name":"asRole","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslateSessionMessagesBody"}}}},"responses":{"200":{"description":"Translations for the requested messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptTranslationResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Translation allowance spent; retry in a minute","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Translation unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","transcripts:read-own"]}]}},"/transcripts/sessions":{"post":{"tags":["Transcripts"],"summary":"Create a transcript session","description":"Creates a new transcript session for storing conversation messages.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTranscriptSessionBody"}}}},"responses":{"200":{"description":"Session created or existing session returned","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"sessionId":{"type":"number","example":123},"participantId":{"type":"number","nullable":true,"example":456}},"required":["success","sessionId","participantId"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Call identity conflicts with an existing session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/messages":{"post":{"tags":["Transcripts"],"summary":"Add a message to a transcript session","description":"Adds a user or agent message to an existing transcript session.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTranscriptMessageBody"}}}},"responses":{"200":{"description":"Message added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"messageId":{"type":"string","example":"12345"}},"required":["success","messageId"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/sessions/journey":{"post":{"tags":["Transcripts"],"summary":"Record the agent's authoritative moment timeline for a session","description":"Posted by the agent runtime when a session finalizes. Re-derives every message's `moment_id` from the timeline and marks the session reconciled. Messages are stamped live by the client, which can miss a position update; this replaces those guesses with the agent's own record. Idempotent.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordJourneyTimelineBody"}}}},"responses":{"200":{"description":"Timeline recorded and messages re-stamped","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"messagesRestamped":{"type":"integer","example":12,"description":"Messages whose moment_id was written. Includes rows whose value was already correct."},"messagesCorrected":{"type":"integer","example":2,"description":"Subset that disagreed with the client's live stamp; their prior value is kept in metadata."}},"required":["success","messagesRestamped","messagesCorrected"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/sessions/end":{"put":{"tags":["Transcripts"],"summary":"Close a transcript session","description":"Records browser-requested operational closure without inventing an observed end timestamp.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndTranscriptSessionBody"}}}},"responses":{"200":{"description":"Session operationally closed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Transcripts"],"summary":"Close a transcript session (beacon)","description":"POST alias for operational closure, used by navigator.sendBeacon on page unload.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndTranscriptSessionBody"}}}},"responses":{"200":{"description":"Session operationally closed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/sessions/complete":{"post":{"tags":["Transcripts"],"summary":"Record Parley transcript completion","description":"The browser attests it sealed capture and received valid acknowledgements for every caption write. Idempotent: retries return the first receipt timestamp. Does not establish recording sync or completion of other producers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"integer","minimum":0,"exclusiveMinimum":true},"clientAccessToken":{"type":"string","minLength":32,"maxLength":256}},"required":["sessionId","clientAccessToken"]}}}},"responses":{"200":{"description":"Receipt recorded","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"parleyTranscriptCompletedAt":{"type":"string","format":"date-time"}},"required":["success","parleyTranscriptCompletedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found or capability invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/sessions/certificate":{"post":{"tags":["Transcripts"],"summary":"Get certificate delivery status","description":"Returns a coarse certificate state for the participant that owns the session capability. Rubric grading may remain pending after session end.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTranscriptCertificateStatusBody"}}}},"responses":{"200":{"description":"Certificate delivery state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTranscriptCertificateStatusResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found or capability invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Certificate eligibility blocked by malformed published journey","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/feedback":{"post":{"tags":["Transcripts"],"summary":"Submit outro feedback for a session","description":"Stores the end-of-session feedback (chips, poll, text, rating) on the journey session.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitOutroFeedbackBody"}}}},"responses":{"200":{"description":"Feedback stored","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}},"400":{"description":"A written explanation is required for this rating","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/request-help":{"post":{"tags":["Transcripts"],"summary":"Request live support for a session","description":"Pages the on-call via PagerDuty and posts the same context to the Sable support Slack channel, asking a human to join the call. No DB writes.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestHelpBody"}}}},"responses":{"200":{"description":"Escalation processed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"paged":{"type":"boolean","example":true,"description":"Whether PagerDuty accepted the trigger — i.e. the on-call is actually being paged."},"notified":{"type":"boolean","example":true,"description":"Whether the escalation reached the team by any channel — the PagerDuty page or the Slack post."},"isLive":{"type":"boolean","example":true,"description":"Whether the call is still live and joinable."}},"required":["success","paged","notified","isLive"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transcripts/errors":{"post":{"tags":["Transcripts"],"summary":"Record a reported error for a session","description":"Persists a reported issue/error against a journey session for durable observability. Service-token only (proxied by Parley's server). Org is derived from the session row.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSessionErrorBody"}}}},"responses":{"200":{"description":"Error recorded","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"id":{"type":"number","example":456},"createdAt":{"type":"string","example":"2026-06-08T12:00:00.000Z"}},"required":["success","id","createdAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — service token required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/datasets":{"get":{"tags":["Datasets"],"x-sable":{"kind":"query"},"operationId":"listDatasets","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Datasets visible to the caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDescriptions"}}}},"400":{"description":"Invalid org, dataset input or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","analytics:read","transcripts:read-own","grading:read","agents:read"]}]}},"/query":{"post":{"tags":["Datasets"],"x-sable":{"kind":"query"},"operationId":"queryRecords","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable staff only (403 otherwise): read as a customer with this role sees it, as on /calls. The role's permissions apply."},"required":false,"description":"Sable staff only (403 otherwise): read as a customer with this role sees it, as on /calls. The role's permissions apply.","name":"asRole","in":"query"},{"schema":{"type":"string","enum":["human","agent","all"],"description":"human (default) leaves out automated runs; agent keeps only them; all keeps both."},"required":false,"description":"human (default) leaves out automated runs; agent keeps only them; all keeps both.","name":"source","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Count the organization's own team. Defaults to false for source=human and true for agent or all, as /calls/stats does."},"required":false,"description":"Count the organization's own team. Defaults to false for source=human and true for agent or all, as /calls/stats does.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Sable staff only, ignored for everyone else: count Sable and tester traffic."},"required":false,"description":"Sable staff only, ignored for everyone else: count Sable and tester traffic.","name":"includeSableTraffic","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetQuery"}}}},"responses":{"200":{"description":"Selected rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRows"}}}},"400":{"description":"Invalid org, dataset input or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","analytics:read","transcripts:read-own","grading:read","agents:read"]}]}},"/aggregate":{"post":{"tags":["Datasets"],"x-sable":{"kind":"query"},"operationId":"aggregateRecords","parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable staff only (403 otherwise): read as a customer with this role sees it, as on /calls. The role's permissions apply."},"required":false,"description":"Sable staff only (403 otherwise): read as a customer with this role sees it, as on /calls. The role's permissions apply.","name":"asRole","in":"query"},{"schema":{"type":"string","enum":["human","agent","all"],"description":"human (default) leaves out automated runs; agent keeps only them; all keeps both."},"required":false,"description":"human (default) leaves out automated runs; agent keeps only them; all keeps both.","name":"source","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Count the organization's own team. Defaults to false for source=human and true for agent or all, as /calls/stats does."},"required":false,"description":"Count the organization's own team. Defaults to false for source=human and true for agent or all, as /calls/stats does.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Sable staff only, ignored for everyone else: count Sable and tester traffic."},"required":false,"description":"Sable staff only, ignored for everyone else: count Sable and tester traffic.","name":"includeSableTraffic","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetAggregate"}}}},"responses":{"200":{"description":"Grouped metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetGroups"}}}},"400":{"description":"Invalid org, dataset input or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","analytics:read","transcripts:read-own","grading:read","agents:read"]}]}},"/records/{dataset}/{id}":{"get":{"tags":["Datasets"],"x-sable":{"kind":"query"},"operationId":"getRecord","parameters":[{"schema":{"type":"string","enum":["sessions","participants","rubrics","scorecards","agents","questions","feedback","engagement_signals","moments"]},"required":true,"name":"dataset","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member","description":"Sable staff only (403 otherwise): read as a customer with this role sees it, as on /calls. The role's permissions apply."},"required":false,"description":"Sable staff only (403 otherwise): read as a customer with this role sees it, as on /calls. The role's permissions apply.","name":"asRole","in":"query"},{"schema":{"type":"string","enum":["human","agent","all"],"description":"human (default) leaves out automated runs; agent keeps only them; all keeps both."},"required":false,"description":"human (default) leaves out automated runs; agent keeps only them; all keeps both.","name":"source","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Count the organization's own team. Defaults to false for source=human and true for agent or all, as /calls/stats does."},"required":false,"description":"Count the organization's own team. Defaults to false for source=human and true for agent or all, as /calls/stats does.","name":"includeInternal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Sable staff only, ignored for everyone else: count Sable and tester traffic."},"required":false,"description":"Sable staff only, ignored for everyone else: count Sable and tester traffic.","name":"includeSableTraffic","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Comma-separated field names. Omit to return the dataset default projection."},"required":false,"description":"Comma-separated field names. Omit to return the dataset default projection.","name":"select","in":"query"}],"responses":{"200":{"description":"Selected record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRecord"}}}},"400":{"description":"Invalid org, dataset input or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization or record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["transcripts:read","analytics:read","transcripts:read-own","grading:read","agents:read"]}]}},"/search":{"post":{"operationId":"search","tags":["Datasets"],"x-sable":{"kind":"query"},"parameters":[{"schema":{"type":"string","minLength":1},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchInput"}}}},"responses":{"200":{"description":"Ranked search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPage"}}}},"400":{"description":"Invalid search or organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organization not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read","transcripts:read","transcripts:read-own"]}]}},"/copilot/video/summary":{"post":{"tags":["CopilotVideo"],"summary":"Get full summary and scene index for a video","description":"Returns the doc-level summary, per-scene breakdowns, and structured index for a specific video source. Source can live in either the assets store or the KB store — sable-api resolves the kb from the source_id.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (admin only)"}},"required":["source_id"]}}}},"responses":{"200":{"description":"Video summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoSummary"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/copilot/video/search":{"post":{"tags":["CopilotVideo"],"summary":"Semantic search within a video","description":"Searches a specific video source for scenes matching the query. Source can live in either the assets store or the KB store.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1},"query":{"type":"string","minLength":1},"top_k":{"type":"integer","minimum":1,"maximum":10,"default":3},"mode":{"type":"string","enum":["fast","rich"],"default":"fast"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (admin only)"}},"required":["source_id","query"]}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchVideoResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/copilot/video/frame":{"post":{"tags":["CopilotVideo"],"summary":"Get a signed thumbnail URL at a given timestamp","description":"Returns a short-lived signed URL for a video frame closest to the requested timestamp. Source can live in either the assets store or the KB store.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1},"time_s":{"type":"number","minimum":0},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (admin only)"}},"required":["source_id","time_s"]}}}},"responses":{"200":{"description":"Signed frame URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No frame at timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/copilot/video/transcript":{"post":{"tags":["CopilotVideo"],"summary":"Get a transcript window for a time range","description":"Returns transcript segments within the requested time window at the given granularity. Source can live in either the assets store or the KB store.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1},"start_s":{"type":"number","minimum":0,"default":0},"end_s":{"type":"number","minimum":0,"exclusiveMinimum":true},"granularity":{"type":"string","enum":["word","segment","paragraph"],"default":"segment"},"orgId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Organization ID (admin only)"}},"required":["source_id"]}}}},"responses":{"200":{"description":"Transcript segments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["knowledge-base:read"]}]}},"/post-call-integrations":{"post":{"tags":["Post-call integrations"],"summary":"Create a post-call integration","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointBody"}}}},"responses":{"201":{"description":"Integration created; HTTPS response includes its signing secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]},"get":{"tags":["Post-call integrations"],"summary":"List post-call integrations","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"agentId","in":"query"}],"responses":{"200":{"description":"Endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]}},"/post-call-integrations/test-emails":{"post":{"tags":["Post-call integrations"],"summary":"Send one call's post-call email as it would arrive (Sable admins)","description":"Renders the call with the same fields and template as its automatic post-call email and sends it to the integration's recipients plus the call's link notify list, or to custom addresses. Writes no call event and no delivery. `dryRun` resolves and renders without sending.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCallTestEmailBody"}}}},"responses":{"200":{"description":"Who it went to (or would go to) and its subject","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCallTestEmailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sable admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Call or integration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The call is still being processed, or there is no one to send to","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The email provider failed the send","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/post-call-integrations/deliveries":{"get":{"tags":["Post-call integrations"],"summary":"List post-call deliveries (paginated)","parameters":[{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"endpointId","in":"query"},{"schema":{"type":"integer","nullable":true},"required":false,"name":"agentId","in":"query"},{"schema":{"type":"string","enum":["pending","succeeded","failed","exhausted","skipped"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]}},"/post-call-integrations/deliveries/{id}":{"get":{"tags":["Post-call integrations"],"summary":"Get a post-call delivery","parameters":[{"schema":{"type":"string","example":"whd_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryDetailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]}},"/post-call-integrations/calls/{sessionId}/emails":{"get":{"tags":["Post-call integrations"],"summary":"List one call's post-call email deliveries","description":"`sessionId` is the call's transcript session id. When no delivery is visible, `emptyReason` says why where it can.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1234},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"}],"responses":{"200":{"description":"The call's email deliveries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallEmailDeliveriesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]}},"/post-call-integrations/deliveries/{id}/email":{"get":{"tags":["Post-call integrations"],"summary":"Render the email a post-call email delivery sent","parameters":[{"schema":{"type":"string","example":"whd_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"}],"responses":{"200":{"description":"Rendered email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEmailResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]}},"/post-call-integrations/calls/{sessionId}/follow-up-email":{"get":{"tags":["Post-call integrations"],"summary":"Get the thank-you email sent to one call's caller","description":"`sessionId` is the call's transcript session id.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1234},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"},{"schema":{"type":"string","enum":["super-admin","consumer","admin","member"],"example":"member"},"required":false,"name":"asRole","in":"query"}],"responses":{"200":{"description":"The call's follow-up email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallFollowUpEmail"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]}},"/post-call-integrations/calls/{sessionId}/slack":{"get":{"tags":["Post-call integrations"],"summary":"List one call's Slack debrief deliveries (Sable admins only)","description":"`sessionId` is the call's transcript session id. When there is no delivery, `emptyReason` says why where it can.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1234},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"The call's Slack deliveries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSlackDeliveriesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/post-call-integrations/deliveries/{id}/slack-message":{"get":{"tags":["Post-call integrations"],"summary":"Render the Slack message a debrief delivery posted (Sable admins only)","parameters":[{"schema":{"type":"string","example":"whd_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Rendered Slack message and thread","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverySlackMessageResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/post-call-integrations/deliveries/{id}/resend":{"post":{"tags":["Post-call integrations"],"summary":"Re-enqueue a past delivery (replay)","parameters":[{"schema":{"type":"string","example":"whd_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"201":{"description":"New delivery enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/post-call-integrations/{id}":{"get":{"tags":["Post-call integrations"],"summary":"Get a post-call integration","parameters":[{"schema":{"type":"string","example":"whe_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]},"patch":{"tags":["Post-call integrations"],"summary":"Update a post-call integration","parameters":[{"schema":{"type":"string","example":"whe_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointBody"}}}},"responses":{"200":{"description":"Endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]},"delete":{"tags":["Post-call integrations"],"summary":"Delete a post-call integration","parameters":[{"schema":{"type":"string","example":"whe_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeleteResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/post-call-integrations/{id}/secret":{"get":{"tags":["Post-call integrations"],"summary":"Reveal an HTTPS integration's signing secret","parameters":[{"schema":{"type":"string","example":"whe_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Plaintext secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/post-call-integrations/{id}/secret/rotate":{"post":{"tags":["Post-call integrations"],"summary":"Rotate an HTTPS integration's signing secret","parameters":[{"schema":{"type":"string","example":"whe_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Rotated; response includes the new secret and the previous secret remains valid during the grace window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateWebhookSecretResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/post-call-integrations/{id}/test":{"post":{"tags":["Post-call integrations"],"summary":"Send a sample event and return the live response","parameters":[{"schema":{"type":"string","example":"whe_0000000000000000000000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"orgId","in":"query"}],"responses":{"200":{"description":"Live response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestSendResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:write"]}]}},"/post-call-integrations/slack-debriefs":{"post":{"tags":["Post-call integrations"],"summary":"Regenerate a call's debrief and send it to the Slack destinations of its agent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSlackDebriefBody"}}}},"responses":{"202":{"description":"Deliveries scheduled; they appear in each destination's delivery log","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSlackDebriefResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/post-call-integrations/preview":{"post":{"tags":["Post-call integrations"],"summary":"Render what an integration would receive, without sending it","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationPreviewBody"}}}},"responses":{"200":{"description":"Projected payload, plus the rendered email for email integrations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationPreviewResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Integration conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["integrations:read"]}]}},"/meeting-bots":{"post":{"tags":["MeetingBots"],"summary":"Send a meeting bot whose screen is this agent's call page into a Zoom meeting","description":"An authenticated caller needs `agents:write` and must be able to see the agent. A visitor on the call page sends the bot unauthenticated, but only for an agent whose config offers `zoom` in `ui.call_providers` or as `ui.network_fallback`, and only within the per-agent and per-client budgets — every bot is a paid meeting hour.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMeetingBotBody"}}}},"responses":{"201":{"description":"Bot created and joining the meeting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotResponse"}}}},"403":{"description":"This agent does not offer Zoom calls, or the caller may not write agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many meeting bots requested for this agent or from this client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Recall rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are not configured on this deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"],"ifAuthenticated":true}]}},"/meeting-bots/webhooks/recall":{"post":{"tags":["MeetingBots"],"summary":"Receive Recall bot status changes","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallWebhookBody"}}}},"responses":{"200":{"description":"Event accepted, whether or not it named a bot we know","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotAcknowledged"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Recall webhooks are not configured on this deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meeting-bots/{id}":{"get":{"tags":["MeetingBots"],"summary":"Read a bot's mirrored status","description":"Public: the call page Recall renders holds no credentials, and the unguessable id is the access control.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Mirrored status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotStatusResponse"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meeting-bots/{id}/leave":{"post":{"tags":["MeetingBots"],"summary":"Remove the bot from its meeting","description":"Public for the same reason as the status read.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Bot asked to leave","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotAcknowledged"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Recall rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meeting-bots/{id}/chat":{"post":{"tags":["MeetingBots"],"summary":"Say a line in the meeting's chat","description":"Public for the same reason as the status read. A bot that has already left its meeting is answered without anything being sent: a caption can outlive the turn it belongs to. A line sent with a `key` is said once however many times that key asks for it within a minute; a repeat that arrives while the first is still on its way is answered 409 and can be asked again.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotChatBody"}}}},"responses":{"200":{"description":"Message sent, or the bot had already left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotAcknowledged"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"This key is still being said; ask again shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Recall rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["MeetingBots"],"summary":"Read what the meeting has typed to the bot","description":"Public for the same reason as the status read.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"example":12,"description":"Only messages numbered above this. Pass back the `next` of the previous read."},"required":false,"description":"Only messages numbered above this. Pass back the `next` of the previous read.","name":"after","in":"query"}],"responses":{"200":{"description":"Messages after the cursor, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotChatResponse"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meeting-bots/{id}/room":{"post":{"tags":["MeetingBots"],"summary":"Record the LiveKit room the bot's call page is in","description":"Public: called by the call page the bot renders, after every connect, with the token it joined with. sable-api writes a one-time challenge onto the participant that token names; the page echoes it to `/room/confirm`, and only then is the room offered to the viewer. The `key` from that page's URL is the access control, so a bot without one, or a wrong key, answers 404.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotRoomBody"}}}},"responses":{"200":{"description":"Room recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotAcknowledged"}}}},"400":{"description":"The room's LiveKit server is not one this deployment serves, or the join token names no room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"LiveKit could not be asked about the room; try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meeting-bots/{id}/room/confirm":{"post":{"tags":["MeetingBots"],"summary":"Prove the reported room by echoing the challenge written onto the call page","description":"Public: called by the call page once the challenge sable-api wrote to its participant attribute arrives. Only then is the reported room offered to the bot's viewer. A stale or wrong challenge is answered 200 and records nothing; a wrong `key` answers 404.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotRoomConfirmBody"}}}},"responses":{"200":{"description":"Confirmation handled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotAcknowledged"}}}},"400":{"description":"The room's LiveKit server is not one this deployment serves","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"LiveKit could not be asked about the room; try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meeting-bots/{id}/viewer-token":{"post":{"tags":["MeetingBots"],"summary":"Join the bot's call room as a hidden, subscribe-only viewer","description":"Public: called by a page the bot renders, with the `key` from its URL. The connection is `null` until the call page has reported its room.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotViewerTokenBody"}}}},"responses":{"200":{"description":"The room to watch, or none yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotViewerTokenResponse"}}}},"400":{"description":"The room's LiveKit server is not one this deployment serves","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meeting-bots/{id}/screen-share":{"post":{"tags":["MeetingBots"],"summary":"Start or stop the bot's screen share","description":"Public: called by the bot's call page, with the `key` from its URL, when the agent's stage starts or stops showing something. The call carries on in the bot's camera either way. Asking for the state already in effect changes nothing; a bot that has left its meeting answers the state it left with. A request that arrives while another is still changing the share is answered 409 and can be asked again.","parameters":[{"schema":{"type":"string","example":"mb_9xMqR2sTuVwXyZaBcDeFg"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotScreenShareBody"}}}},"responses":{"200":{"description":"The screen share state now in effect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingBotScreenShareResponse"}}}},"404":{"description":"Meeting bot not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Another change to the screen share is still on its way; ask again shortly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Recall rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Meeting bots are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/meetings":{"post":{"tags":["Meetings"],"summary":"Host a Zoom or Google Meet meeting on Sable's own account with this agent's bot already in it","description":"The visitor gets a link to join instead of supplying one. `platform` picks Zoom (the default) or Google Meet. Anonymous callers are admitted on the same terms as a bot sent by hand: the agent's config must offer the chosen platform, and the per-agent and per-client budgets apply. Zoom capacity is the host pool — one licensed Zoom user hosts one meeting at a time.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMeetingBody"}}}},"responses":{"201":{"description":"Meeting created and the bot is joining it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingResponse"}}}},"403":{"description":"This agent does not offer calls on this platform, or the caller may not write agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No Zoom host is free right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many meetings requested for this agent or from this client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Zoom or Google Meet rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Sable-hosted meetings are not configured on this deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sable-permission-guards":[{"anyOf":["agents:write"],"ifAuthenticated":true}]}},"/meetings/{id}":{"get":{"tags":["Meetings"],"summary":"Read a hosted meeting and the state of its bot","description":"Public: the unguessable id is the access control, as it is for the bot's own status.","parameters":[{"schema":{"type":"string","example":"mtg_7bKpQ4rStUvWxYzAbCdEf"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The meeting and its bot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingStatusResponse"}}}},"404":{"description":"Meeting not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Sable-hosted meetings are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}