# Models

## The AccessReviewResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AccessReviewResponse":{"properties":{"generated_at":{"type":"string","title":"Generated At"},"workspace_id":{"type":"string","title":"Workspace Id"},"credentials":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Credentials"},"total_credentials":{"type":"integer","title":"Total Credentials"},"jwt_credentials_note":{"type":"string","title":"Jwt Credentials Note"}},"type":"object","required":["generated_at","workspace_id","credentials","total_credentials","jwt_credentials_note"],"title":"AccessReviewResponse"}}}}
```

## The AccessTokenRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AccessTokenRequest":{"properties":{"call_sid":{"type":"string","maxLength":64,"minLength":1,"title":"Call Sid"}},"type":"object","required":["call_sid"],"title":"AccessTokenRequest","description":"Request to generate a Twilio AccessToken for browser-based audio."}}}}
```

## The AccessTokenResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AccessTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"identity":{"type":"string","title":"Identity"},"conference_sid":{"type":"string","title":"Conference Sid"},"connect_params":{"additionalProperties":{"type":"string"},"type":"object","title":"Connect Params","default":{}}},"type":"object","required":["token","identity","conference_sid"],"title":"AccessTokenResponse"}}}}
```

## The Action object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."}}}}
```

## The ActionState object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."}}}}
```

## The ActiveEscalationItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ActiveEscalationItem":{"properties":{"call_entity_id":{"type":"string","format":"uuid","title":"Call Entity Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"escalation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Id"},"status":{"type":"string","title":"Status"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"trigger_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Source"},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"regulatory_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulatory Basis"},"immediate":{"type":"boolean","title":"Immediate"},"risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Score"},"requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested At"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"wait_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wait Seconds"},"operator_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Entity Id"},"caller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"}},"type":"object","required":["call_entity_id","call_sid","escalation_id","status","trigger","trigger_source","concept","operator_type","regulatory_basis","immediate","risk_score","requested_at","connected_at","wait_seconds","operator_entity_id","caller_id","direction","phone_number","started_at"],"title":"ActiveEscalationItem","description":"A call with an active escalation, enriched from projected state."}}}}
```

## The ActiveSession object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ActiveSession":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"service_id":{"type":"string","title":"Service Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"caller_id":{"type":"string","title":"Caller Id"},"direction":{"type":"string","title":"Direction"},"duration_seconds":{"type":"number","title":"Duration Seconds"},"current_state":{"type":"string","title":"Current State","default":""},"scenario":{"type":"string","title":"Scenario","default":""}},"type":"object","required":["call_sid","service_id","workspace_id","caller_id","direction","duration_seconds"],"title":"ActiveSession"}}}}
```

## The AgentAnalyticsEntry object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AgentAnalyticsEntry":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"total_calls":{"type":"integer","title":"Total Calls"},"completed_calls":{"type":"integer","title":"Completed Calls"},"avg_duration_seconds":{"type":"number","title":"Avg Duration Seconds"},"completion_rate":{"type":"number","title":"Completion Rate"}},"type":"object","required":["agent_id","agent_name","total_calls","completed_calls","avg_duration_seconds","completion_rate"],"title":"AgentAnalyticsEntry"}}}}
```

## The AgentAnalyticsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AgentAnalyticsResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentAnalyticsEntry"},"type":"array","title":"Agents"},"period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},"type":"object","required":["agents"],"title":"AgentAnalyticsResponse"},"AgentAnalyticsEntry":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"total_calls":{"type":"integer","title":"Total Calls"},"completed_calls":{"type":"integer","title":"Completed Calls"},"avg_duration_seconds":{"type":"number","title":"Avg Duration Seconds"},"completion_rate":{"type":"number","title":"Completion Rate"}},"type":"object","required":["agent_id","agent_name","total_calls","completed_calls","avg_duration_seconds","completion_rate"],"title":"AgentAnalyticsEntry"}}}}
```

## The AgentConfigPayload object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AgentConfigPayload":{"properties":{"model":{"type":"string","title":"Model","default":"gemini-2.5-flash"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"timeout_s":{"type":"number","title":"Timeout S","default":3},"action_space":{"items":{"type":"string"},"type":"array","title":"Action Space"}},"type":"object","title":"AgentConfigPayload"}}}}
```

## The AgentResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","created_at","updated_at"],"title":"AgentResponse"}}}}
```

## The AgentVersion object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AgentVersion":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"version":{"type":"integer","title":"Version"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"initials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initials"},"identity":{"$ref":"#/components/schemas/Identity"},"background":{"type":"string","title":"Background"},"behaviors":{"items":{"type":"string"},"type":"array","title":"Behaviors"},"communication_patterns":{"items":{"type":"string"},"type":"array","title":"Communication Patterns"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/VoiceConfig"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","agent_id","version","identity","background","behaviors","communication_patterns"],"title":"AgentVersion","description":"A version of an Agent document."},"Identity":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"default_spoken_language":{"type":"string","title":"Default Spoken Language"},"relationship_to_developer":{"$ref":"#/components/schemas/RelationshipToDeveloper"}},"type":"object","required":["name","role","developed_by","default_spoken_language","relationship_to_developer"],"title":"Identity"},"RelationshipToDeveloper":{"properties":{"ownership":{"type":"string","title":"Ownership"},"type":{"type":"string","title":"Type"},"conversation_visibility":{"type":"string","title":"Conversation Visibility"},"thought_visibility":{"type":"string","title":"Thought Visibility"}},"type":"object","required":["ownership","type","conversation_visibility","thought_visibility"],"title":"RelationshipToDeveloper"},"VoiceConfig":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"stability":{"type":"number","title":"Stability","default":0},"similarity_boost":{"type":"number","title":"Similarity Boost","default":0},"style":{"type":"number","title":"Style","default":0}},"type":"object","required":["voice_id"],"title":"VoiceConfig"}}}}
```

## The AgentVersionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AgentVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"agent_id":{"type":"string","title":"Agent Id"},"version":{"type":"integer","title":"Version"},"name":{"type":"string","title":"Name"},"initials":{"type":"string","title":"Initials"},"identity":{"$ref":"#/components/schemas/Identity"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/VoiceConfig"},{"type":"null"}]},"background":{"type":"string","title":"Background"},"behaviors":{"items":{"type":"string"},"type":"array","title":"Behaviors"},"communication_patterns":{"items":{"type":"string"},"type":"array","title":"Communication Patterns"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","agent_id","version","name","initials","identity","voice_config","background","behaviors","communication_patterns","created_at","updated_at"],"title":"AgentVersionResponse"},"Identity":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"default_spoken_language":{"type":"string","title":"Default Spoken Language"},"relationship_to_developer":{"$ref":"#/components/schemas/RelationshipToDeveloper"}},"type":"object","required":["name","role","developed_by","default_spoken_language","relationship_to_developer"],"title":"Identity"},"RelationshipToDeveloper":{"properties":{"ownership":{"type":"string","title":"Ownership"},"type":{"type":"string","title":"Type"},"conversation_visibility":{"type":"string","title":"Conversation Visibility"},"thought_visibility":{"type":"string","title":"Thought Visibility"}},"type":"object","required":["ownership","type","conversation_visibility","thought_visibility"],"title":"RelationshipToDeveloper"},"VoiceConfig":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"stability":{"type":"number","title":"Stability","default":0},"similarity_boost":{"type":"number","title":"Similarity Boost","default":0},"style":{"type":"number","title":"Style","default":0}},"type":"object","required":["voice_id"],"title":"VoiceConfig"}}}}
```

## The AnnotationState object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."}}}}
```

## The ApiKeyResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"created_by_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Entity Id"},"created_by_credential_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Credential Id"},"key_id":{"type":"string","title":"Key Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","created_by_entity_id","created_by_credential_id","key_id","name","role","permissions","expires_at","last_used_at","created_at","updated_at"],"title":"ApiKeyResponse"}}}}
```

## The ApplyTemplateRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ApplyTemplateRequest":{"properties":{"override_existing":{"type":"boolean","title":"Override Existing","default":false}},"type":"object","title":"ApplyTemplateRequest"}}}}
```

## The ApplyTemplateResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ApplyTemplateResponse":{"properties":{"created_concepts":{"items":{"type":"string"},"type":"array","title":"Created Concepts"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"}},"type":"object","required":["created_concepts","skipped"],"title":"ApplyTemplateResponse"}}}}
```

## The ApproveICD10Request object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ApproveICD10Request":{"properties":{"code":{"type":"string","maxLength":16,"title":"Code"}},"type":"object","required":["code"],"title":"ApproveICD10Request"}}}}
```

## The ApproveRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ApproveRequest":{"properties":{"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ApproveRequest","description":"Approve events — promotes confidence to 0.95."}}}}
```

## The ArchiveResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ArchiveResponse":{"properties":{"surface_id":{"type":"string","title":"Surface Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["surface_id","status"],"title":"ArchiveResponse"}}}}
```

## The ArchiveWorkspaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ArchiveWorkspaceRequest":{"properties":{"slug":{"$ref":"#/components/schemas/SlugString"}},"type":"object","required":["slug"],"title":"ArchiveWorkspaceRequest"},"SlugString":{"type":"string","maxLength":63,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$"}}}}
```

## The AttachWorkspaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AttachWorkspaceRequest":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"environment":{"type":"string","enum":["production","staging","development"],"title":"Environment","default":"production"},"billable":{"type":"boolean","title":"Billable","default":true}},"type":"object","required":["workspace_id"],"title":"AttachWorkspaceRequest"}}}}
```

## The AuditEventsListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuditEventsListResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/src__routes__audit__AuditEventResponse"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["events","total","limit","offset","has_more"],"title":"AuditEventsListResponse"},"src__routes__audit__AuditEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"timestamp":{"type":"string","title":"Timestamp"},"service":{"type":"string","title":"Service"},"actor_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Entity Id"},"actor_credential_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Credential Id"},"action":{"type":"string","title":"Action"},"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"resource_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Name"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"phi_accessed":{"type":"boolean","title":"Phi Accessed","default":false}},"type":"object","required":["id","workspace_id","timestamp","service","action","resource_type"],"title":"AuditEventResponse"}}}}
```

## The AuditExportListItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuditExportListItem":{"properties":{"key":{"type":"string","title":"Key"},"size":{"type":"integer","title":"Size"},"last_modified":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Modified"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["key","size"],"title":"AuditExportListItem"}}}}
```

## The AuditExportListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuditExportListResponse":{"properties":{"exports":{"items":{"$ref":"#/components/schemas/AuditExportListItem"},"type":"array","title":"Exports"}},"type":"object","required":["exports"],"title":"AuditExportListResponse"},"AuditExportListItem":{"properties":{"key":{"type":"string","title":"Key"},"size":{"type":"integer","title":"Size"},"last_modified":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Modified"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["key","size"],"title":"AuditExportListItem"}}}}
```

## The AuditExportRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuditExportRequest":{"properties":{"date_from":{"type":"string","format":"date-time","title":"Date From"},"date_to":{"type":"string","format":"date-time","title":"Date To"},"service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"phi_only":{"type":"boolean","title":"Phi Only","default":false}},"type":"object","required":["date_from","date_to"],"title":"AuditExportRequest"}}}}
```

## The AuditExportResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuditExportResponse":{"properties":{"export_id":{"type":"string","title":"Export Id"},"s3_key":{"type":"string","title":"S3 Key"},"row_count":{"type":"integer","title":"Row Count"},"download_url":{"type":"string","title":"Download Url"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["export_id","s3_key","row_count","download_url","created_at"],"title":"AuditExportResponse"}}}}
```

## The AuditSummaryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuditSummaryResponse":{"properties":{"total_events":{"type":"integer","title":"Total Events"},"phi_access_events":{"type":"integer","title":"Phi Access Events"},"unique_actors":{"type":"integer","title":"Unique Actors"},"services_with_events":{"type":"integer","title":"Services With Events"}},"type":"object","required":["total_events","phi_access_events","unique_actors","services_with_events"],"title":"AuditSummaryResponse"}}}}
```

## The AuthConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."}}}}
```

## The AuthConfigWithSecrets object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuthConfigWithSecrets":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"},"api_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"bearer_token_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"client_secret_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"private_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]}},"type":"object","required":["type"],"title":"AuthConfigWithSecrets","description":"AuthConfig that accepts inline secret values for auto-provisioning.\n\nIf provided, platform-api writes the value to SSM and replaces\nthe field with the generated ssm_param_path."},"SecretInput":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"SecretInput","description":"Inline secret value — auto-provisioned to SSM on create/update."}}}}
```

## The AuthInfoResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AuthInfoResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"key_id":{"type":"string","title":"Key Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["workspace_id","key_id","name","expires_at","expires_in_seconds"],"title":"AuthInfoResponse"}}}}
```

## The AvailableNumber object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"AvailableNumber":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"friendly_name":{"type":"string","title":"Friendly Name"},"locality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locality"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"capabilities":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Capabilities","default":{}}},"type":"object","required":["phone_number","friendly_name"],"title":"AvailableNumber"}}}}
```

## The BackgroundString object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BackgroundString":{"type":"string","maxLength":10000}}}}
```

## The BatchActionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BatchActionResponse":{"properties":{"succeeded":{"items":{"type":"string"},"type":"array","title":"Succeeded"},"failed":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Failed"}},"type":"object","required":["succeeded","failed"],"title":"BatchActionResponse","description":"Result of a batch operation."}}}}
```

## The BatchApproveRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BatchApproveRequest":{"properties":{"item_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Item Ids"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["item_ids"],"title":"BatchApproveRequest","description":"Batch approve multiple review items."}}}}
```

## The BatchRejectRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BatchRejectRequest":{"properties":{"item_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Item Ids"},"reason":{"type":"string","maxLength":2000,"minLength":1,"title":"Reason"}},"type":"object","required":["item_ids","reason"],"title":"BatchRejectRequest","description":"Batch reject multiple review items."}}}}
```

## The BehaviorAction object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BehaviorAction":{"properties":{"turn_policy_overrides":{"additionalProperties":true,"type":"object","title":"Turn Policy Overrides"},"instruction":{"type":"string","maxLength":2000,"title":"Instruction","description":"Instruction injected into the engage prompt when active","default":""},"add_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Add Tools","description":"Tool names to make available when active"},"remove_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Remove Tools","description":"Tool names to hide when active"},"filler_override":{"anyOf":[{"type":"string","enum":["empathy","receipt","working","silent"]},{"type":"null"}],"title":"Filler Override","description":"Override filler type when active"}},"type":"object","title":"BehaviorAction","description":"What happens when the behavior activates."}}}}
```

## The BehaviorDef object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BehaviorDef":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"trigger":{"$ref":"#/components/schemas/BehaviorTrigger"},"action":{"$ref":"#/components/schemas/BehaviorAction"},"cooldown_turns":{"type":"integer","maximum":100,"minimum":0,"title":"Cooldown Turns","default":3},"priority":{"type":"integer","maximum":10,"minimum":-10,"title":"Priority","default":0},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name"],"title":"BehaviorDef","description":"A named dynamic behavior definition."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"BehaviorTrigger":{"properties":{"keywords":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Keywords"},"intent_categories":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Intent Categories"},"emotion_tiers":{"items":{"type":"integer"},"type":"array","maxItems":4,"title":"Emotion Tiers","description":"Empathy tiers (0-3) that activate this behavior"},"states":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"States","description":"Context graph state names that activate this behavior"}},"type":"object","title":"BehaviorTrigger","description":"Conditions that activate this behavior."},"BehaviorAction":{"properties":{"turn_policy_overrides":{"additionalProperties":true,"type":"object","title":"Turn Policy Overrides"},"instruction":{"type":"string","maxLength":2000,"title":"Instruction","description":"Instruction injected into the engage prompt when active","default":""},"add_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Add Tools","description":"Tool names to make available when active"},"remove_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Remove Tools","description":"Tool names to hide when active"},"filler_override":{"anyOf":[{"type":"string","enum":["empathy","receipt","working","silent"]},{"type":"null"}],"title":"Filler Override","description":"Override filler type when active"}},"type":"object","title":"BehaviorAction","description":"What happens when the behavior activates."}}}}
```

## The BehaviorSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BehaviorSettingsRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"behaviors":{"anyOf":[{"items":{"$ref":"#/components/schemas/BehaviorDef"},"type":"array","maxItems":100},{"type":"null"}],"title":"Behaviors"}},"type":"object","title":"BehaviorSettingsRequest","description":"Partial update — only provided fields are changed."},"BehaviorDef":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"trigger":{"$ref":"#/components/schemas/BehaviorTrigger"},"action":{"$ref":"#/components/schemas/BehaviorAction"},"cooldown_turns":{"type":"integer","maximum":100,"minimum":0,"title":"Cooldown Turns","default":3},"priority":{"type":"integer","maximum":10,"minimum":-10,"title":"Priority","default":0},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name"],"title":"BehaviorDef","description":"A named dynamic behavior definition."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"BehaviorTrigger":{"properties":{"keywords":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Keywords"},"intent_categories":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Intent Categories"},"emotion_tiers":{"items":{"type":"integer"},"type":"array","maxItems":4,"title":"Emotion Tiers","description":"Empathy tiers (0-3) that activate this behavior"},"states":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"States","description":"Context graph state names that activate this behavior"}},"type":"object","title":"BehaviorTrigger","description":"Conditions that activate this behavior."},"BehaviorAction":{"properties":{"turn_policy_overrides":{"additionalProperties":true,"type":"object","title":"Turn Policy Overrides"},"instruction":{"type":"string","maxLength":2000,"title":"Instruction","description":"Instruction injected into the engage prompt when active","default":""},"add_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Add Tools","description":"Tool names to make available when active"},"remove_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Remove Tools","description":"Tool names to hide when active"},"filler_override":{"anyOf":[{"type":"string","enum":["empathy","receipt","working","silent"]},{"type":"null"}],"title":"Filler Override","description":"Override filler type when active"}},"type":"object","title":"BehaviorAction","description":"What happens when the behavior activates."}}}}
```

## The BehaviorSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BehaviorSettingsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"behaviors":{"items":{"$ref":"#/components/schemas/BehaviorDef"},"type":"array","title":"Behaviors"}},"type":"object","required":["enabled","behaviors"],"title":"BehaviorSettingsResponse"},"BehaviorDef":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"trigger":{"$ref":"#/components/schemas/BehaviorTrigger"},"action":{"$ref":"#/components/schemas/BehaviorAction"},"cooldown_turns":{"type":"integer","maximum":100,"minimum":0,"title":"Cooldown Turns","default":3},"priority":{"type":"integer","maximum":10,"minimum":-10,"title":"Priority","default":0},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name"],"title":"BehaviorDef","description":"A named dynamic behavior definition."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"BehaviorTrigger":{"properties":{"keywords":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Keywords"},"intent_categories":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Intent Categories"},"emotion_tiers":{"items":{"type":"integer"},"type":"array","maxItems":4,"title":"Emotion Tiers","description":"Empathy tiers (0-3) that activate this behavior"},"states":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"States","description":"Context graph state names that activate this behavior"}},"type":"object","title":"BehaviorTrigger","description":"Conditions that activate this behavior."},"BehaviorAction":{"properties":{"turn_policy_overrides":{"additionalProperties":true,"type":"object","title":"Turn Policy Overrides"},"instruction":{"type":"string","maxLength":2000,"title":"Instruction","description":"Instruction injected into the engage prompt when active","default":""},"add_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Add Tools","description":"Tool names to make available when active"},"remove_tools":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Remove Tools","description":"Tool names to hide when active"},"filler_override":{"anyOf":[{"type":"string","enum":["empathy","receipt","working","silent"]},{"type":"null"}],"title":"Filler Override","description":"Override filler type when active"}},"type":"object","title":"BehaviorAction","description":"What happens when the behavior activates."}}}}
```

## The BehaviorTrigger object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BehaviorTrigger":{"properties":{"keywords":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Keywords"},"intent_categories":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Intent Categories"},"emotion_tiers":{"items":{"type":"integer"},"type":"array","maxItems":4,"title":"Emotion Tiers","description":"Empathy tiers (0-3) that activate this behavior"},"states":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"States","description":"Context graph state names that activate this behavior"}},"type":"object","title":"BehaviorTrigger","description":"Conditions that activate this behavior."}}}}
```

## The BillingDashboardResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BillingDashboardResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"current_period_total":{"type":"number","title":"Current Period Total"},"previous_period_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Period Total"},"delta_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Delta Pct"},"top_meters":{"items":{"$ref":"#/components/schemas/MeterSummary"},"type":"array","title":"Top Meters"},"invoice_status_summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Invoice Status Summary"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"}},"type":"object","required":["workspace_id","current_period_total","previous_period_total","delta_pct","top_meters","invoice_status_summary","period_start","period_end"],"title":"BillingDashboardResponse"},"MeterSummary":{"properties":{"meter_key":{"type":"string","title":"Meter Key"},"display_name":{"type":"string","title":"Display Name"},"value":{"type":"number","title":"Value"},"unit":{"type":"string","title":"Unit"}},"type":"object","required":["meter_key","display_name","value","unit"],"title":"MeterSummary"}}}}
```

## The Body\_enroll-voiceprint object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"Body_enroll-voiceprint":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_enroll-voiceprint"}}}}
```

## The Body\_verify-voiceprint object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"Body_verify-voiceprint":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_verify-voiceprint"}}}}
```

## The BookingRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BookingRequest":{"properties":{"slot_id":{"type":"string","maxLength":256,"minLength":1,"title":"Slot Id","description":"The FHIR Slot ID to book"}},"type":"object","required":["slot_id"],"title":"BookingRequest"}}}}
```

## The BrandingConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."}}}}
```

## The BrandingSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BrandingSettingsRequest":{"properties":{"branding":{"$ref":"#/components/schemas/BrandingConfig"}},"type":"object","required":["branding"],"title":"BrandingSettingsRequest","description":"Update workspace branding. All fields are optional — only provided\nfields are changed."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."}}}}
```

## The BrandingSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BrandingSettingsResponse":{"properties":{"branding":{"$ref":"#/components/schemas/BrandingConfig"}},"type":"object","required":["branding"],"title":"BrandingSettingsResponse"},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."}}}}
```

## The BriefingRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BriefingRequest":{"properties":{"call_sid":{"type":"string","maxLength":64,"minLength":1,"title":"Call Sid"}},"type":"object","required":["call_sid"],"title":"BriefingRequest","description":"Request for operator briefing on a specific call."}}}}
```

## The BriefingResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BriefingResponse":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"sections":{"items":{"$ref":"#/components/schemas/BriefingSection"},"type":"array","title":"Sections"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["call_sid","operator_id","sections","generated_at"],"title":"BriefingResponse","description":"Structured operator briefing for a call."},"BriefingSection":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"}},"type":"object","required":["title","content"],"title":"BriefingSection","description":"A named section of the operator briefing."}}}}
```

## The BriefingSection object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"BriefingSection":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"}},"type":"object","required":["title","content"],"title":"BriefingSection","description":"A named section of the operator briefing."}}}}
```

## The CallIntelligenceDetail object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CallIntelligenceDetail":{"properties":{"call_id":{"type":"string","title":"Call Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"direction":{"type":"string","title":"Direction","default":"inbound"},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"},"quality_breakdown":{"anyOf":[{"$ref":"#/components/schemas/QualityBreakdown"},{"type":"null"}]},"key_moments":{"items":{"$ref":"#/components/schemas/KeyMoment"},"type":"array","title":"Key Moments","default":[]},"emotion_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Emotion Summary"},"risk_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Risk Summary"},"latency_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latency Summary"},"conversation_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Conversation Summary"},"tool_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Summary"},"safety_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Safety Summary"},"operator_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Operator Summary"},"completion_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Reason"},"final_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final State"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["call_id"],"title":"CallIntelligenceDetail","description":"Layer 4 (Narrative) intelligence for a completed call.\n\nAggregated summaries, quality breakdown, and key moments — the\ninterpretive layer. Per-turn visualization data lives on the unified\ntimeline (call detail → PlaybackTimeline.segments), not here."},"QualityBreakdown":{"properties":{"score":{"type":"number","title":"Score"},"components":{"items":{"$ref":"#/components/schemas/QualityComponent"},"type":"array","title":"Components"},"workspace_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Workspace Avg"},"workspace_percentile":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Workspace Percentile"}},"type":"object","required":["score","components"],"title":"QualityBreakdown","description":"Structured breakdown of how quality score was computed."},"QualityComponent":{"properties":{"name":{"type":"string","title":"Name"},"penalty":{"type":"number","title":"Penalty"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"threshold":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Threshold"},"severity":{"type":"string","title":"Severity","default":"none"}},"type":"object","required":["name","penalty"],"title":"QualityComponent","description":"Single quality score component with penalty and context."},"KeyMoment":{"properties":{"turn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn"},"type":{"type":"string","title":"Type"},"severity":{"type":"string","title":"Severity","default":"warning"},"description":{"type":"string","title":"Description"}},"type":"object","required":["type","description"],"title":"KeyMoment","description":"Notable event during the call worth highlighting."}}}}
```

## The CallListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CallListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"}},"type":"object","required":["items","total","has_more"],"title":"CallListResponse"},"CallSummary":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"caller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"escalation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Status"},"turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turns"},"has_recording":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Recording"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"},"final_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final State"},"completion_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Reason"},"service_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Session Id"},"fork_turn_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fork Turn Index"}},"type":"object","required":["entity_id"],"title":"CallSummary"}}}}
```

## The CallStatsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CallStatsResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"total_calls":{"type":"integer","title":"Total Calls"},"total_duration_seconds":{"type":"number","title":"Total Duration Seconds"},"avg_duration_seconds":{"type":"number","title":"Avg Duration Seconds"},"calls_by_date":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Calls By Date"}},"type":"object","required":["workspace_id","period_start","period_end","total_calls","total_duration_seconds","avg_duration_seconds","calls_by_date"],"title":"CallStatsResponse"}}}}
```

## The CallSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CallSummary":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"caller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"escalation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Status"},"turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turns"},"has_recording":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Recording"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"},"final_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final State"},"completion_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Reason"},"service_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Id"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Session Id"},"fork_turn_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fork Turn Index"}},"type":"object","required":["entity_id"],"title":"CallSummary"}}}}
```

## The CallTranscriptResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CallTranscriptResponse":{"properties":{"call_entity_id":{"type":"string","format":"uuid","title":"Call Entity Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"total_segments":{"type":"integer","title":"Total Segments"},"segments":{"items":{"$ref":"#/components/schemas/TranscriptSegment"},"type":"array","title":"Segments"}},"type":"object","required":["call_entity_id","call_sid","total_segments","segments"],"title":"CallTranscriptResponse"},"TranscriptSegment":{"properties":{"speaker_role":{"type":"string","title":"Speaker Role"},"transcript":{"type":"string","title":"Transcript"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"escalation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Id"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["speaker_role","transcript","timestamp","escalation_id","confidence"],"title":"TranscriptSegment"}}}}
```

## The CatalogFunctionDef object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CatalogFunctionDef":{"properties":{"name":{"type":"string","title":"Name"},"data_type":{"type":"string","title":"Data Type","default":""},"comment":{"type":"string","title":"Comment","default":""},"registered":{"type":"boolean","title":"Registered","default":false}},"type":"object","required":["name"],"title":"CatalogFunctionDef","description":"A function discovered from the Databricks UC catalog."}}}}
```

## The CatalogResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CatalogResponse":{"properties":{"functions":{"items":{"$ref":"#/components/schemas/CatalogFunctionDef"},"type":"array","title":"Functions"},"count":{"type":"integer","title":"Count","default":0},"catalog":{"type":"string","title":"Catalog","default":"world"},"schema":{"type":"string","title":"Schema","default":"functions"}},"type":"object","required":["functions"],"title":"CatalogResponse","description":"Response from catalog discovery."},"CatalogFunctionDef":{"properties":{"name":{"type":"string","title":"Name"},"data_type":{"type":"string","title":"Data Type","default":""},"comment":{"type":"string","title":"Comment","default":""},"registered":{"type":"boolean","title":"Registered","default":false}},"type":"object","required":["name"],"title":"CatalogFunctionDef","description":"A function discovered from the Databricks UC catalog."}}}}
```

## The ChannelOverride object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."}}}}
```

## The ChannelType object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."}}}}
```

## The ChatRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ChatRequest":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"ChatRequest"}}}}
```

## The ClaimResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ClaimResponse":{"properties":{"id":{"type":"string","title":"Id"},"assigned_to":{"type":"string","title":"Assigned To"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","assigned_to","status"],"title":"ClaimResponse"}}}}
```

## The CollectionField object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The CommandCenterAlert object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CommandCenterAlert":{"properties":{"level":{"type":"string","title":"Level"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"section":{"type":"string","title":"Section"}},"type":"object","required":["level","code","message","section"],"title":"CommandCenterAlert"}}}}
```

## The CommandCenterResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CommandCenterResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"voice":{"$ref":"#/components/schemas/VoiceMetrics","default":{"active_calls":0,"active_escalated":0,"calls_today":0,"escalation_rate_today":0}},"pipeline":{"$ref":"#/components/schemas/PipelineMetrics","default":{"sources_total":0,"sources_healthy":0,"sources_degraded":0,"sources_failing":0,"events_last_hour":0,"outbound_pending":0,"outbound_failed":0,"connector_status":"unavailable"}},"data_quality":{"$ref":"#/components/schemas/DataQualityMetrics","default":{"pending_reviews":0,"entities_total":0,"entities_merged_7d":0}},"identity":{"$ref":"#/components/schemas/IdentityMetrics","default":{"active_api_keys":0}},"alerts":{"items":{"$ref":"#/components/schemas/CommandCenterAlert"},"type":"array","title":"Alerts","default":[]},"degraded_sections":{"items":{"type":"string"},"type":"array","title":"Degraded Sections","default":[]},"generated_at":{"type":"string","title":"Generated At"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["workspace_id","generated_at"],"title":"CommandCenterResponse"},"VoiceMetrics":{"properties":{"active_calls":{"type":"integer","title":"Active Calls","default":0},"active_escalated":{"type":"integer","title":"Active Escalated","default":0},"calls_today":{"type":"integer","title":"Calls Today","default":0},"avg_quality_score_today":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Quality Score Today"},"escalation_rate_today":{"type":"number","title":"Escalation Rate Today","default":0}},"type":"object","title":"VoiceMetrics"},"PipelineMetrics":{"properties":{"sources_total":{"type":"integer","title":"Sources Total","default":0},"sources_healthy":{"type":"integer","title":"Sources Healthy","default":0},"sources_degraded":{"type":"integer","title":"Sources Degraded","default":0},"sources_failing":{"type":"integer","title":"Sources Failing","default":0},"events_last_hour":{"type":"integer","title":"Events Last Hour","default":0},"outbound_pending":{"type":"integer","title":"Outbound Pending","default":0},"outbound_failed":{"type":"integer","title":"Outbound Failed","default":0},"connector_status":{"type":"string","title":"Connector Status","default":"unavailable"}},"type":"object","title":"PipelineMetrics"},"DataQualityMetrics":{"properties":{"pending_reviews":{"type":"integer","title":"Pending Reviews","default":0},"approval_rate_7d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate 7D"},"avg_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Confidence"},"entities_total":{"type":"integer","title":"Entities Total","default":0},"entities_merged_7d":{"type":"integer","title":"Entities Merged 7D","default":0}},"type":"object","title":"DataQualityMetrics"},"IdentityMetrics":{"properties":{"active_api_keys":{"type":"integer","title":"Active Api Keys","default":0},"active_sessions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Sessions"},"failed_auths_1h":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Failed Auths 1H"},"locked_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locked Accounts"},"mfa_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mfa Coverage Pct"}},"type":"object","title":"IdentityMetrics"},"CommandCenterAlert":{"properties":{"level":{"type":"string","title":"Level"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"section":{"type":"string","title":"Section"}},"type":"object","required":["level","code","message","section"],"title":"CommandCenterAlert"}}}}
```

## The ComplianceDashboardResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ComplianceDashboardResponse":{"properties":{"hipaa_status":{"type":"string","title":"Hipaa Status"},"retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retention Days"},"legal_hold":{"type":"boolean","title":"Legal Hold"},"total_credentials":{"type":"integer","title":"Total Credentials"},"active_credentials":{"type":"integer","title":"Active Credentials"},"last_audit_export":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Audit Export"},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["hipaa_status","retention_days","legal_hold","total_credentials","active_credentials","last_audit_export","generated_at"],"title":"ComplianceDashboardResponse","description":"Composite compliance health overview."}}}}
```

## The ConfidenceBucket object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ConfidenceBucket":{"properties":{"confidence_range":{"type":"string","title":"Confidence Range"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["confidence_range","count"],"title":"ConfidenceBucket"}}}}
```

## The ConfigToPolicyRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ConfigToPolicyRequest":{"properties":{"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["config"],"title":"ConfigToPolicyRequest"}}}}
```

## The ConnectorHeartbeat object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ConnectorHeartbeat":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"alive":{"type":"boolean","title":"Alive"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"}},"type":"object","required":["data_source_id","name","alive"],"title":"ConnectorHeartbeat"}}}}
```

## The ConnectorOverviewItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ConnectorOverviewItem":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"source_type":{"type":"string","title":"Source Type"},"connector_type":{"type":"string","title":"Connector Type"},"entity_count":{"type":"integer","title":"Entity Count"},"entities_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Entities By Type"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_event_count":{"type":"integer","title":"Last Sync Event Count","default":0},"health_status":{"type":"string","title":"Health Status","default":"unknown"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["data_source_id","name","source_type","connector_type","entity_count"],"title":"ConnectorOverviewItem"}}}}
```

## The ConnectorOverviewResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ConnectorOverviewResponse":{"properties":{"connectors":{"items":{"$ref":"#/components/schemas/ConnectorOverviewItem"},"type":"array","title":"Connectors"},"total_entities":{"type":"integer","title":"Total Entities"}},"type":"object","required":["connectors","total_entities"],"title":"ConnectorOverviewResponse"},"ConnectorOverviewItem":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"source_type":{"type":"string","title":"Source Type"},"connector_type":{"type":"string","title":"Connector Type"},"entity_count":{"type":"integer","title":"Entity Count"},"entities_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Entities By Type"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_event_count":{"type":"integer","title":"Last Sync Event Count","default":0},"health_status":{"type":"string","title":"Health Status","default":"unknown"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["data_source_id","name","source_type","connector_type","entity_count"],"title":"ConnectorOverviewItem"}}}}
```

## The ContextGraphResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ContextGraphResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"},"state_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"State Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","created_at","updated_at"],"title":"ContextGraphResponse"}}}}
```

## The ContextGraphState-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ContextGraphState-Input":{"oneOf":[{"$ref":"#/components/schemas/ActionState"},{"$ref":"#/components/schemas/DecisionState"},{"$ref":"#/components/schemas/AnnotationState"},{"$ref":"#/components/schemas/DataCollectionState"}],"discriminator":{"propertyName":"type","mapping":{"action":"#/components/schemas/ActionState","annotation":"#/components/schemas/AnnotationState","data_collection":"#/components/schemas/DataCollectionState","decision":"#/components/schemas/DecisionState"}}},"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."},"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The ContextGraphState-Output object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ContextGraphState-Output":{"oneOf":[{"$ref":"#/components/schemas/ActionState"},{"$ref":"#/components/schemas/DecisionState"},{"$ref":"#/components/schemas/AnnotationState"},{"$ref":"#/components/schemas/DataCollectionState"}],"discriminator":{"propertyName":"type","mapping":{"action":"#/components/schemas/ActionState","annotation":"#/components/schemas/AnnotationState","data_collection":"#/components/schemas/DataCollectionState","decision":"#/components/schemas/DecisionState"}}},"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."},"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The ContextGraphVersion object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ContextGraphVersion":{"properties":{"id":{"type":"string","title":"Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"states":{"items":{"$ref":"#/components/schemas/ContextGraphState-Output"},"type":"array","title":"States"},"new_user_initial_state":{"type":"string","title":"New User Initial State"},"returning_user_initial_state":{"type":"string","title":"Returning User Initial State"},"terminal_state":{"type":"string","title":"Terminal State"},"global_intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Intra State Navigation Guidelines","default":[]},"global_action_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Action Guidelines","default":[]},"global_boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Global Boundary Constraints","default":[]},"topology_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topology Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","context_graph_id","version","description","states","new_user_initial_state","returning_user_initial_state","terminal_state"],"title":"ContextGraphVersion","description":"A version of a hierarchical state machine (context graph)."},"ContextGraphState-Output":{"oneOf":[{"$ref":"#/components/schemas/ActionState"},{"$ref":"#/components/schemas/DecisionState"},{"$ref":"#/components/schemas/AnnotationState"},{"$ref":"#/components/schemas/DataCollectionState"}],"discriminator":{"propertyName":"type","mapping":{"action":"#/components/schemas/ActionState","annotation":"#/components/schemas/AnnotationState","data_collection":"#/components/schemas/DataCollectionState","decision":"#/components/schemas/DecisionState"}}},"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."},"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The ContextGraphVersionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ContextGraphVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"states":{"items":{"$ref":"#/components/schemas/ContextGraphState-Output"},"type":"array","title":"States"},"new_user_initial_state":{"type":"string","title":"New User Initial State"},"returning_user_initial_state":{"type":"string","title":"Returning User Initial State"},"terminal_state":{"type":"string","title":"Terminal State"},"global_intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Intra State Navigation Guidelines"},"global_action_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Action Guidelines"},"global_boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Global Boundary Constraints"},"topology_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topology Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","context_graph_id","version","description","states","new_user_initial_state","returning_user_initial_state","terminal_state","global_intra_state_navigation_guidelines","global_action_guidelines","global_boundary_constraints","topology_description","created_at","updated_at"],"title":"ContextGraphVersionResponse"},"ContextGraphState-Output":{"oneOf":[{"$ref":"#/components/schemas/ActionState"},{"$ref":"#/components/schemas/DecisionState"},{"$ref":"#/components/schemas/AnnotationState"},{"$ref":"#/components/schemas/DataCollectionState"}],"discriminator":{"propertyName":"type","mapping":{"action":"#/components/schemas/ActionState","annotation":"#/components/schemas/AnnotationState","data_collection":"#/components/schemas/DataCollectionState","decision":"#/components/schemas/DecisionState"}}},"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."},"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The CorrectRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CorrectRequest":{"properties":{"corrected_data":{"additionalProperties":true,"type":"object","title":"Corrected Data"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["corrected_data"],"title":"CorrectRequest","description":"Submit corrected data — creates new event at confidence 1.0."}}}}
```

## The CorrectionSchemaResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CorrectionSchemaResponse":{"properties":{"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fields":{"additionalProperties":true,"type":"object","title":"Fields"},"current_values":{"additionalProperties":true,"type":"object","title":"Current Values"}},"type":"object","required":["fhir_resource_type","fields","current_values"],"title":"CorrectionSchemaResponse","description":"Schema hints for building a correction form."}}}}
```

## The CreateAgentRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateAgentRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""}},"type":"object","required":["name"],"title":"CreateAgentRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The CreateAgentVersionRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateAgentVersionRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"initials":{"type":"string","maxLength":10,"title":"Initials","default":""},"identity":{"$ref":"#/components/schemas/Identity"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/VoiceConfig"},{"type":"null"}]},"background":{"$ref":"#/components/schemas/BackgroundString","default":""},"behaviors":{"items":{"type":"string"},"type":"array","title":"Behaviors","default":[]},"communication_patterns":{"items":{"type":"string"},"type":"array","title":"Communication Patterns","default":[]}},"type":"object","required":["name","identity"],"title":"CreateAgentVersionRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"Identity":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"default_spoken_language":{"type":"string","title":"Default Spoken Language"},"relationship_to_developer":{"$ref":"#/components/schemas/RelationshipToDeveloper"}},"type":"object","required":["name","role","developed_by","default_spoken_language","relationship_to_developer"],"title":"Identity"},"RelationshipToDeveloper":{"properties":{"ownership":{"type":"string","title":"Ownership"},"type":{"type":"string","title":"Type"},"conversation_visibility":{"type":"string","title":"Conversation Visibility"},"thought_visibility":{"type":"string","title":"Thought Visibility"}},"type":"object","required":["ownership","type","conversation_visibility","thought_visibility"],"title":"RelationshipToDeveloper"},"VoiceConfig":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"stability":{"type":"number","title":"Stability","default":0},"similarity_boost":{"type":"number","title":"Similarity Boost","default":0},"style":{"type":"number","title":"Style","default":0}},"type":"object","required":["voice_id"],"title":"VoiceConfig"},"BackgroundString":{"type":"string","maxLength":10000}}}}
```

## The CreateApiKeyRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateApiKeyRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/StrippedNonemptyString"},{"type":"null"}]},"duration_days":{"type":"integer","maximum":90,"minimum":1,"title":"Duration Days"},"role":{"type":"string","title":"Role","default":"member"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"}},"type":"object","required":["duration_days"],"title":"CreateApiKeyRequest"},"StrippedNonemptyString":{"type":"string","minLength":1}}}}
```

## The CreateApiKeyResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateApiKeyResponse":{"properties":{"key_id":{"type":"string","title":"Key Id"},"api_key":{"type":"string","title":"Api Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_by_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Entity Id"},"created_by_credential_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Credential Id"}},"type":"object","required":["key_id","api_key","name","role","permissions","expires_at","created_by_entity_id","created_by_credential_id"],"title":"CreateApiKeyResponse"}}}}
```

## The CreateBranchRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateBranchRequest":{"properties":{"source":{"type":"string","maxLength":64,"title":"Source","default":"staging"},"ttl_seconds":{"type":"integer","maximum":86400,"minimum":300,"title":"Ttl Seconds","default":3600}},"type":"object","title":"CreateBranchRequest"}}}}
```

## The CreateContextGraphRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateContextGraphRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""}},"type":"object","required":["name"],"title":"CreateContextGraphRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The CreateContextGraphVersionRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateContextGraphVersionRequest":{"properties":{"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"states":{"items":{"$ref":"#/components/schemas/ContextGraphState-Input"},"type":"array","title":"States"},"new_user_initial_state":{"type":"string","title":"New User Initial State"},"returning_user_initial_state":{"type":"string","title":"Returning User Initial State"},"terminal_state":{"type":"string","title":"Terminal State"},"global_intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Intra State Navigation Guidelines","default":[]},"global_action_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Action Guidelines","default":[]},"global_boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Global Boundary Constraints","default":[]},"topology_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topology Description"}},"type":"object","required":["states","new_user_initial_state","returning_user_initial_state","terminal_state"],"title":"CreateContextGraphVersionRequest"},"DescriptionString":{"type":"string","maxLength":2000},"ContextGraphState-Input":{"oneOf":[{"$ref":"#/components/schemas/ActionState"},{"$ref":"#/components/schemas/DecisionState"},{"$ref":"#/components/schemas/AnnotationState"},{"$ref":"#/components/schemas/DataCollectionState"}],"discriminator":{"propertyName":"type","mapping":{"action":"#/components/schemas/ActionState","annotation":"#/components/schemas/AnnotationState","data_collection":"#/components/schemas/DataCollectionState","decision":"#/components/schemas/DecisionState"}}},"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."},"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The CreateCustomerRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateCustomerRequest":{"properties":{"name":{"type":"string","maxLength":256,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":63,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$","title":"Slug"},"billing_email":{"type":"string","format":"email","title":"Billing Email"},"billing_contact":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Billing Contact"},"mercury_memo":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Mercury Memo"},"address":{"additionalProperties":true,"type":"object","title":"Address"}},"type":"object","required":["name","slug","billing_email"],"title":"CreateCustomerRequest"}}}}
```

## The CreateDataSourceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateDataSourceRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"display_name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"source_type":{"type":"string","enum":["rest_api","webhook","file_drop","fhir","fhir_store","ehr","crm","database","custom","smart_fhir"],"title":"Source Type"},"connection_config":{"additionalProperties":true,"type":"object","title":"Connection Config"},"entity_types":{"items":{"type":"string"},"type":"array","title":"Entity Types"},"field_mappings":{"additionalProperties":true,"type":"object","title":"Field Mappings"},"sync_strategy":{"type":"string","enum":["manual","scheduled","webhook","continuous"],"title":"Sync Strategy","default":"manual"},"sync_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Schedule"}},"type":"object","required":["name","source_type"],"title":"CreateDataSourceRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1}}}}
```

## The CreateEncounterRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateEncounterRequest":{"properties":{"service_id":{"type":"string","maxLength":64,"title":"Service Id"},"practitioner_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Practitioner Name"},"patient_entity_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Patient Entity Id"}},"type":"object","required":["service_id"],"title":"CreateEncounterRequest"}}}}
```

## The CreateIntegrationRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateIntegrationRequest":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"$ref":"#/components/schemas/NameString"},"protocol":{"type":"string","enum":["rest","fhir","mcp"],"title":"Protocol","default":"rest"},"base_url":{"type":"string","maxLength":2048,"title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfigWithSecrets"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"mcp_transport":{"anyOf":[{"type":"string","enum":["stdio","sse","http"]},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["name","display_name"],"title":"CreateIntegrationRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"AuthConfigWithSecrets":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"},"api_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"bearer_token_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"client_secret_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"private_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]}},"type":"object","required":["type"],"title":"AuthConfigWithSecrets","description":"AuthConfig that accepts inline secret values for auto-provisioning.\n\nIf provided, platform-api writes the value to SSM and replaces\nthe field with the generated ssm_param_path."},"SecretInput":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"SecretInput","description":"Inline secret value — auto-provisioned to SSM on create/update."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The CreateMonitorConceptRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateMonitorConceptRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"$ref":"#/components/schemas/DescriptionString"},"threshold":{"type":"number","title":"Threshold","default":0.4},"standalone_threshold":{"type":"number","title":"Standalone Threshold","default":0.85},"agent_config":{"$ref":"#/components/schemas/AgentConfigPayload"},"escalation":{"$ref":"#/components/schemas/EscalationConfigPayload"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["name","description"],"title":"CreateMonitorConceptRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"AgentConfigPayload":{"properties":{"model":{"type":"string","title":"Model","default":"gemini-2.5-flash"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"timeout_s":{"type":"number","title":"Timeout S","default":3},"action_space":{"items":{"type":"string"},"type":"array","title":"Action Space"}},"type":"object","title":"AgentConfigPayload"},"EscalationConfigPayload":{"properties":{"operator_type":{"type":"string","title":"Operator Type","default":"crisis_counselor"},"reason":{"type":"string","title":"Reason","default":""},"regulatory_basis":{"type":"string","title":"Regulatory Basis","default":""},"immediate":{"type":"boolean","title":"Immediate","default":true}},"type":"object","title":"EscalationConfigPayload"}}}}
```

## The CreateOperatorRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateOperatorRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"email":{"type":"string","format":"email","title":"Email"},"type":{"type":"string","enum":["clinical","administrative","crisis_counselor"],"title":"Type","default":"clinical"},"skills":{"items":{"type":"string"},"type":"array","title":"Skills"},"connection_method":{"type":"string","enum":["browser","phone"],"title":"Connection Method","default":"browser"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"role":{"type":"string","enum":["operator","supervisor","admin"],"title":"Role","default":"operator"}},"type":"object","required":["name","email"],"title":"CreateOperatorRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1}}}}
```

## The CreatePersonaRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreatePersonaRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"role":{"$ref":"#/components/schemas/NameString"},"developed_by":{"$ref":"#/components/schemas/NameString"},"communication_style":{"additionalProperties":true,"type":"object","title":"Communication Style"},"default_language":{"type":"string","maxLength":10,"title":"Default Language","default":"eng"},"background":{"$ref":"#/components/schemas/DescriptionString","default":""}},"type":"object","required":["name","role","developed_by"],"title":"CreatePersonaRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The CreatePhoneNumberRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreatePhoneNumberRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"display_name":{"type":"string","maxLength":256,"title":"Display Name","default":""},"provider":{"type":"string","enum":["twilio","livekit"],"title":"Provider","default":"twilio"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities","default":["inbound","outbound"]},"status":{"type":"string","enum":["active","inactive"],"title":"Status","default":"active"},"inbound_service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Inbound Service Id"},"provider_phone_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Phone Sid"},"notes":{"type":"string","maxLength":2000,"title":"Notes","default":""},"forwarding":{"anyOf":[{"$ref":"#/components/schemas/ForwardingConfigRequest"},{"type":"null"}]}},"type":"object","required":["phone_number"],"title":"CreatePhoneNumberRequest"},"ForwardingConfigRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"forward_to":{"type":"string","title":"Forward To"},"should_disconnect":{"type":"boolean","title":"Should Disconnect","default":true}},"type":"object","required":["forward_to"],"title":"ForwardingConfigRequest","description":"Call forwarding configuration for create/update requests."}}}}
```

## The CreateRunRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateRunRequest":{"properties":{"service_id":{"type":"string","maxLength":64,"title":"Service Id"},"branch_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Branch Name"}},"type":"object","required":["service_id"],"title":"CreateRunRequest"}}}}
```

## The CreateServiceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateServiceRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"context_graph_id":{"type":"string","format":"uuid","title":"Context Graph Id"},"keyterms":{"items":{"type":"string"},"type":"array","title":"Keyterms","default":[]},"is_active":{"type":"boolean","title":"Is Active","default":true},"version_sets":{"additionalProperties":{"$ref":"#/components/schemas/VersionSet"},"type":"object","title":"Version Sets","default":{}},"tags":{"items":{"$ref":"#/components/schemas/ServiceTag"},"type":"array","title":"Tags","default":[]},"tool_capacity":{"type":"integer","maximum":10,"minimum":1,"title":"Tool Capacity","default":3},"safety_filters_enabled":{"type":"boolean","title":"Safety Filters Enabled","default":true},"channel_type":{"type":"string","enum":["voice","text","scribe"],"title":"Channel Type","default":"voice"},"environment":{"type":"string","enum":["sandbox","production"],"title":"Environment","default":"production"},"persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Persona Id"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/ServiceVoiceConfig"},{"type":"null"}]}},"type":"object","required":["name","agent_id","context_graph_id"],"title":"CreateServiceRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"},"ServiceTag":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key"],"title":"ServiceTag"},"ServiceVoiceConfig":{"properties":{"tts_model":{"anyOf":[{"type":"string","enum":["sonic-turbo","sonic-3"]},{"type":"null"}],"title":"Tts Model"},"max_buffer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Buffer Delay Ms"},"eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eager Eot Threshold"},"eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eot Timeout Ms"},"filler_style":{"type":"string","enum":["backchannel","phrase","silent"],"title":"Filler Style","default":"backchannel"},"filler_vocabulary":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filler Vocabulary"},"backchannel_delay_ms":{"type":"integer","title":"Backchannel Delay Ms","default":400},"max_response_sentences":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Sentences"},"max_response_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Words"},"barge_in_min_speech_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Min Speech S"},"barge_in_cooldown_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Cooldown S"},"forward_call_enabled":{"type":"boolean","title":"Forward Call Enabled","default":false}},"type":"object","title":"ServiceVoiceConfig","description":"Per-service voice pipeline tuning. Overrides workspace/env defaults.\n\nEach field is optional — None means inherit from the layer above\n(workspace VoiceSettings → env vars → hardcoded defaults)."}}}}
```

## The CreateSessionRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateSessionRequest":{"properties":{"service_id":{"type":"string","maxLength":64,"title":"Service Id"},"branch_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Branch Name"}},"type":"object","required":["service_id"],"title":"CreateSessionRequest"}}}}
```

## The CreateSkillRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateSkillRequest":{"properties":{"slug":{"type":"string","maxLength":63,"title":"Slug"},"name":{"$ref":"#/components/schemas/StrippedNonemptyString"},"description":{"$ref":"#/components/schemas/StrippedNonemptyString"},"system_prompt":{"anyOf":[{"$ref":"#/components/schemas/StrippedNonemptyString"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"result_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Schema"},"model":{"type":"string","maxLength":128,"title":"Model","default":"claude-sonnet-4-6"},"max_tokens":{"type":"integer","title":"Max Tokens","default":4096},"max_result_chars":{"type":"integer","title":"Max Result Chars","default":2000},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"timeout_s":{"type":"number","title":"Timeout S","default":60},"thinking_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Thinking Effort"},"enable_caching":{"type":"boolean","title":"Enable Caching","default":true},"enable_citations":{"type":"boolean","title":"Enable Citations","default":false},"use_structured_output":{"type":"boolean","title":"Use Structured Output","default":false},"integration_tools":{"items":{"$ref":"#/components/schemas/IntegrationToolRef-Input"},"type":"array","title":"Integration Tools","default":[]},"static_tools":{"items":{"$ref":"#/components/schemas/StaticToolDef-Input"},"type":"array","title":"Static Tools","default":[]},"delivery":{"type":"string","enum":["interrupt","queue"],"title":"Delivery","default":"interrupt"},"urgency_keywords":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Urgency Keywords"},"enabled":{"type":"boolean","title":"Enabled","default":true},"execution_tier":{"type":"string","enum":["direct","orchestrated","autonomous","browser"],"title":"Execution Tier","default":"orchestrated"},"max_agent_turns":{"type":"integer","title":"Max Agent Turns","default":20},"checkpoint_enabled":{"type":"boolean","title":"Checkpoint Enabled","default":true},"approval_required":{"type":"boolean","title":"Approval Required","default":false},"browser_start_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Browser Start Url"},"browser_allowed_domains":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Browser Allowed Domains"},"browser_auth_integration":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Browser Auth Integration"}},"type":"object","required":["slug","name","description","input_schema"],"title":"CreateSkillRequest"},"StrippedNonemptyString":{"type":"string","minLength":1},"IntegrationToolRef-Input":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef","description":"Reference to an integration endpoint by integration + endpoint name."},"StaticToolDef-Input":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef","description":"A built-in tool available to companion agents."}}}}
```

## The CreateSurfaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateSurfaceRequest":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"fields":{"items":{"$ref":"#/components/schemas/SurfaceField"},"type":"array","maxItems":100,"minItems":1,"title":"Fields"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"web"},"expires_in_hours":{"type":"integer","maximum":8760,"minimum":1,"title":"Expires In Hours","default":168},"context":{"additionalProperties":true,"type":"object","title":"Context","default":{}},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"sections":{"anyOf":[{"items":{"$ref":"#/components/schemas/SurfaceSection"},"type":"array"},{"type":"null"}],"title":"Sections"},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"}},"type":"object","required":["entity_id","title","fields"],"title":"CreateSurfaceRequest","description":"Request to create a new surface.\n\nThe agent generates a SurfaceSpec and sends it here."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"SurfaceField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"prefill_value":{"anyOf":[{},{"type":"null"}],"title":"Prefill Value"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"}},"type":"object","required":["key","label","field_type"],"title":"SurfaceField","description":"A single data collection field in a surface spec.\n\nGenerated by agents from HSM analysis. Each field maps\nto a specific piece of data the world model needs."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."},"SurfaceSection":{"properties":{"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["title","field_keys"],"title":"SurfaceSection","description":"A page/step in a multi-page surface form."}}}}
```

## The CreateSurfaceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateSurfaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"entity_id":{"type":"string","title":"Entity Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"channel":{"type":"string","title":"Channel"},"fields_count":{"type":"integer","title":"Fields Count"},"expires_at":{"type":"string","title":"Expires At"},"created_at":{"type":"string","title":"Created At"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["id","event_id","entity_id","title","status","channel","fields_count","expires_at","created_at"],"title":"CreateSurfaceResponse"}}}}
```

## The CreateUnificationRuleRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateUnificationRuleRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"rule_type":{"type":"string","enum":["field_mapping","entity_resolution","dedup","transform"],"title":"Rule Type"},"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"source_event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Event Type"},"target_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Entity Type"},"rule_config":{"additionalProperties":true,"type":"object","title":"Rule Config"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["name","rule_type"],"title":"CreateUnificationRuleRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The CreateWorkspaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CreateWorkspaceRequest":{"properties":{"slug":{"$ref":"#/components/schemas/SlugString"},"name":{"$ref":"#/components/schemas/StrippedNonemptyString"},"environment":{"type":"string","enum":["production","staging","development"],"title":"Environment"},"region":{"type":"string","enum":["us-east-1","ap-southeast-2","eu-central-1","ca-central-1"],"title":"Region","default":"us-east-1"},"backend_org_id":{"anyOf":[{"$ref":"#/components/schemas/StrippedNonemptyString"},{"type":"null"}]}},"type":"object","required":["slug","name","environment"],"title":"CreateWorkspaceRequest"},"SlugString":{"type":"string","maxLength":63,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$"},"StrippedNonemptyString":{"type":"string","minLength":1}}}}
```

## The CrmActivityItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmActivityItem":{"properties":{"id":{"type":"string","title":"Id"},"activity_type":{"type":"string","title":"Activity Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source","default":"unknown"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"confidence":{"type":"number","title":"Confidence","default":1},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"}},"type":"object","required":["id","activity_type"],"title":"CrmActivityItem"}}}}
```

## The CrmActivityTimelineResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmActivityTimelineResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"activities":{"items":{"$ref":"#/components/schemas/CrmActivityItem"},"type":"array","title":"Activities"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["entity_id","activities","total"],"title":"CrmActivityTimelineResponse"},"CrmActivityItem":{"properties":{"id":{"type":"string","title":"Id"},"activity_type":{"type":"string","title":"Activity Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source","default":"unknown"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"confidence":{"type":"number","title":"Confidence","default":1},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"}},"type":"object","required":["id","activity_type"],"title":"CrmActivityItem"}}}}
```

## The CrmCompanyResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmCompanyResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"CrmCompanyResponse"}}}}
```

## The CrmCompanySearchResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmCompanySearchResponse":{"properties":{"companies":{"items":{"$ref":"#/components/schemas/CrmCompanyResponse"},"type":"array","title":"Companies"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["companies","total"],"title":"CrmCompanySearchResponse"},"CrmCompanyResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"CrmCompanyResponse"}}}}
```

## The CrmContactDetailResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmContactDetailResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"},"mrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrn"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"clinical":{"additionalProperties":true,"type":"object","title":"Clinical"},"operational":{"additionalProperties":true,"type":"object","title":"Operational"},"external_ids":{"additionalProperties":true,"type":"object","title":"External Ids"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"merged_with":{"items":{"$ref":"#/components/schemas/CrmContactResponse"},"type":"array","title":"Merged With"}},"type":"object","required":["entity_id"],"title":"CrmContactDetailResponse","description":"Single contact with full clinical state + merged entities."},"CrmContactResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"},"mrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrn"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"CrmContactResponse"}}}}
```

## The CrmContactResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmContactResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"},"mrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrn"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"CrmContactResponse"}}}}
```

## The CrmContactSearchResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmContactSearchResponse":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/CrmContactResponse"},"type":"array","title":"Contacts"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["contacts","total"],"title":"CrmContactSearchResponse"},"CrmContactResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"lifecycle_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle Stage"},"mrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrn"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"CrmContactResponse"}}}}
```

## The CrmDealResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmDealResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"close_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Date"},"pipeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline"},"deal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Type"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"CrmDealResponse"}}}}
```

## The CrmDealSearchResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmDealSearchResponse":{"properties":{"deals":{"items":{"$ref":"#/components/schemas/CrmDealResponse"},"type":"array","title":"Deals"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["deals","total"],"title":"CrmDealSearchResponse"},"CrmDealResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"hubspot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hubspot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"close_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Close Date"},"pipeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline"},"deal_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Type"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"CrmDealResponse"}}}}
```

## The CrmStatusResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CrmStatusResponse":{"properties":{"configured":{"type":"boolean","title":"Configured"},"connector_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Type"},"data_source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source Id"},"contact_count":{"type":"integer","title":"Contact Count","default":0},"company_count":{"type":"integer","title":"Company Count","default":0},"deal_count":{"type":"integer","title":"Deal Count","default":0},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"sync_healthy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Healthy"},"sync_failure_count":{"type":"integer","title":"Sync Failure Count","default":0}},"type":"object","required":["configured"],"title":"CrmStatusResponse"}}}}
```

## The CustomerItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"CustomerItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"billing_email":{"type":"string","title":"Billing Email"},"billing_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Contact"},"mercury_memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mercury Memo"},"address":{"additionalProperties":true,"type":"object","title":"Address"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","slug","billing_email","billing_contact","mercury_memo","address","status","created_at","updated_at"],"title":"CustomerItem"}}}}
```

## The DashboardResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DashboardResponse":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"operators":{"$ref":"#/components/schemas/OperatorStatusCounts"},"active_escalations":{"type":"integer","title":"Active Escalations"},"escalations_today":{"$ref":"#/components/schemas/EscalationDailyStats"},"recent_escalations":{"items":{"$ref":"#/components/schemas/ActiveEscalationItem"},"type":"array","title":"Recent Escalations"}},"type":"object","required":["workspace_id","operators","active_escalations","escalations_today","recent_escalations"],"title":"DashboardResponse"},"OperatorStatusCounts":{"properties":{"total":{"type":"integer","title":"Total"},"online":{"type":"integer","title":"Online"},"busy":{"type":"integer","title":"Busy"},"offline":{"type":"integer","title":"Offline"}},"type":"object","required":["total","online","busy","offline"],"title":"OperatorStatusCounts"},"EscalationDailyStats":{"properties":{"requested":{"type":"integer","title":"Requested","default":0},"connected":{"type":"integer","title":"Connected","default":0},"completed":{"type":"integer","title":"Completed","default":0},"avg_wait_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Wait Seconds"},"avg_handle_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Handle Time Seconds"}},"type":"object","title":"EscalationDailyStats"},"ActiveEscalationItem":{"properties":{"call_entity_id":{"type":"string","format":"uuid","title":"Call Entity Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"escalation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Id"},"status":{"type":"string","title":"Status"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"trigger_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Source"},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"regulatory_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulatory Basis"},"immediate":{"type":"boolean","title":"Immediate"},"risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Score"},"requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested At"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"wait_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wait Seconds"},"operator_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Entity Id"},"caller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"}},"type":"object","required":["call_entity_id","call_sid","escalation_id","status","trigger","trigger_source","concept","operator_type","regulatory_basis","immediate","risk_score","requested_at","connected_at","wait_seconds","operator_entity_id","caller_id","direction","phone_number","started_at"],"title":"ActiveEscalationItem","description":"A call with an active escalation, enriched from projected state."}}}}
```

## The DataCollectionState object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."}}}}
```

## The DataQualityMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataQualityMetrics":{"properties":{"pending_reviews":{"type":"integer","title":"Pending Reviews","default":0},"approval_rate_7d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Approval Rate 7D"},"avg_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Confidence"},"entities_total":{"type":"integer","title":"Entities Total","default":0},"entities_merged_7d":{"type":"integer","title":"Entities Merged 7D","default":0}},"type":"object","title":"DataQualityMetrics"}}}}
```

## The DataQualityResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataQualityResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"confidence_distribution":{"items":{"$ref":"#/components/schemas/ConfidenceBucket"},"type":"array","title":"Confidence Distribution"},"confidence_by_source":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ConfidenceBucket"},"type":"array"},"type":"object","title":"Confidence By Source"},"review_pipeline":{"additionalProperties":true,"type":"object","title":"Review Pipeline"},"timeseries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Timeseries"},"total_events":{"type":"integer","title":"Total Events"}},"type":"object","required":["workspace_id","period_start","period_end","confidence_distribution","confidence_by_source","review_pipeline","timeseries","total_events"],"title":"DataQualityResponse","description":"Data quality metrics — confidence distribution, review pipeline stats."},"ConfidenceBucket":{"properties":{"confidence_range":{"type":"string","title":"Confidence Range"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["confidence_range","count"],"title":"ConfidenceBucket"}}}}
```

## The DataQueryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataQueryResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"count":{"type":"integer","title":"Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","count","has_more"],"title":"DataQueryResponse"}}}}
```

## The DataSourceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataSourceResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"source_type":{"type":"string","title":"Source Type"},"connection_config":{"additionalProperties":true,"type":"object","title":"Connection Config"},"entity_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Types"},"field_mappings":{"additionalProperties":true,"type":"object","title":"Field Mappings"},"sync_strategy":{"type":"string","title":"Sync Strategy"},"sync_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Schedule"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_event_count":{"type":"integer","title":"Last Sync Event Count"},"is_active":{"type":"boolean","title":"Is Active"},"health_status":{"type":"string","title":"Health Status"},"last_health_check":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Health Check"},"discovered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovered By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","display_name","source_type","connection_config","entity_types","field_mappings","sync_strategy","sync_schedule","last_sync_at","last_sync_status","last_sync_event_count","is_active","health_status","last_health_check","discovered_by","created_at","updated_at"],"title":"DataSourceResponse"}}}}
```

## The DataSourceStatusResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataSourceStatusResponse":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"health_status":{"type":"string","title":"Health Status"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_event_count":{"type":"integer","title":"Last Sync Event Count"},"event_count":{"type":"integer","title":"Event Count"},"synced_count":{"type":"integer","title":"Synced Count"},"failed_count":{"type":"integer","title":"Failed Count"}},"type":"object","required":["data_source_id","name","is_active","health_status","last_sync_at","last_sync_status","last_sync_event_count","event_count","synced_count","failed_count"],"title":"DataSourceStatusResponse"}}}}
```

## The DataSourceSyncHistoryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataSourceSyncHistoryResponse":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"timeline":{"items":{"$ref":"#/components/schemas/SyncHistoryEntry"},"type":"array","title":"Timeline"},"recent_failures":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Failures"}},"type":"object","required":["data_source_id","name","timeline","recent_failures"],"title":"DataSourceSyncHistoryResponse"},"SyncHistoryEntry":{"properties":{"date":{"type":"string","title":"Date"},"event_count":{"type":"integer","title":"Event Count"},"synced_count":{"type":"integer","title":"Synced Count"},"failed_count":{"type":"integer","title":"Failed Count"}},"type":"object","required":["date","event_count","synced_count","failed_count"],"title":"SyncHistoryEntry"}}}}
```

## The DataTemplate-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataTemplate-Input":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"fields":{"items":{"$ref":"#/components/schemas/DataTemplateField"},"type":"array","maxItems":50,"minItems":1,"title":"Fields"}},"type":"object","required":["name","fields"],"title":"DataTemplate","description":"Named field template — reusable across multiple outreach rules."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DataTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state (e.g. demographics.date_of_birth)"}},"type":"object","required":["key","label","path"],"title":"DataTemplateField","description":"A field in a data template — maps to entity state path for gap detection."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."}}}}
```

## The DataTemplate-Output object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataTemplate-Output":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"fields":{"items":{"$ref":"#/components/schemas/DataTemplateField"},"type":"array","maxItems":50,"minItems":1,"title":"Fields"}},"type":"object","required":["name","fields"],"title":"DataTemplate","description":"Named field template — reusable across multiple outreach rules."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DataTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state (e.g. demographics.date_of_birth)"}},"type":"object","required":["key","label","path"],"title":"DataTemplateField","description":"A field in a data template — maps to entity state path for gap detection."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."}}}}
```

## The DataTemplateField object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DataTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state (e.g. demographics.date_of_birth)"}},"type":"object","required":["key","label","path"],"title":"DataTemplateField","description":"A field in a data template — maps to entity state path for gap detection."},"NameString":{"type":"string","maxLength":256,"minLength":1},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."}}}}
```

## The DecisionState object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."}}}}
```

## The DeliverSurfaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DeliverSurfaceRequest":{"properties":{"channel_address":{"type":"string","maxLength":256,"minLength":1,"title":"Channel Address","description":"Delivery address (phone number, email, etc.)"}},"type":"object","required":["channel_address"],"title":"DeliverSurfaceRequest","description":"Request to mark a surface as delivered."}}}}
```

## The DeliverSurfaceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DeliverSurfaceResponse":{"properties":{"surface_id":{"type":"string","title":"Surface Id"},"status":{"type":"string","title":"Status"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"channel_address":{"type":"string","title":"Channel Address"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"from_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Address"},"delivery_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Provider"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"}},"type":"object","required":["surface_id","status","channel_address"],"title":"DeliverSurfaceResponse"}}}}
```

## The DescriptionString object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The DimensionAnalytics object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DimensionAnalytics":{"properties":{"dimension":{"type":"string","title":"Dimension"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"weight":{"type":"number","title":"Weight"},"extraction_mode":{"type":"string","title":"Extraction Mode"},"active":{"type":"boolean","title":"Active"},"builtin":{"type":"boolean","title":"Builtin"},"entity_count":{"type":"integer","title":"Entity Count"},"total_facts":{"type":"integer","title":"Total Facts"},"avg_facts_per_entity":{"type":"number","title":"Avg Facts Per Entity"},"avg_confidence":{"type":"number","title":"Avg Confidence"},"source_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Source Breakdown"},"latest_fact_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Fact At"}},"type":"object","required":["dimension","name","description","weight","extraction_mode","active","builtin","entity_count","total_facts","avg_facts_per_entity","avg_confidence","source_breakdown","latest_fact_at"],"title":"DimensionAnalytics","description":"Per-dimension aggregate stats across all entities."}}}}
```

## The DimensionScore object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DimensionScore":{"properties":{"dimension":{"type":"string","title":"Dimension"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"weight":{"type":"number","title":"Weight"},"fact_count":{"type":"integer","title":"Fact Count"},"avg_confidence":{"type":"number","title":"Avg Confidence"},"source_count":{"type":"integer","title":"Source Count"},"latest_fact_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Fact At"}},"type":"object","required":["dimension","name","description","weight","fact_count","avg_confidence","source_count","latest_fact_at"],"title":"DimensionScore"}}}}
```

## The DimensionScoresResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"DimensionScoresResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"dimensions":{"items":{"$ref":"#/components/schemas/DimensionScore"},"type":"array","title":"Dimensions"},"total_facts":{"type":"integer","title":"Total Facts"}},"type":"object","required":["entity_id","dimensions","total_facts"],"title":"DimensionScoresResponse"},"DimensionScore":{"properties":{"dimension":{"type":"string","title":"Dimension"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"weight":{"type":"number","title":"Weight"},"fact_count":{"type":"integer","title":"Fact Count"},"avg_confidence":{"type":"number","title":"Avg Confidence"},"source_count":{"type":"integer","title":"Source Count"},"latest_fact_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Fact At"}},"type":"object","required":["dimension","name","description","weight","fact_count","avg_confidence","source_count","latest_fact_at"],"title":"DimensionScore"}}}}
```

## The EditSoapRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EditSoapRequest":{"properties":{"section":{"type":"string","pattern":"^(subjective|objective|assessment|plan)$","title":"Section"},"content":{"type":"string","maxLength":10000,"title":"Content"}},"type":"object","required":["section","content"],"title":"EditSoapRequest"}}}}
```

## The EgressIpsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EgressIpsResponse":{"properties":{"egress_ips":{"items":{"type":"string"},"type":"array","title":"Egress Ips"},"region":{"type":"string","title":"Region"},"note":{"type":"string","title":"Note"}},"type":"object","required":["egress_ips","region","note"],"title":"EgressIpsResponse"}}}}
```

## The EncounterSessionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EncounterSessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"encounter_entity_id":{"type":"string","title":"Encounter Entity Id"},"greeting":{"type":"string","title":"Greeting"},"is_terminal":{"type":"boolean","title":"Is Terminal"}},"additionalProperties":true,"type":"object","required":["session_id","encounter_entity_id","greeting","is_terminal"],"title":"EncounterSessionResponse"}}}}
```

## The EncounterSnapshotResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EncounterSnapshotResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"encounter_entity_id":{"type":"string","title":"Encounter Entity Id"},"current_state":{"type":"string","title":"Current State"},"is_terminal":{"type":"boolean","title":"Is Terminal"}},"additionalProperties":true,"type":"object","required":["session_id","encounter_entity_id","current_state","is_terminal"],"title":"EncounterSnapshotResponse"}}}}
```

## The EndpointConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The EntityEventResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"domain":{"type":"string","title":"Domain"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"event_type":{"type":"string","title":"Event Type"},"event_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Subtype"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source","default":"manual"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"confidence":{"type":"number","title":"Confidence","default":1},"produced_by_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Produced By Agent"},"supersedes":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Supersedes"},"is_current":{"type":"boolean","title":"Is Current","default":true},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","domain","event_type"],"title":"EntityEventResponse"}}}}
```

## The EntityListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityListResponse":{"properties":{"entities":{"items":{"$ref":"#/components/schemas/EntityResponse"},"type":"array","title":"Entities"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["entities","total","has_more"],"title":"EntityListResponse"},"EntityResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"entity_type":{"type":"string","title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"external_ids":{"additionalProperties":true,"type":"object","title":"External Ids"},"state":{"additionalProperties":true,"type":"object","title":"State"},"has_projection":{"type":"boolean","title":"Has Projection","default":false},"first_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen At"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event At"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","entity_type"],"title":"EntityResponse"}}}}
```

## The EntityRelationshipResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityRelationshipResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_entity_id":{"type":"string","format":"uuid","title":"Source Entity Id"},"source_entity_type":{"type":"string","title":"Source Entity Type"},"target_entity_id":{"type":"string","format":"uuid","title":"Target Entity Id"},"target_entity_type":{"type":"string","title":"Target Entity Type"},"relationship":{"type":"string","title":"Relationship"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence","default":1},"discovered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovered By"},"is_current":{"type":"boolean","title":"Is Current","default":true},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","source_entity_id","source_entity_type","target_entity_id","target_entity_type","relationship"],"title":"EntityRelationshipResponse"}}}}
```

## The EntityRelationshipsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityRelationshipsResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"relationships":{"items":{"$ref":"#/components/schemas/EntityRelationshipResponse"},"type":"array","title":"Relationships"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entity_id","relationships","total"],"title":"EntityRelationshipsResponse"},"EntityRelationshipResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_entity_id":{"type":"string","format":"uuid","title":"Source Entity Id"},"source_entity_type":{"type":"string","title":"Source Entity Type"},"target_entity_id":{"type":"string","format":"uuid","title":"Target Entity Id"},"target_entity_type":{"type":"string","title":"Target Entity Type"},"relationship":{"type":"string","title":"Relationship"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence","default":1},"discovered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovered By"},"is_current":{"type":"boolean","title":"Is Current","default":true},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","source_entity_id","source_entity_type","target_entity_id","target_entity_type","relationship"],"title":"EntityRelationshipResponse"}}}}
```

## The EntityResolutionMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityResolutionMetrics":{"properties":{"total_same_as_edges":{"type":"integer","title":"Total Same As Edges"},"recent_merges_24h":{"type":"integer","title":"Recent Merges 24H"},"loop_status":{"type":"string","title":"Loop Status"},"last_tick_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Tick At"},"merges_last_tick":{"type":"integer","title":"Merges Last Tick","default":0}},"type":"object","required":["total_same_as_edges","recent_merges_24h","loop_status"],"title":"EntityResolutionMetrics"}}}}
```

## The EntityResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"entity_type":{"type":"string","title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"external_ids":{"additionalProperties":true,"type":"object","title":"External Ids"},"state":{"additionalProperties":true,"type":"object","title":"State"},"has_projection":{"type":"boolean","title":"Has Projection","default":false},"first_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen At"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event At"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","entity_type"],"title":"EntityResponse"}}}}
```

## The EntityStatsSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityStatsSummary":{"properties":{"total_entities":{"type":"integer","title":"Total Entities"},"total_events":{"type":"integer","title":"Total Events"},"sync_pending":{"type":"integer","title":"Sync Pending"},"sync_synced":{"type":"integer","title":"Sync Synced"},"sync_failed":{"type":"integer","title":"Sync Failed"},"by_event_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Event Type"}},"type":"object","required":["total_entities","total_events","sync_pending","sync_synced","sync_failed"],"title":"EntityStatsSummary"}}}}
```

## The EntitySummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntitySummary":{"properties":{"id":{"type":"string","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."}}}}
```

## The EntityTimelineResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityTimelineResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"events":{"items":{"$ref":"#/components/schemas/EntityEventResponse"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["entity_id","events","total","has_more"],"title":"EntityTimelineResponse"},"EntityEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"domain":{"type":"string","title":"Domain"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"event_type":{"type":"string","title":"Event Type"},"event_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Subtype"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source","default":"manual"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"confidence":{"type":"number","title":"Confidence","default":1},"produced_by_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Produced By Agent"},"supersedes":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Supersedes"},"is_current":{"type":"boolean","title":"Is Current","default":true},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","domain","event_type"],"title":"EntityEventResponse"}}}}
```

## The EntityTypeRegistryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityTypeRegistryResponse":{"properties":{"entity_types":{"items":{"$ref":"#/components/schemas/EntityTypeSummary"},"type":"array","title":"Entity Types"},"total_entities":{"type":"integer","title":"Total Entities"}},"type":"object","required":["entity_types","total_entities"],"title":"EntityTypeRegistryResponse"},"EntityTypeSummary":{"properties":{"entity_type":{"type":"string","title":"Entity Type"},"count":{"type":"integer","title":"Count"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"},"has_projection":{"type":"boolean","title":"Has Projection"}},"type":"object","required":["entity_type","count","last_updated","has_projection"],"title":"EntityTypeSummary"}}}}
```

## The EntityTypeSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EntityTypeSummary":{"properties":{"entity_type":{"type":"string","title":"Entity Type"},"count":{"type":"integer","title":"Count"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"},"has_projection":{"type":"boolean","title":"Has Projection"}},"type":"object","required":["entity_type","count","last_updated","has_projection"],"title":"EntityTypeSummary"}}}}
```

## The EnvironmentOverrides object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EnvironmentOverrides":{"properties":{"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"tool_overrides":{"additionalProperties":true,"type":"object","title":"Tool Overrides"},"data_source_overrides":{"additionalProperties":true,"type":"object","title":"Data Source Overrides"}},"type":"object","title":"EnvironmentOverrides","description":"Per-environment config overrides merged at runtime."}}}}
```

## The EnvironmentSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EnvironmentSettingsRequest":{"properties":{"environments":{"additionalProperties":{"$ref":"#/components/schemas/EnvironmentOverrides"},"type":"object","title":"Environments"}},"type":"object","required":["environments"],"title":"EnvironmentSettingsRequest"},"EnvironmentOverrides":{"properties":{"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"tool_overrides":{"additionalProperties":true,"type":"object","title":"Tool Overrides"},"data_source_overrides":{"additionalProperties":true,"type":"object","title":"Data Source Overrides"}},"type":"object","title":"EnvironmentOverrides","description":"Per-environment config overrides merged at runtime."}}}}
```

## The EnvironmentSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EnvironmentSettingsResponse":{"properties":{"environments":{"additionalProperties":{"$ref":"#/components/schemas/EnvironmentOverrides"},"type":"object","title":"Environments"}},"type":"object","title":"EnvironmentSettingsResponse"},"EnvironmentOverrides":{"properties":{"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"tool_overrides":{"additionalProperties":true,"type":"object","title":"Tool Overrides"},"data_source_overrides":{"additionalProperties":true,"type":"object","title":"Data Source Overrides"}},"type":"object","title":"EnvironmentOverrides","description":"Per-environment config overrides merged at runtime."}}}}
```

## The EscalationConfigPayload object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EscalationConfigPayload":{"properties":{"operator_type":{"type":"string","title":"Operator Type","default":"crisis_counselor"},"reason":{"type":"string","title":"Reason","default":""},"regulatory_basis":{"type":"string","title":"Regulatory Basis","default":""},"immediate":{"type":"boolean","title":"Immediate","default":true}},"type":"object","title":"EscalationConfigPayload"}}}}
```

## The EscalationDailyStats object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EscalationDailyStats":{"properties":{"requested":{"type":"integer","title":"Requested","default":0},"connected":{"type":"integer","title":"Connected","default":0},"completed":{"type":"integer","title":"Completed","default":0},"avg_wait_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Wait Seconds"},"avg_handle_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Handle Time Seconds"}},"type":"object","title":"EscalationDailyStats"}}}}
```

## The EscalationEventResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EscalationEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"event_type":{"type":"string","title":"Event Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source"},"confidence":{"type":"number","title":"Confidence"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","workspace_id","event_type","data","source","confidence","ingested_at","created_at"],"title":"EscalationEventResponse"}}}}
```

## The EscalationStatsBucket object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EscalationStatsBucket":{"properties":{"key":{"type":"string","title":"Key"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["key","count"],"title":"EscalationStatsBucket"}}}}
```

## The EscalationStatsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EscalationStatsResponse":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"period":{"type":"string","title":"Period"},"group_by":{"type":"string","title":"Group By"},"buckets":{"items":{"$ref":"#/components/schemas/EscalationStatsBucket"},"type":"array","title":"Buckets"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["workspace_id","period","group_by","buckets","total"],"title":"EscalationStatsResponse"},"EscalationStatsBucket":{"properties":{"key":{"type":"string","title":"Key"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["key","count"],"title":"EscalationStatsBucket"}}}}
```

## The EventBreakdownResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EventBreakdownResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"by_type":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Type"},"by_source":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Source"},"total_events":{"type":"integer","title":"Total Events"}},"type":"object","required":["workspace_id","period_start","period_end","by_type","by_source","total_events"],"title":"EventBreakdownResponse"}}}}
```

## The EventSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EventSummary":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status","created_at"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."}}}}
```

## The EventTypeRegistryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EventTypeRegistryResponse":{"properties":{"event_types":{"items":{"$ref":"#/components/schemas/EventTypeSummary"},"type":"array","title":"Event Types"},"total_events":{"type":"integer","title":"Total Events"}},"type":"object","required":["event_types","total_events"],"title":"EventTypeRegistryResponse"},"EventTypeSummary":{"properties":{"event_type":{"type":"string","title":"Event Type"},"count":{"type":"integer","title":"Count"},"domains":{"items":{"type":"string"},"type":"array","title":"Domains"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources"}},"type":"object","required":["event_type","count","domains","sources"],"title":"EventTypeSummary"}}}}
```

## The EventTypeSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"EventTypeSummary":{"properties":{"event_type":{"type":"string","title":"Event Type"},"count":{"type":"integer","title":"Count"},"domains":{"items":{"type":"string"},"type":"array","title":"Domains"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources"}},"type":"object","required":["event_type","count","domains","sources"],"title":"EventTypeSummary"}}}}
```

## The ExitCondition object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"}}}}
```

## The FhirAppointmentListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirAppointmentListResponse":{"properties":{"appointments":{"items":{"$ref":"#/components/schemas/FhirAppointmentView"},"type":"array","title":"Appointments"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["appointments","total"],"title":"FhirAppointmentListResponse"},"FhirAppointmentView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"},"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"},"practitioner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Practitioner Name"},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirAppointmentView"}}}}
```

## The FhirAppointmentView object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirAppointmentView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"},"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"},"practitioner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Practitioner Name"},"location_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Name"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirAppointmentView"}}}}
```

## The FhirImportRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirImportRequest":{"properties":{"bundle":{"additionalProperties":true,"type":"object","title":"Bundle"},"source":{"type":"string","maxLength":128,"title":"Source","default":"fhir_import"},"source_system":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Source System"}},"type":"object","required":["bundle"],"title":"FhirImportRequest"}}}}
```

## The FhirImportResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirImportResponse":{"properties":{"events_created":{"type":"integer","title":"Events Created"},"events_skipped":{"type":"integer","title":"Events Skipped","default":0},"events_updated":{"type":"integer","title":"Events Updated","default":0},"entities_created":{"type":"integer","title":"Entities Created"},"entities_updated":{"type":"integer","title":"Entities Updated"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["events_created","entities_created","entities_updated"],"title":"FhirImportResponse"}}}}
```

## The FhirLocationListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirLocationListResponse":{"properties":{"locations":{"items":{"$ref":"#/components/schemas/FhirLocationView"},"type":"array","title":"Locations"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["locations","total"],"title":"FhirLocationListResponse"},"FhirLocationView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hours"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirLocationView"}}}}
```

## The FhirLocationView object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirLocationView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"hours":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Hours"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirLocationView"}}}}
```

## The FhirOrganizationListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirOrganizationListResponse":{"properties":{"organizations":{"items":{"$ref":"#/components/schemas/FhirOrganizationView"},"type":"array","title":"Organizations"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["organizations","total"],"title":"FhirOrganizationListResponse"},"FhirOrganizationView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirOrganizationView"}}}}
```

## The FhirOrganizationView object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirOrganizationView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirOrganizationView"}}}}
```

## The FhirPatientListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirPatientListResponse":{"properties":{"patients":{"items":{"$ref":"#/components/schemas/FhirPatientView"},"type":"array","title":"Patients"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["patients","total"],"title":"FhirPatientListResponse"},"FhirPatientView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"mrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrn"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"active_conditions":{"items":{"type":"string"},"type":"array","title":"Active Conditions"},"active_medications":{"items":{"type":"string"},"type":"array","title":"Active Medications"},"allergies":{"items":{"type":"string"},"type":"array","title":"Allergies"},"insurance":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Insurance"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"FhirPatientView"}}}}
```

## The FhirPatientView object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirPatientView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"mrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrn"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"active_conditions":{"items":{"type":"string"},"type":"array","title":"Active Conditions"},"active_medications":{"items":{"type":"string"},"type":"array","title":"Active Medications"},"allergies":{"items":{"type":"string"},"type":"array","title":"Allergies"},"insurance":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Insurance"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entity_id"],"title":"FhirPatientView"}}}}
```

## The FhirPractitionerListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirPractitionerListResponse":{"properties":{"practitioners":{"items":{"$ref":"#/components/schemas/FhirPractitionerView"},"type":"array","title":"Practitioners"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["practitioners","total"],"title":"FhirPractitionerListResponse"},"FhirPractitionerView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"npi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Npi"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirPractitionerView"}}}}
```

## The FhirPractitionerView object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirPractitionerView":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"npi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Npi"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"event_count":{"type":"integer","title":"Event Count","default":0},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id"],"title":"FhirPractitionerView"}}}}
```

## The FhirResourceHistoryEntry object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirResourceHistoryEntry":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"data_source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"is_current":{"type":"boolean","title":"Is Current"},"synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synced At"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"fields_affected":{"items":{"type":"string"},"type":"array","title":"Fields Affected"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["event_id","event_type","is_current"],"title":"FhirResourceHistoryEntry"}}}}
```

## The FhirResourceHistoryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirResourceHistoryResponse":{"properties":{"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"type":"string","title":"Resource Id"},"entries":{"items":{"$ref":"#/components/schemas/FhirResourceHistoryEntry"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["resource_type","resource_id","entries","total"],"title":"FhirResourceHistoryResponse"},"FhirResourceHistoryEntry":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"data_source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"is_current":{"type":"boolean","title":"Is Current"},"synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synced At"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"fields_affected":{"items":{"type":"string"},"type":"array","title":"Fields Affected"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["event_id","event_type","is_current"],"title":"FhirResourceHistoryEntry"}}}}
```

## The FhirResourceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirResourceResponse":{"properties":{"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"type":"string","title":"Resource Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["resource_type","resource_id","data"],"title":"FhirResourceResponse"}}}}
```

## The FhirSearchResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirSearchResponse":{"properties":{"resource_type":{"type":"string","title":"Resource Type"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"entries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entries"},"next_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Url"}},"type":"object","required":["resource_type","total","entries"],"title":"FhirSearchResponse"}}}}
```

## The FhirStatusResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirStatusResponse":{"properties":{"configured":{"type":"boolean","title":"Configured"},"connector_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Type"},"event_count":{"type":"integer","title":"Event Count"},"entity_count":{"type":"integer","title":"Entity Count"},"entity_type_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Entity Type Counts"},"resource_type_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Resource Type Counts"},"last_poll_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Poll At"},"last_change_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Change At"},"sync_healthy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Healthy"},"sync_failure_count":{"type":"integer","title":"Sync Failure Count","default":0}},"type":"object","required":["configured","event_count","entity_count"],"title":"FhirStatusResponse"}}}}
```

## The FhirWriteRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FhirWriteRequest":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"FhirWriteRequest"}}}}
```

## The FieldSaveRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FieldSaveRequest":{"properties":{"value":{"title":"Value","description":"The field value to save"}},"type":"object","required":["value"],"title":"FieldSaveRequest"}}}}
```

## The FieldType object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."}}}}
```

## The ForkAlternative object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ForkAlternative":{"properties":{"caller_text":{"type":"string","maxLength":2000,"title":"Caller Text"},"emotion":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Emotion"},"valence":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"title":"Valence"}},"type":"object","required":["caller_text"],"title":"ForkAlternative"}}}}
```

## The ForkRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ForkRequest":{"properties":{"alternatives":{"items":{"$ref":"#/components/schemas/ForkAlternative"},"type":"array","maxItems":20,"minItems":1,"title":"Alternatives"}},"type":"object","required":["alternatives"],"title":"ForkRequest"},"ForkAlternative":{"properties":{"caller_text":{"type":"string","maxLength":2000,"title":"Caller Text"},"emotion":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Emotion"},"valence":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"title":"Valence"}},"type":"object","required":["caller_text"],"title":"ForkAlternative"}}}}
```

## The FormTemplate-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FormTemplate-Input":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"category":{"type":"string","enum":["intake","update","consent","screening","survey","custom"],"title":"Category","default":"custom"},"patient_type":{"type":"string","enum":["new","returning","any"],"title":"Patient Type","default":"any"},"fields":{"items":{"$ref":"#/components/schemas/FormTemplateField"},"type":"array","maxItems":200,"minItems":1,"title":"Fields"},"sections":{"items":{"$ref":"#/components/schemas/FormTemplateSection"},"type":"array","maxItems":20,"minItems":1,"title":"Sections"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"},"active":{"type":"boolean","title":"Active","default":true},"version":{"type":"integer","minimum":1,"title":"Version","default":1}},"type":"object","required":["name","fields","sections"],"title":"FormTemplate","description":"Reusable form template with sections, prefill, branding.\n\nExtends DataTemplate concept. Up to 200 fields, organized in sections.\nStored in workspace settings[\"form_templates\"] JSONB.\n\nExamples:\n- New patient intake (85 fields, 11 sections)\n- Returning patient update (27 fields, 5 sections)\n- Pre-surgery checklist (15 fields, 3 sections)\n- PHQ-9 screening (10 fields, 1 section)"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"FormTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"},"prefill_path":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Prefill Path","description":"Dot-notation path into entity state for prefill (e.g. demographics.date_of_birth)"},"layout_group":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Layout Group","description":"Row grouping hint — fields with same layout_group render side-by-side"}},"type":"object","required":["key","label"],"title":"FormTemplateField","description":"Extended field with prefill_path mapping to entity state.\n\nUnlike SurfaceField (agent-generated, dynamic), FormTemplateField is\na reusable definition that maps to FHIR/EHR data paths for auto-prefill."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"FormTemplateSection":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["id","title","field_keys"],"title":"FormTemplateSection","description":"A section in a form template (maps to one wizard step)."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."}}}}
```

## The FormTemplate-Output object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FormTemplate-Output":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"category":{"type":"string","enum":["intake","update","consent","screening","survey","custom"],"title":"Category","default":"custom"},"patient_type":{"type":"string","enum":["new","returning","any"],"title":"Patient Type","default":"any"},"fields":{"items":{"$ref":"#/components/schemas/FormTemplateField"},"type":"array","maxItems":200,"minItems":1,"title":"Fields"},"sections":{"items":{"$ref":"#/components/schemas/FormTemplateSection"},"type":"array","maxItems":20,"minItems":1,"title":"Sections"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"},"active":{"type":"boolean","title":"Active","default":true},"version":{"type":"integer","minimum":1,"title":"Version","default":1}},"type":"object","required":["name","fields","sections"],"title":"FormTemplate","description":"Reusable form template with sections, prefill, branding.\n\nExtends DataTemplate concept. Up to 200 fields, organized in sections.\nStored in workspace settings[\"form_templates\"] JSONB.\n\nExamples:\n- New patient intake (85 fields, 11 sections)\n- Returning patient update (27 fields, 5 sections)\n- Pre-surgery checklist (15 fields, 3 sections)\n- PHQ-9 screening (10 fields, 1 section)"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"FormTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"},"prefill_path":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Prefill Path","description":"Dot-notation path into entity state for prefill (e.g. demographics.date_of_birth)"},"layout_group":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Layout Group","description":"Row grouping hint — fields with same layout_group render side-by-side"}},"type":"object","required":["key","label"],"title":"FormTemplateField","description":"Extended field with prefill_path mapping to entity state.\n\nUnlike SurfaceField (agent-generated, dynamic), FormTemplateField is\na reusable definition that maps to FHIR/EHR data paths for auto-prefill."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"FormTemplateSection":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["id","title","field_keys"],"title":"FormTemplateSection","description":"A section in a form template (maps to one wizard step)."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."}}}}
```

## The FormTemplateField object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FormTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"},"prefill_path":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Prefill Path","description":"Dot-notation path into entity state for prefill (e.g. demographics.date_of_birth)"},"layout_group":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Layout Group","description":"Row grouping hint — fields with same layout_group render side-by-side"}},"type":"object","required":["key","label"],"title":"FormTemplateField","description":"Extended field with prefill_path mapping to entity state.\n\nUnlike SurfaceField (agent-generated, dynamic), FormTemplateField is\na reusable definition that maps to FHIR/EHR data paths for auto-prefill."},"NameString":{"type":"string","maxLength":256,"minLength":1},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The FormTemplateListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FormTemplateListResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/FormTemplate-Output"},"type":"array","title":"Templates"}},"type":"object","required":["templates"],"title":"FormTemplateListResponse","description":"List of form templates for a workspace."},"FormTemplate-Output":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"category":{"type":"string","enum":["intake","update","consent","screening","survey","custom"],"title":"Category","default":"custom"},"patient_type":{"type":"string","enum":["new","returning","any"],"title":"Patient Type","default":"any"},"fields":{"items":{"$ref":"#/components/schemas/FormTemplateField"},"type":"array","maxItems":200,"minItems":1,"title":"Fields"},"sections":{"items":{"$ref":"#/components/schemas/FormTemplateSection"},"type":"array","maxItems":20,"minItems":1,"title":"Sections"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"},"active":{"type":"boolean","title":"Active","default":true},"version":{"type":"integer","minimum":1,"title":"Version","default":1}},"type":"object","required":["name","fields","sections"],"title":"FormTemplate","description":"Reusable form template with sections, prefill, branding.\n\nExtends DataTemplate concept. Up to 200 fields, organized in sections.\nStored in workspace settings[\"form_templates\"] JSONB.\n\nExamples:\n- New patient intake (85 fields, 11 sections)\n- Returning patient update (27 fields, 5 sections)\n- Pre-surgery checklist (15 fields, 3 sections)\n- PHQ-9 screening (10 fields, 1 section)"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"FormTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"},"prefill_path":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Prefill Path","description":"Dot-notation path into entity state for prefill (e.g. demographics.date_of_birth)"},"layout_group":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Layout Group","description":"Row grouping hint — fields with same layout_group render side-by-side"}},"type":"object","required":["key","label"],"title":"FormTemplateField","description":"Extended field with prefill_path mapping to entity state.\n\nUnlike SurfaceField (agent-generated, dynamic), FormTemplateField is\na reusable definition that maps to FHIR/EHR data paths for auto-prefill."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"FormTemplateSection":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["id","title","field_keys"],"title":"FormTemplateSection","description":"A section in a form template (maps to one wizard step)."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."}}}}
```

## The FormTemplateSection object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FormTemplateSection":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["id","title","field_keys"],"title":"FormTemplateSection","description":"A section in a form template (maps to one wizard step)."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The FormTemplateUpdateRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FormTemplateUpdateRequest":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/FormTemplate-Input"},"type":"array","maxItems":50,"title":"Templates"}},"type":"object","required":["templates"],"title":"FormTemplateUpdateRequest","description":"Replace all form templates."},"FormTemplate-Input":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"category":{"type":"string","enum":["intake","update","consent","screening","survey","custom"],"title":"Category","default":"custom"},"patient_type":{"type":"string","enum":["new","returning","any"],"title":"Patient Type","default":"any"},"fields":{"items":{"$ref":"#/components/schemas/FormTemplateField"},"type":"array","maxItems":200,"minItems":1,"title":"Fields"},"sections":{"items":{"$ref":"#/components/schemas/FormTemplateSection"},"type":"array","maxItems":20,"minItems":1,"title":"Sections"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"},"active":{"type":"boolean","title":"Active","default":true},"version":{"type":"integer","minimum":1,"title":"Version","default":1}},"type":"object","required":["name","fields","sections"],"title":"FormTemplate","description":"Reusable form template with sections, prefill, branding.\n\nExtends DataTemplate concept. Up to 200 fields, organized in sections.\nStored in workspace settings[\"form_templates\"] JSONB.\n\nExamples:\n- New patient intake (85 fields, 11 sections)\n- Returning patient update (27 fields, 5 sections)\n- Pre-surgery checklist (15 fields, 3 sections)\n- PHQ-9 screening (10 fields, 1 section)"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"FormTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"},"prefill_path":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Prefill Path","description":"Dot-notation path into entity state for prefill (e.g. demographics.date_of_birth)"},"layout_group":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Layout Group","description":"Row grouping hint — fields with same layout_group render side-by-side"}},"type":"object","required":["key","label"],"title":"FormTemplateField","description":"Extended field with prefill_path mapping to entity state.\n\nUnlike SurfaceField (agent-generated, dynamic), FormTemplateField is\na reusable definition that maps to FHIR/EHR data paths for auto-prefill."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"FormTemplateSection":{"properties":{"id":{"type":"string","maxLength":64,"minLength":1,"title":"Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["id","title","field_keys"],"title":"FormTemplateSection","description":"A section in a form template (maps to one wizard step)."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."}}}}
```

## The ForwardingConfigRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ForwardingConfigRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"forward_to":{"type":"string","title":"Forward To"},"should_disconnect":{"type":"boolean","title":"Should Disconnect","default":true}},"type":"object","required":["forward_to"],"title":"ForwardingConfigRequest","description":"Call forwarding configuration for create/update requests."}}}}
```

## The ForwardingConfigResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ForwardingConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"forward_to":{"type":"string","title":"Forward To"},"should_disconnect":{"type":"boolean","title":"Should Disconnect"}},"type":"object","required":["enabled","forward_to","should_disconnect"],"title":"ForwardingConfigResponse"}}}}
```

## The FunctionCreateRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FunctionCreateRequest":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"catalog":{"type":"string","maxLength":128,"title":"Catalog","default":"world"},"schema":{"type":"string","maxLength":128,"title":"Schema","default":"functions"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"returns_table":{"type":"boolean","title":"Returns Table","default":true},"function_type":{"type":"string","maxLength":32,"title":"Function Type","default":"sql"}},"type":"object","required":["name"],"title":"FunctionCreateRequest","description":"Register a new function. Name must be unique within the workspace."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The FunctionDef object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FunctionDef":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"catalog":{"type":"string","maxLength":128,"title":"Catalog","default":"world"},"schema":{"type":"string","maxLength":128,"title":"Schema","default":"functions"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"returns_table":{"type":"boolean","title":"Returns Table","default":true},"enabled":{"type":"boolean","title":"Enabled","default":true},"function_type":{"type":"string","maxLength":32,"title":"Function Type","description":"sql | python | udtf | ai","default":"sql"}},"type":"object","required":["name"],"title":"FunctionDef","description":"A registered platform function."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The FunctionListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FunctionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FunctionDef"},"type":"array","title":"Items"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["items","count"],"title":"FunctionListResponse"},"FunctionDef":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"catalog":{"type":"string","maxLength":128,"title":"Catalog","default":"world"},"schema":{"type":"string","maxLength":128,"title":"Schema","default":"functions"},"description":{"$ref":"#/components/schemas/DescriptionString","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"returns_table":{"type":"boolean","title":"Returns Table","default":true},"enabled":{"type":"boolean","title":"Enabled","default":true},"function_type":{"type":"string","maxLength":32,"title":"Function Type","description":"sql | python | udtf | ai","default":"sql"}},"type":"object","required":["name"],"title":"FunctionDef","description":"A registered platform function."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The FunctionTestRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FunctionTestRequest":{"properties":{"input_params":{"additionalProperties":true,"type":"object","title":"Input Params"}},"type":"object","title":"FunctionTestRequest","description":"Test a function with sample input."}}}}
```

## The FunctionTestResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"FunctionTestResponse":{"properties":{"result":{"title":"Result"},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"function_name":{"type":"string","title":"Function Name","default":""}},"type":"object","title":"FunctionTestResponse"}}}}
```

## The GapRequiredField object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"GapRequiredField":{"properties":{"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"min_items":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Min Items","description":"For list fields, minimum items required"}},"type":"object","required":["path","label"],"title":"GapRequiredField","description":"A field that must be present in entity state."},"NameString":{"type":"string","maxLength":256,"minLength":1},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."}}}}
```

## The GapRequirement-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"GapRequirement-Input":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"entity_type":{"type":"string","const":"person","title":"Entity Type","default":"person"},"trigger":{"type":"string","enum":["upcoming_appointment","recent_interaction"],"title":"Trigger","default":"upcoming_appointment"},"required_fields":{"items":{"$ref":"#/components/schemas/GapRequiredField"},"type":"array","maxItems":50,"minItems":1,"title":"Required Fields"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"sms"},"priority":{"type":"string","enum":["low","normal","high"],"title":"Priority","default":"normal"},"surface_title":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}],"description":"Title for generated surfaces. Defaults to requirement name."},"surface_description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","required":["name","required_fields"],"title":"GapRequirement","description":"A named gap detection rule."},"NameString":{"type":"string","maxLength":256,"minLength":1},"GapRequiredField":{"properties":{"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"min_items":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Min Items","description":"For list fields, minimum items required"}},"type":"object","required":["path","label"],"title":"GapRequiredField","description":"A field that must be present in entity state."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The GapRequirement-Output object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"GapRequirement-Output":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"entity_type":{"type":"string","const":"person","title":"Entity Type","default":"person"},"trigger":{"type":"string","enum":["upcoming_appointment","recent_interaction"],"title":"Trigger","default":"upcoming_appointment"},"required_fields":{"items":{"$ref":"#/components/schemas/GapRequiredField"},"type":"array","maxItems":50,"minItems":1,"title":"Required Fields"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"sms"},"priority":{"type":"string","enum":["low","normal","high"],"title":"Priority","default":"normal"},"surface_title":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}],"description":"Title for generated surfaces. Defaults to requirement name."},"surface_description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","required":["name","required_fields"],"title":"GapRequirement","description":"A named gap detection rule."},"NameString":{"type":"string","maxLength":256,"minLength":1},"GapRequiredField":{"properties":{"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"min_items":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Min Items","description":"For list fields, minimum items required"}},"type":"object","required":["path","label"],"title":"GapRequiredField","description":"A field that must be present in entity state."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The GapScannerPreviewRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"GapScannerPreviewRequest":{"properties":{"limit":{"type":"integer","maximum":200,"minimum":1,"title":"Limit","default":50}},"type":"object","title":"GapScannerPreviewRequest"}}}}
```

## The GapScannerSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"GapScannerSettingsRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"scan_interval_seconds":{"anyOf":[{"type":"integer","maximum":86400,"minimum":60},{"type":"null"}],"title":"Scan Interval Seconds"},"appointment_lookahead_hours":{"anyOf":[{"type":"integer","maximum":720,"minimum":1},{"type":"null"}],"title":"Appointment Lookahead Hours"},"cooldown_hours":{"anyOf":[{"type":"integer","maximum":8760,"minimum":1},{"type":"null"}],"title":"Cooldown Hours"},"max_surfaces_per_tick":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Max Surfaces Per Tick"},"max_pending_surfaces":{"anyOf":[{"type":"integer","maximum":50,"minimum":0},{"type":"null"}],"title":"Max Pending Surfaces","description":"Max non-terminal surfaces per entity (0 = disabled)"},"min_completion_rate":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}],"title":"Min Completion Rate","description":"Min historical completion rate to create new surfaces (0.0 = disabled)"},"channel_optimization":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Channel Optimization","description":"Use entity preferred channel over static requirement channel"},"requirements":{"anyOf":[{"items":{"$ref":"#/components/schemas/GapRequirement-Input"},"type":"array","maxItems":100},{"type":"null"}],"title":"Requirements"}},"type":"object","title":"GapScannerSettingsRequest"},"GapRequirement-Input":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"entity_type":{"type":"string","const":"person","title":"Entity Type","default":"person"},"trigger":{"type":"string","enum":["upcoming_appointment","recent_interaction"],"title":"Trigger","default":"upcoming_appointment"},"required_fields":{"items":{"$ref":"#/components/schemas/GapRequiredField"},"type":"array","maxItems":50,"minItems":1,"title":"Required Fields"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"sms"},"priority":{"type":"string","enum":["low","normal","high"],"title":"Priority","default":"normal"},"surface_title":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}],"description":"Title for generated surfaces. Defaults to requirement name."},"surface_description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","required":["name","required_fields"],"title":"GapRequirement","description":"A named gap detection rule."},"NameString":{"type":"string","maxLength":256,"minLength":1},"GapRequiredField":{"properties":{"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"min_items":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Min Items","description":"For list fields, minimum items required"}},"type":"object","required":["path","label"],"title":"GapRequiredField","description":"A field that must be present in entity state."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The GapScannerSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"GapScannerSettingsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"scan_interval_seconds":{"type":"integer","title":"Scan Interval Seconds"},"appointment_lookahead_hours":{"type":"integer","title":"Appointment Lookahead Hours"},"cooldown_hours":{"type":"integer","title":"Cooldown Hours"},"max_surfaces_per_tick":{"type":"integer","title":"Max Surfaces Per Tick"},"max_pending_surfaces":{"type":"integer","title":"Max Pending Surfaces"},"min_completion_rate":{"type":"number","title":"Min Completion Rate"},"channel_optimization":{"type":"boolean","title":"Channel Optimization"},"requirements":{"items":{"$ref":"#/components/schemas/GapRequirement-Output"},"type":"array","title":"Requirements"}},"type":"object","required":["enabled","scan_interval_seconds","appointment_lookahead_hours","cooldown_hours","max_surfaces_per_tick","max_pending_surfaces","min_completion_rate","channel_optimization","requirements"],"title":"GapScannerSettingsResponse"},"GapRequirement-Output":{"properties":{"name":{"$ref":"#/components/schemas/NameString"},"entity_type":{"type":"string","const":"person","title":"Entity Type","default":"person"},"trigger":{"type":"string","enum":["upcoming_appointment","recent_interaction"],"title":"Trigger","default":"upcoming_appointment"},"required_fields":{"items":{"$ref":"#/components/schemas/GapRequiredField"},"type":"array","maxItems":50,"minItems":1,"title":"Required Fields"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"sms"},"priority":{"type":"string","enum":["low","normal","high"],"title":"Priority","default":"normal"},"surface_title":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}],"description":"Title for generated surfaces. Defaults to requirement name."},"surface_description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","required":["name","required_fields"],"title":"GapRequirement","description":"A named gap detection rule."},"NameString":{"type":"string","maxLength":256,"minLength":1},"GapRequiredField":{"properties":{"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"min_items":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Min Items","description":"For list fields, minimum items required"}},"type":"object","required":["path","label"],"title":"GapRequiredField","description":"A field that must be present in entity state."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The Guardrail object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."}}}}
```

## The HTTPValidationError object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## The HardEscalationRule object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"HardEscalationRule":{"properties":{"name":{"type":"string","title":"Name"},"operator_type":{"type":"string","title":"Operator Type"},"reason":{"type":"string","title":"Reason"},"regulatory_basis":{"type":"string","title":"Regulatory Basis"},"immediate":{"type":"boolean","title":"Immediate","default":false},"detection":{"type":"string","enum":["intent","state","fhir"],"title":"Detection"},"intent_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Intent Patterns"}},"type":"object","required":["name","operator_type","reason","regulatory_basis","detection"],"title":"HardEscalationRule","description":"Non-negotiable escalation rule for healthcare compliance."}}}}
```

## The HealFieldRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"HealFieldRequest":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"value":{"type":"string","maxLength":2000,"minLength":1,"title":"Value"},"field_type":{"type":"string","maxLength":32,"title":"Field Type"},"label":{"type":"string","maxLength":256,"title":"Label"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"context":{"additionalProperties":true,"type":"object","title":"Context"}},"type":"object","required":["key","value","field_type","label"],"title":"HealFieldRequest"}}}}
```

## The HealthSyncResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"HealthSyncResponse":{"properties":{"healthy":{"type":"boolean","title":"Healthy"},"pending_count":{"type":"integer","title":"Pending Count"},"failed_count":{"type":"integer","title":"Failed Count"},"oldest_pending_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Oldest Pending Minutes"},"last_sync_success_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Success At"},"connector_heartbeats":{"items":{"$ref":"#/components/schemas/ConnectorHeartbeat"},"type":"array","title":"Connector Heartbeats"}},"type":"object","required":["healthy","pending_count","failed_count"],"title":"HealthSyncResponse"},"ConnectorHeartbeat":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"alive":{"type":"boolean","title":"Alive"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"}},"type":"object","required":["data_source_id","name","alive"],"title":"ConnectorHeartbeat"}}}}
```

## The HipaaReportResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"HipaaReportResponse":{"properties":{"generated_at":{"type":"string","title":"Generated At"},"report_period_days":{"type":"integer","title":"Report Period Days"},"workspace_id":{"type":"string","title":"Workspace Id"},"audit_summary":{"additionalProperties":true,"type":"object","title":"Audit Summary"},"retention_policy":{"additionalProperties":true,"type":"object","title":"Retention Policy"},"encryption":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Encryption"},"access_controls":{"additionalProperties":true,"type":"object","title":"Access Controls"},"api_key_summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Api Key Summary"},"compliance_status":{"type":"string","title":"Compliance Status"}},"type":"object","required":["generated_at","report_period_days","workspace_id","audit_summary","retention_policy","encryption","access_controls","api_key_summary","compliance_status"],"title":"HipaaReportResponse"}}}}
```

## The Identity object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"Identity":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"default_spoken_language":{"type":"string","title":"Default Spoken Language"},"relationship_to_developer":{"$ref":"#/components/schemas/RelationshipToDeveloper"}},"type":"object","required":["name","role","developed_by","default_spoken_language","relationship_to_developer"],"title":"Identity"},"RelationshipToDeveloper":{"properties":{"ownership":{"type":"string","title":"Ownership"},"type":{"type":"string","title":"Type"},"conversation_visibility":{"type":"string","title":"Conversation Visibility"},"thought_visibility":{"type":"string","title":"Thought Visibility"}},"type":"object","required":["ownership","type","conversation_visibility","thought_visibility"],"title":"RelationshipToDeveloper"}}}}
```

## The IdentityMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"IdentityMetrics":{"properties":{"active_api_keys":{"type":"integer","title":"Active Api Keys","default":0},"active_sessions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Sessions"},"failed_auths_1h":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Failed Auths 1H"},"locked_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Locked Accounts"},"mfa_coverage_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mfa Coverage Pct"}},"type":"object","title":"IdentityMetrics"}}}}
```

## The InjectRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InjectRequest":{"properties":{"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"},"sender":{"type":"string","maxLength":200,"title":"Sender","default":"System"},"event_type":{"type":"string","enum":["external_event","guidance"],"title":"Event Type","description":"external_event (factual info) or guidance (instructional)","default":"external_event"}},"type":"object","required":["message"],"title":"InjectRequest"}}}}
```

## The InjectResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InjectResponse":{"properties":{"status":{"type":"string","title":"Status"},"call_sid":{"type":"string","title":"Call Sid"}},"type":"object","required":["status","call_sid"],"title":"InjectResponse"}}}}
```

## The IntegrationResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"IntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled"},"builtin":{"type":"boolean","title":"Builtin","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name","protocol","enabled","created_at","updated_at"],"title":"IntegrationResponse"},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The IntegrationToolRef-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"IntegrationToolRef-Input":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef","description":"Reference to an integration endpoint by integration + endpoint name."}}}}
```

## The InternalForwardingResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InternalForwardingResponse":{"properties":{"forward_to":{"type":"string","title":"Forward To"},"should_disconnect":{"type":"boolean","title":"Should Disconnect"}},"type":"object","required":["forward_to","should_disconnect"],"title":"InternalForwardingResponse","description":"Resolved forwarding config for a phone number."}}}}
```

## The InternalIntegrationResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InternalIntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol","default":"rest"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"builtin":{"type":"boolean","title":"Builtin","default":false},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name"],"title":"InternalIntegrationResponse","description":"Wire format matching platform_lib.integrations.models.IntegrationConfig."},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The InternalIntegrationsListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InternalIntegrationsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InternalIntegrationResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"InternalIntegrationsListResponse"},"InternalIntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol","default":"rest"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"builtin":{"type":"boolean","title":"Builtin","default":false},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name"],"title":"InternalIntegrationResponse","description":"Wire format matching platform_lib.integrations.models.IntegrationConfig."},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The InternalServiceConfigResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InternalServiceConfigResponse":{"properties":{"service":{"$ref":"#/components/schemas/Service"},"agent_version":{"$ref":"#/components/schemas/AgentVersion"},"context_graph_version":{"$ref":"#/components/schemas/ContextGraphVersion"}},"type":"object","required":["service","agent_version","context_graph_version"],"title":"InternalServiceConfigResponse","description":"Composite response matching ServiceConfig shape for voice-agent consumption."},"Service":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"agent_id":{"type":"string","title":"Agent Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"keyterms":{"items":{"type":"string"},"type":"array","title":"Keyterms"},"is_active":{"type":"boolean","title":"Is Active"},"version_sets":{"additionalProperties":{"$ref":"#/components/schemas/VersionSet"},"type":"object","title":"Version Sets"},"tags":{"items":{"$ref":"#/components/schemas/ServiceTag"},"type":"array","title":"Tags"},"tool_capacity":{"type":"integer","title":"Tool Capacity","default":3},"safety_filters_enabled":{"type":"boolean","title":"Safety Filters Enabled","default":true},"channel_type":{"type":"string","enum":["voice","text","scribe"],"title":"Channel Type","default":"voice"},"environment":{"type":"string","enum":["sandbox","production"],"title":"Environment","default":"production"},"persona_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Id"},"risk_signal_config":{"anyOf":[{"$ref":"#/components/schemas/RiskSignalConfig"},{"type":"null"}]},"hard_escalation_rules":{"items":{"$ref":"#/components/schemas/HardEscalationRule"},"type":"array","title":"Hard Escalation Rules","default":[]},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/ServiceVoiceConfig"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","description","agent_id","context_graph_id","keyterms","is_active","version_sets","tags"],"title":"Service","description":"A service links an agent + context graph + version sets."},"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"},"ServiceTag":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key"],"title":"ServiceTag"},"RiskSignalConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"weights":{"additionalProperties":{"type":"number"},"type":"object","title":"Weights","default":{}},"auto_escalate_threshold":{"type":"number","title":"Auto Escalate Threshold","default":70},"alert_threshold":{"type":"number","title":"Alert Threshold","default":50},"monitor_threshold":{"type":"number","title":"Monitor Threshold","default":30}},"type":"object","title":"RiskSignalConfig","description":"Per-workspace risk scoring config. Stored on Service."},"HardEscalationRule":{"properties":{"name":{"type":"string","title":"Name"},"operator_type":{"type":"string","title":"Operator Type"},"reason":{"type":"string","title":"Reason"},"regulatory_basis":{"type":"string","title":"Regulatory Basis"},"immediate":{"type":"boolean","title":"Immediate","default":false},"detection":{"type":"string","enum":["intent","state","fhir"],"title":"Detection"},"intent_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Intent Patterns"}},"type":"object","required":["name","operator_type","reason","regulatory_basis","detection"],"title":"HardEscalationRule","description":"Non-negotiable escalation rule for healthcare compliance."},"ServiceVoiceConfig":{"properties":{"tts_model":{"anyOf":[{"type":"string","enum":["sonic-turbo","sonic-3"]},{"type":"null"}],"title":"Tts Model"},"max_buffer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Buffer Delay Ms"},"eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eager Eot Threshold"},"eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eot Timeout Ms"},"filler_style":{"type":"string","enum":["backchannel","phrase","silent"],"title":"Filler Style","default":"backchannel"},"filler_vocabulary":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filler Vocabulary"},"backchannel_delay_ms":{"type":"integer","title":"Backchannel Delay Ms","default":400},"max_response_sentences":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Sentences"},"max_response_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Words"},"barge_in_min_speech_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Min Speech S"},"barge_in_cooldown_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Cooldown S"},"forward_call_enabled":{"type":"boolean","title":"Forward Call Enabled","default":false}},"type":"object","title":"ServiceVoiceConfig","description":"Per-service voice pipeline tuning. Overrides workspace/env defaults.\n\nEach field is optional — None means inherit from the layer above\n(workspace VoiceSettings → env vars → hardcoded defaults)."},"AgentVersion":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"version":{"type":"integer","title":"Version"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"initials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initials"},"identity":{"$ref":"#/components/schemas/Identity"},"background":{"type":"string","title":"Background"},"behaviors":{"items":{"type":"string"},"type":"array","title":"Behaviors"},"communication_patterns":{"items":{"type":"string"},"type":"array","title":"Communication Patterns"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/VoiceConfig"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","agent_id","version","identity","background","behaviors","communication_patterns"],"title":"AgentVersion","description":"A version of an Agent document."},"Identity":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"default_spoken_language":{"type":"string","title":"Default Spoken Language"},"relationship_to_developer":{"$ref":"#/components/schemas/RelationshipToDeveloper"}},"type":"object","required":["name","role","developed_by","default_spoken_language","relationship_to_developer"],"title":"Identity"},"RelationshipToDeveloper":{"properties":{"ownership":{"type":"string","title":"Ownership"},"type":{"type":"string","title":"Type"},"conversation_visibility":{"type":"string","title":"Conversation Visibility"},"thought_visibility":{"type":"string","title":"Thought Visibility"}},"type":"object","required":["ownership","type","conversation_visibility","thought_visibility"],"title":"RelationshipToDeveloper"},"VoiceConfig":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"stability":{"type":"number","title":"Stability","default":0},"similarity_boost":{"type":"number","title":"Similarity Boost","default":0},"style":{"type":"number","title":"Style","default":0}},"type":"object","required":["voice_id"],"title":"VoiceConfig"},"ContextGraphVersion":{"properties":{"id":{"type":"string","title":"Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"states":{"items":{"$ref":"#/components/schemas/ContextGraphState-Output"},"type":"array","title":"States"},"new_user_initial_state":{"type":"string","title":"New User Initial State"},"returning_user_initial_state":{"type":"string","title":"Returning User Initial State"},"terminal_state":{"type":"string","title":"Terminal State"},"global_intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Intra State Navigation Guidelines","default":[]},"global_action_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Action Guidelines","default":[]},"global_boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Global Boundary Constraints","default":[]},"topology_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topology Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","context_graph_id","version","description","states","new_user_initial_state","returning_user_initial_state","terminal_state"],"title":"ContextGraphVersion","description":"A version of a hierarchical state machine (context graph)."},"ContextGraphState-Output":{"oneOf":[{"$ref":"#/components/schemas/ActionState"},{"$ref":"#/components/schemas/DecisionState"},{"$ref":"#/components/schemas/AnnotationState"},{"$ref":"#/components/schemas/DataCollectionState"}],"discriminator":{"propertyName":"type","mapping":{"action":"#/components/schemas/ActionState","annotation":"#/components/schemas/AnnotationState","data_collection":"#/components/schemas/DataCollectionState","decision":"#/components/schemas/DecisionState"}}},"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."},"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The InternalSkillResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InternalSkillResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"result_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Schema"},"model":{"type":"string","title":"Model","default":"claude-sonnet-4-6"},"max_tokens":{"type":"integer","title":"Max Tokens","default":4096},"max_result_chars":{"type":"integer","title":"Max Result Chars","default":2000},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"timeout_s":{"type":"number","title":"Timeout S","default":60},"thinking_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Thinking Effort"},"enable_caching":{"type":"boolean","title":"Enable Caching","default":true},"enable_citations":{"type":"boolean","title":"Enable Citations","default":false},"use_structured_output":{"type":"boolean","title":"Use Structured Output","default":false},"integration_tools":{"items":{"$ref":"#/components/schemas/src__routes__internal_skills__IntegrationToolRef"},"type":"array","title":"Integration Tools","default":[]},"static_tools":{"items":{"$ref":"#/components/schemas/src__routes__internal_skills__StaticToolDef"},"type":"array","title":"Static Tools","default":[]},"delivery":{"type":"string","enum":["interrupt","queue"],"title":"Delivery","default":"interrupt"},"urgency_keywords":{"items":{"type":"string"},"type":"array","title":"Urgency Keywords","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"execution_tier":{"type":"string","enum":["direct","orchestrated","autonomous","browser"],"title":"Execution Tier","default":"orchestrated"},"max_agent_turns":{"type":"integer","title":"Max Agent Turns","default":20},"checkpoint_enabled":{"type":"boolean","title":"Checkpoint Enabled","default":true},"approval_required":{"type":"boolean","title":"Approval Required","default":false},"browser_start_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Start Url"},"browser_allowed_domains":{"items":{"type":"string"},"type":"array","title":"Browser Allowed Domains","default":[]},"browser_auth_integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Auth Integration"},"version":{"type":"integer","title":"Version","default":1}},"type":"object","required":["id","workspace_id","slug","name","description"],"title":"InternalSkillResponse"},"src__routes__internal_skills__IntegrationToolRef":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef"},"src__routes__internal_skills__StaticToolDef":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef"}}}}
```

## The InternalSkillsListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InternalSkillsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InternalSkillResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"InternalSkillsListResponse"},"InternalSkillResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"result_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Schema"},"model":{"type":"string","title":"Model","default":"claude-sonnet-4-6"},"max_tokens":{"type":"integer","title":"Max Tokens","default":4096},"max_result_chars":{"type":"integer","title":"Max Result Chars","default":2000},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"timeout_s":{"type":"number","title":"Timeout S","default":60},"thinking_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Thinking Effort"},"enable_caching":{"type":"boolean","title":"Enable Caching","default":true},"enable_citations":{"type":"boolean","title":"Enable Citations","default":false},"use_structured_output":{"type":"boolean","title":"Use Structured Output","default":false},"integration_tools":{"items":{"$ref":"#/components/schemas/src__routes__internal_skills__IntegrationToolRef"},"type":"array","title":"Integration Tools","default":[]},"static_tools":{"items":{"$ref":"#/components/schemas/src__routes__internal_skills__StaticToolDef"},"type":"array","title":"Static Tools","default":[]},"delivery":{"type":"string","enum":["interrupt","queue"],"title":"Delivery","default":"interrupt"},"urgency_keywords":{"items":{"type":"string"},"type":"array","title":"Urgency Keywords","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"execution_tier":{"type":"string","enum":["direct","orchestrated","autonomous","browser"],"title":"Execution Tier","default":"orchestrated"},"max_agent_turns":{"type":"integer","title":"Max Agent Turns","default":20},"checkpoint_enabled":{"type":"boolean","title":"Checkpoint Enabled","default":true},"approval_required":{"type":"boolean","title":"Approval Required","default":false},"browser_start_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Start Url"},"browser_allowed_domains":{"items":{"type":"string"},"type":"array","title":"Browser Allowed Domains","default":[]},"browser_auth_integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Auth Integration"},"version":{"type":"integer","title":"Version","default":1}},"type":"object","required":["id","workspace_id","slug","name","description"],"title":"InternalSkillResponse"},"src__routes__internal_skills__IntegrationToolRef":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef"},"src__routes__internal_skills__StaticToolDef":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef"}}}}
```

## The InvoiceItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"InvoiceItem":{"properties":{"id":{"type":"string","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"subtotal":{"type":"string","title":"Subtotal"},"adjustments":{"type":"string","title":"Adjustments"},"total":{"type":"string","title":"Total"},"status":{"type":"string","title":"Status"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items"},"pdf_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf S3 Key"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","customer_id","invoice_number","period_start","period_end","subtotal","adjustments","total","status","line_items","pdf_s3_key","sent_at","paid_at","created_at","updated_at"],"title":"InvoiceItem"}}}}
```

## The JoinCallRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"JoinCallRequest":{"properties":{"call_sid":{"type":"string","maxLength":64,"minLength":1,"title":"Call Sid"},"mode":{"type":"string","enum":["listen","takeover"],"title":"Mode","default":"takeover"}},"type":"object","required":["call_sid"],"title":"JoinCallRequest","description":"Request to join an active call as operator."}}}}
```

## The JoinCallResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"JoinCallResponse":{"properties":{"participant_call_sid":{"type":"string","title":"Participant Call Sid"},"conference_sid":{"type":"string","title":"Conference Sid"},"mode":{"type":"string","title":"Mode"},"operator_entity_id":{"type":"string","title":"Operator Entity Id"}},"type":"object","required":["participant_call_sid","conference_sid","mode","operator_entity_id"],"title":"JoinCallResponse","description":"Confirmation of operator joining a call's conference."}}}}
```

## The KeyMoment object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"KeyMoment":{"properties":{"turn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn"},"type":{"type":"string","title":"Type"},"severity":{"type":"string","title":"Severity","default":"warning"},"description":{"type":"string","title":"Description"}},"type":"object","required":["type","description"],"title":"KeyMoment","description":"Notable event during the call worth highlighting."}}}}
```

## The LLMConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"}}}}
```

## The LastPollInfo object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"LastPollInfo":{"properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"At"},"duration_ms":{"type":"integer","title":"Duration Ms","default":0},"event_count":{"type":"integer","title":"Event Count","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"LastPollInfo"}}}}
```

## The LeaveCallRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"LeaveCallRequest":{"properties":{"call_sid":{"type":"string","maxLength":64,"minLength":1,"title":"Call Sid"}},"type":"object","required":["call_sid"],"title":"LeaveCallRequest","description":"Request to remove operator from an active call."}}}}
```

## The LeaveCallResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"LeaveCallResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"LeaveCallResponse"}}}}
```

## The MarkSyncedRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MarkSyncedRequest":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"},"sync_error":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Sync Error"},"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"}},"type":"object","required":["event_id"],"title":"MarkSyncedRequest"}}}}
```

## The MemoryAnalyticsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MemoryAnalyticsResponse":{"properties":{"total_entities_with_memory":{"type":"integer","title":"Total Entities With Memory"},"total_entities_in_workspace":{"type":"integer","title":"Total Entities In Workspace"},"coverage_rate":{"type":"number","title":"Coverage Rate"},"total_facts":{"type":"integer","title":"Total Facts"},"dimensions":{"items":{"$ref":"#/components/schemas/DimensionAnalytics"},"type":"array","title":"Dimensions"},"top_sources":{"items":{"$ref":"#/components/schemas/TopSource"},"type":"array","title":"Top Sources"},"facts_last_24h":{"type":"integer","title":"Facts Last 24H"},"facts_last_7d":{"type":"integer","title":"Facts Last 7D"},"facts_last_30d":{"type":"integer","title":"Facts Last 30D"},"active_dimensions":{"type":"integer","title":"Active Dimensions"},"builtin_dimensions":{"type":"integer","title":"Builtin Dimensions"},"custom_dimensions":{"type":"integer","title":"Custom Dimensions"},"llm_dimensions":{"type":"integer","title":"Llm Dimensions"}},"type":"object","required":["total_entities_with_memory","total_entities_in_workspace","coverage_rate","total_facts","dimensions","top_sources","facts_last_24h","facts_last_7d","facts_last_30d","active_dimensions","builtin_dimensions","custom_dimensions","llm_dimensions"],"title":"MemoryAnalyticsResponse"},"DimensionAnalytics":{"properties":{"dimension":{"type":"string","title":"Dimension"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"weight":{"type":"number","title":"Weight"},"extraction_mode":{"type":"string","title":"Extraction Mode"},"active":{"type":"boolean","title":"Active"},"builtin":{"type":"boolean","title":"Builtin"},"entity_count":{"type":"integer","title":"Entity Count"},"total_facts":{"type":"integer","title":"Total Facts"},"avg_facts_per_entity":{"type":"number","title":"Avg Facts Per Entity"},"avg_confidence":{"type":"number","title":"Avg Confidence"},"source_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Source Breakdown"},"latest_fact_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Fact At"}},"type":"object","required":["dimension","name","description","weight","extraction_mode","active","builtin","entity_count","total_facts","avg_facts_per_entity","avg_confidence","source_breakdown","latest_fact_at"],"title":"DimensionAnalytics","description":"Per-dimension aggregate stats across all entities."},"TopSource":{"properties":{"source":{"type":"string","title":"Source"},"fact_count":{"type":"integer","title":"Fact Count"},"entity_count":{"type":"integer","title":"Entity Count"}},"type":"object","required":["source","fact_count","entity_count"],"title":"TopSource"}}}}
```

## The MemoryDimension object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MemoryDimension":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Key","description":"Lowercase slug used as column key (e.g. 'clinical', 'cosmetic_preference')"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"event_types":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Event Types","description":"Event types to scan (e.g. 'patient.created', 'condition.created', 'surface.submitted')"},"extract_paths":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Extract Paths","description":"JSONB paths for static extraction (e.g. '$.active_conditions'). Ignored when extraction_mode='llm'."},"extraction_mode":{"type":"string","enum":["static","llm"],"title":"Extraction Mode","description":"'static' uses extract_paths (fast, free). 'llm' uses ai_extract with description as prompt (semantic, incremental).","default":"static"},"weight":{"type":"number","maximum":10,"minimum":0,"title":"Weight","description":"Relative importance for scoring (higher = more important)","default":1},"active":{"type":"boolean","title":"Active","default":true},"builtin":{"type":"boolean","title":"Builtin","description":"True for platform-provided dimensions (read-only key)","default":false}},"type":"object","required":["key","name","event_types"],"title":"MemoryDimension","description":"A single memory dimension — defines what facts to extract from events.\n\nTwo extraction modes:\n- static: uses extract_paths (JSONPath) for fast, free extraction\n- llm: uses ai_extract with the dimension description as prompt\n  for semantic extraction. Only runs on new events (incremental MV refresh)."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The MemoryFact object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MemoryFact":{"properties":{"dimension":{"type":"string","title":"Dimension"},"event_type":{"type":"string","title":"Event Type"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"confidence":{"type":"number","title":"Confidence"},"extracted_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted Text"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"}},"type":"object","required":["dimension","event_type","source","confidence","extracted_text","ingested_at"],"title":"MemoryFact"}}}}
```

## The MemoryFactsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MemoryFactsResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dimension"},"facts":{"items":{"$ref":"#/components/schemas/MemoryFact"},"type":"array","title":"Facts"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entity_id","dimension","facts","total"],"title":"MemoryFactsResponse"},"MemoryFact":{"properties":{"dimension":{"type":"string","title":"Dimension"},"event_type":{"type":"string","title":"Event Type"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"confidence":{"type":"number","title":"Confidence"},"extracted_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted Text"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"}},"type":"object","required":["dimension","event_type","source","confidence","extracted_text","ingested_at"],"title":"MemoryFact"}}}}
```

## The MemorySettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MemorySettingsRequest":{"properties":{"dimensions":{"anyOf":[{"items":{"$ref":"#/components/schemas/MemoryDimension"},"type":"array"},{"type":"null"}],"title":"Dimensions"},"backfill_requested":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Backfill Requested"}},"type":"object","title":"MemorySettingsRequest","description":"Partial update — only provided fields are changed.\n\nThe dimensions list is replaced entirely when provided.\nBuilt-in dimensions can be deactivated (active=false) or have their\nweight changed, but their key cannot be reused for custom dimensions."},"MemoryDimension":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Key","description":"Lowercase slug used as column key (e.g. 'clinical', 'cosmetic_preference')"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"event_types":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Event Types","description":"Event types to scan (e.g. 'patient.created', 'condition.created', 'surface.submitted')"},"extract_paths":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Extract Paths","description":"JSONB paths for static extraction (e.g. '$.active_conditions'). Ignored when extraction_mode='llm'."},"extraction_mode":{"type":"string","enum":["static","llm"],"title":"Extraction Mode","description":"'static' uses extract_paths (fast, free). 'llm' uses ai_extract with description as prompt (semantic, incremental).","default":"static"},"weight":{"type":"number","maximum":10,"minimum":0,"title":"Weight","description":"Relative importance for scoring (higher = more important)","default":1},"active":{"type":"boolean","title":"Active","default":true},"builtin":{"type":"boolean","title":"Builtin","description":"True for platform-provided dimensions (read-only key)","default":false}},"type":"object","required":["key","name","event_types"],"title":"MemoryDimension","description":"A single memory dimension — defines what facts to extract from events.\n\nTwo extraction modes:\n- static: uses extract_paths (JSONPath) for fast, free extraction\n- llm: uses ai_extract with the dimension description as prompt\n  for semantic extraction. Only runs on new events (incremental MV refresh)."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The MemorySettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MemorySettingsResponse":{"properties":{"dimensions":{"items":{"$ref":"#/components/schemas/MemoryDimension"},"type":"array","title":"Dimensions"},"backfill_requested":{"type":"boolean","title":"Backfill Requested"}},"type":"object","required":["dimensions","backfill_requested"],"title":"MemorySettingsResponse"},"MemoryDimension":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Key","description":"Lowercase slug used as column key (e.g. 'clinical', 'cosmetic_preference')"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"event_types":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Event Types","description":"Event types to scan (e.g. 'patient.created', 'condition.created', 'surface.submitted')"},"extract_paths":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Extract Paths","description":"JSONB paths for static extraction (e.g. '$.active_conditions'). Ignored when extraction_mode='llm'."},"extraction_mode":{"type":"string","enum":["static","llm"],"title":"Extraction Mode","description":"'static' uses extract_paths (fast, free). 'llm' uses ai_extract with description as prompt (semantic, incremental).","default":"static"},"weight":{"type":"number","maximum":10,"minimum":0,"title":"Weight","description":"Relative importance for scoring (higher = more important)","default":1},"active":{"type":"boolean","title":"Active","default":true},"builtin":{"type":"boolean","title":"Builtin","description":"True for platform-provided dimensions (read-only key)","default":false}},"type":"object","required":["key","name","event_types"],"title":"MemoryDimension","description":"A single memory dimension — defines what facts to extract from events.\n\nTwo extraction modes:\n- static: uses extract_paths (JSONPath) for fast, free extraction\n- llm: uses ai_extract with the dimension description as prompt\n  for semantic extraction. Only runs on new events (incremental MV refresh)."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The MergedEntitiesResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MergedEntitiesResponse":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"linked_entities":{"items":{"$ref":"#/components/schemas/EntityResponse"},"type":"array","title":"Linked Entities"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entity_id","linked_entities","total"],"title":"MergedEntitiesResponse"},"EntityResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"entity_type":{"type":"string","title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"canonical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Id"},"external_ids":{"additionalProperties":true,"type":"object","title":"External Ids"},"state":{"additionalProperties":true,"type":"object","title":"State"},"has_projection":{"type":"boolean","title":"Has Projection","default":false},"first_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen At"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event At"},"event_count":{"type":"integer","title":"Event Count","default":0},"confidence":{"type":"number","title":"Confidence","default":1},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","entity_type"],"title":"EntityResponse"}}}}
```

## The MeterSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MeterSummary":{"properties":{"meter_key":{"type":"string","title":"Meter Key"},"display_name":{"type":"string","title":"Display Name"},"value":{"type":"number","title":"Value"},"unit":{"type":"string","title":"Unit"}},"type":"object","required":["meter_key","display_name","value","unit"],"title":"MeterSummary"}}}}
```

## The MeterValueItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MeterValueItem":{"properties":{"id":{"type":"string","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"meter_key":{"type":"string","title":"Meter Key"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"value":{"type":"string","title":"Value"},"unit":{"type":"string","title":"Unit"},"breakdown":{"additionalProperties":true,"type":"object","title":"Breakdown"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","customer_id","meter_key","period_start","period_end","value","unit","breakdown","updated_at"],"title":"MeterValueItem"}}}}
```

## The MetricCatalogEntry object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricCatalogEntry":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metric_type":{"type":"string","title":"Metric Type"},"source":{"type":"string","title":"Source"},"extraction_mode":{"type":"string","title":"Extraction Mode","default":"static"},"model_tier":{"type":"string","title":"Model Tier","default":"free"},"channel_scope":{"type":"string","title":"Channel Scope","default":"all"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"period_granularity":{"type":"string","title":"Period Granularity","default":"daily"},"builtin":{"type":"boolean","title":"Builtin"}},"type":"object","required":["key","name","metric_type","source","builtin"],"title":"MetricCatalogEntry"}}}}
```

## The MetricCatalogResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricCatalogResponse":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/MetricCatalogEntry"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"MetricCatalogResponse"},"MetricCatalogEntry":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metric_type":{"type":"string","title":"Metric Type"},"source":{"type":"string","title":"Source"},"extraction_mode":{"type":"string","title":"Extraction Mode","default":"static"},"model_tier":{"type":"string","title":"Model Tier","default":"free"},"channel_scope":{"type":"string","title":"Channel Scope","default":"all"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"period_granularity":{"type":"string","title":"Period Granularity","default":"daily"},"builtin":{"type":"boolean","title":"Builtin"}},"type":"object","required":["key","name","metric_type","source","builtin"],"title":"MetricCatalogEntry"}}}}
```

## The MetricDefinition object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricDefinition":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Key","description":"Lowercase slug used as metric key (e.g. 'voice_quality_score')"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"metric_type":{"type":"string","enum":["numerical","categorical","boolean"],"title":"Metric Type"},"latency_tier":{"type":"string","enum":["streaming","near_realtime","batch"],"title":"Latency Tier","description":"'streaming' — seconds-latency via ZeroBus streaming ingestion (continuous pipeline). 'near_realtime' — minutes-latency via triggered pipeline refresh. 'batch' — hourly/daily scheduled refresh (default, cheapest).","default":"batch"},"period_granularity":{"type":"string","enum":["hourly","daily"],"title":"Period Granularity","description":"'hourly' — one row per workspace per hour. Use for near_realtime metrics where shift-level visibility matters (voice quality, latency). 'daily' — one row per workspace per day (default, cheapest).","default":"daily"},"source":{"type":"string","enum":["call_intelligence","world_events","surface_events","emotion_events","connector_events","zerobus_events"],"title":"Source","description":"'call_intelligence' reads from world.call_intelligence table. 'world_events' reads from world.events. 'surface_events' reads from world.events WHERE domain='surface'."},"event_types":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Event Types","description":"Event types to scan (e.g. 'call.outcome', 'surface.submitted'). For call_intelligence source, use pseudo-types: 'call_intelligence.row'."},"source_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Filter","description":"Optional SQL WHERE fragment for additional filtering (e.g. \"source = 'voice_agent'\"). Applied after event_type filter."},"extraction_mode":{"type":"string","enum":["static","ai_classify","ai_extract","ai_sentiment","ai_query","sql_expr"],"title":"Extraction Mode","description":"'static' — JSONB path extraction (fast, free). 'ai_classify' — AI classification into user-defined labels (free). 'ai_extract' — AI field extraction from text (free). 'ai_sentiment' — AI sentiment analysis (free). 'ai_query' — LLM-powered extraction with custom prompt (uses model_tier). 'sql_expr' — Raw SQL expression for computed metrics.","default":"static"},"extract_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extract Path","description":"JSONB path for static extraction (e.g. '$.quality_score', '$.emotion_summary.dominant_emotion'). Used when extraction_mode='static'."},"ai_labels":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":500},{"type":"null"}],"title":"Ai Labels","description":"Labels for ai_classify (categories) or ai_extract (field names). Required when extraction_mode='ai_classify' or 'ai_extract'. Examples: ['positive', 'negative', 'neutral'] or ['diagnosis', 'medication']."},"ai_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Schema","description":"Extraction schema for ai_extract. Required when extraction_mode='ai_extract'."},"ai_query_endpoint":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Ai Query Endpoint","description":"Model serving endpoint for ai_query. Optional — if omitted, platform resolves from model_tier automatically. Override for custom endpoints."},"ai_query_prompt":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Ai Query Prompt","description":"Prompt template for ai_query. Use {data} placeholder for event data. Example: 'Classify this call transcript into one of: {labels}. Transcript: {data}'"},"sql_expression":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Sql Expression","description":"Raw SQL expression evaluated in pipeline context. Has access to all columns in the source table. Example: 'CASE WHEN duration_seconds > 120 THEN 1.0 ELSE 0.0 END'. Required when extraction_mode='sql_expr'."},"aggregation":{"type":"string","enum":["count","sum","avg","min","max","count_distinct","ratio","rate"],"title":"Aggregation","description":"How to aggregate extracted values per workspace per period. 'ratio' requires ratio_numerator_event and ratio_denominator_event. 'rate' computes count(true) / count(all) for boolean metrics.","default":"count"},"ratio_numerator_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ratio Numerator Event","description":"Event type for numerator when aggregation='ratio'."},"ratio_denominator_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ratio Denominator Event","description":"Event type for denominator when aggregation='ratio'."},"valid_range_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Valid Range Min","description":"Minimum valid value for numerical metrics. Pipeline drops values outside range."},"valid_range_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Valid Range Max","description":"Maximum valid value for numerical metrics."},"freshness_sla_minutes":{"type":"integer","maximum":1440,"minimum":5,"title":"Freshness Sla Minutes","description":"Max acceptable staleness in minutes before alerting. Default: 60 (1 hour).","default":60},"unit":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Unit","description":"Display unit (e.g. 'score', 'minutes', '%', 'count')."},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":100},{"type":"null"}],"title":"Categories","description":"Allowed values for categorical metrics. Pipeline drops values not in this list when set."},"model_tier":{"type":"string","enum":["free","fast","balanced","max","custom"],"title":"Model Tier","description":"AI model tier for extraction quality/cost tradeoff. 'free' — platform managed models (ai_classify, ai_extract, ai_sentiment). 'fast' — optimized for simple classification, low latency. 'balanced' — quality scoring, moderate reasoning. 'max' — complex analysis, multi-step reasoning. 'custom' — use ai_query_endpoint directly. When extraction_mode='ai_query' and ai_query_endpoint is not set, platform resolves model_tier to the optimal model automatically.","default":"free"},"channel_scope":{"type":"string","enum":["all","voice","text","surface","inbound","outbound"],"title":"Channel Scope","description":"Business-logic channel filter. 'voice' — voice calls only. 'text' — SMS/text sessions. 'surface' — form submissions. 'inbound'/'outbound' — by direction. 'all' — no channel filter (default). Pipeline translates to appropriate source + event_type filters.","default":"all"},"active":{"type":"boolean","title":"Active","default":true},"builtin":{"type":"boolean","title":"Builtin","description":"True for platform-provided metrics (read-only key).","default":false}},"type":"object","required":["key","name","metric_type","source","event_types"],"title":"MetricDefinition","description":"A single metric definition — what to extract and how.\n\nTwo broad modes:\n- Built-in metrics: extraction is handled by hardcoded pipeline logic\n  (extract_path + aggregation). Shipped with every workspace.\n- Custom metrics: extraction uses AI functions or static JSONB paths.\n  Defined per-workspace via settings API."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The MetricFreshnessEntry object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricFreshnessEntry":{"properties":{"metric_key":{"type":"string","title":"Metric Key"},"last_computed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Computed At"},"latest_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Period End"},"value_count":{"type":"integer","title":"Value Count"}},"type":"object","required":["metric_key","value_count"],"title":"MetricFreshnessEntry"}}}}
```

## The MetricFreshnessResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricFreshnessResponse":{"properties":{"freshness":{"items":{"$ref":"#/components/schemas/MetricFreshnessEntry"},"type":"array","title":"Freshness"}},"type":"object","required":["freshness"],"title":"MetricFreshnessResponse"},"MetricFreshnessEntry":{"properties":{"metric_key":{"type":"string","title":"Metric Key"},"last_computed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Computed At"},"latest_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Period End"},"value_count":{"type":"integer","title":"Value Count"}},"type":"object","required":["metric_key","value_count"],"title":"MetricFreshnessEntry"}}}}
```

## The MetricListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricListResponse":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/MetricValueResponse"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"MetricListResponse"},"MetricValueResponse":{"properties":{"metric_key":{"type":"string","title":"Metric Key"},"metric_type":{"type":"string","title":"Metric Type"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"value":{"title":"Value"},"event_count":{"type":"integer","title":"Event Count"},"avg_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Confidence"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"computed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computed At"}},"type":"object","required":["metric_key","metric_type","period_start","period_end","value","event_count"],"title":"MetricValueResponse"}}}}
```

## The MetricSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricSettingsRequest":{"properties":{"definitions":{"anyOf":[{"items":{"$ref":"#/components/schemas/MetricDefinition"},"type":"array"},{"type":"null"}],"title":"Definitions"}},"type":"object","title":"MetricSettingsRequest","description":"Partial update — only provided fields are changed.\n\nThe definitions list is replaced entirely when provided.\nBuilt-in metrics can be deactivated (active=false) or have their\nfreshness_sla_minutes changed, but their key cannot be reused\nfor custom metrics."},"MetricDefinition":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Key","description":"Lowercase slug used as metric key (e.g. 'voice_quality_score')"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"metric_type":{"type":"string","enum":["numerical","categorical","boolean"],"title":"Metric Type"},"latency_tier":{"type":"string","enum":["streaming","near_realtime","batch"],"title":"Latency Tier","description":"'streaming' — seconds-latency via ZeroBus streaming ingestion (continuous pipeline). 'near_realtime' — minutes-latency via triggered pipeline refresh. 'batch' — hourly/daily scheduled refresh (default, cheapest).","default":"batch"},"period_granularity":{"type":"string","enum":["hourly","daily"],"title":"Period Granularity","description":"'hourly' — one row per workspace per hour. Use for near_realtime metrics where shift-level visibility matters (voice quality, latency). 'daily' — one row per workspace per day (default, cheapest).","default":"daily"},"source":{"type":"string","enum":["call_intelligence","world_events","surface_events","emotion_events","connector_events","zerobus_events"],"title":"Source","description":"'call_intelligence' reads from world.call_intelligence table. 'world_events' reads from world.events. 'surface_events' reads from world.events WHERE domain='surface'."},"event_types":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Event Types","description":"Event types to scan (e.g. 'call.outcome', 'surface.submitted'). For call_intelligence source, use pseudo-types: 'call_intelligence.row'."},"source_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Filter","description":"Optional SQL WHERE fragment for additional filtering (e.g. \"source = 'voice_agent'\"). Applied after event_type filter."},"extraction_mode":{"type":"string","enum":["static","ai_classify","ai_extract","ai_sentiment","ai_query","sql_expr"],"title":"Extraction Mode","description":"'static' — JSONB path extraction (fast, free). 'ai_classify' — AI classification into user-defined labels (free). 'ai_extract' — AI field extraction from text (free). 'ai_sentiment' — AI sentiment analysis (free). 'ai_query' — LLM-powered extraction with custom prompt (uses model_tier). 'sql_expr' — Raw SQL expression for computed metrics.","default":"static"},"extract_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extract Path","description":"JSONB path for static extraction (e.g. '$.quality_score', '$.emotion_summary.dominant_emotion'). Used when extraction_mode='static'."},"ai_labels":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":500},{"type":"null"}],"title":"Ai Labels","description":"Labels for ai_classify (categories) or ai_extract (field names). Required when extraction_mode='ai_classify' or 'ai_extract'. Examples: ['positive', 'negative', 'neutral'] or ['diagnosis', 'medication']."},"ai_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Schema","description":"Extraction schema for ai_extract. Required when extraction_mode='ai_extract'."},"ai_query_endpoint":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Ai Query Endpoint","description":"Model serving endpoint for ai_query. Optional — if omitted, platform resolves from model_tier automatically. Override for custom endpoints."},"ai_query_prompt":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Ai Query Prompt","description":"Prompt template for ai_query. Use {data} placeholder for event data. Example: 'Classify this call transcript into one of: {labels}. Transcript: {data}'"},"sql_expression":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Sql Expression","description":"Raw SQL expression evaluated in pipeline context. Has access to all columns in the source table. Example: 'CASE WHEN duration_seconds > 120 THEN 1.0 ELSE 0.0 END'. Required when extraction_mode='sql_expr'."},"aggregation":{"type":"string","enum":["count","sum","avg","min","max","count_distinct","ratio","rate"],"title":"Aggregation","description":"How to aggregate extracted values per workspace per period. 'ratio' requires ratio_numerator_event and ratio_denominator_event. 'rate' computes count(true) / count(all) for boolean metrics.","default":"count"},"ratio_numerator_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ratio Numerator Event","description":"Event type for numerator when aggregation='ratio'."},"ratio_denominator_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ratio Denominator Event","description":"Event type for denominator when aggregation='ratio'."},"valid_range_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Valid Range Min","description":"Minimum valid value for numerical metrics. Pipeline drops values outside range."},"valid_range_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Valid Range Max","description":"Maximum valid value for numerical metrics."},"freshness_sla_minutes":{"type":"integer","maximum":1440,"minimum":5,"title":"Freshness Sla Minutes","description":"Max acceptable staleness in minutes before alerting. Default: 60 (1 hour).","default":60},"unit":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Unit","description":"Display unit (e.g. 'score', 'minutes', '%', 'count')."},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":100},{"type":"null"}],"title":"Categories","description":"Allowed values for categorical metrics. Pipeline drops values not in this list when set."},"model_tier":{"type":"string","enum":["free","fast","balanced","max","custom"],"title":"Model Tier","description":"AI model tier for extraction quality/cost tradeoff. 'free' — platform managed models (ai_classify, ai_extract, ai_sentiment). 'fast' — optimized for simple classification, low latency. 'balanced' — quality scoring, moderate reasoning. 'max' — complex analysis, multi-step reasoning. 'custom' — use ai_query_endpoint directly. When extraction_mode='ai_query' and ai_query_endpoint is not set, platform resolves model_tier to the optimal model automatically.","default":"free"},"channel_scope":{"type":"string","enum":["all","voice","text","surface","inbound","outbound"],"title":"Channel Scope","description":"Business-logic channel filter. 'voice' — voice calls only. 'text' — SMS/text sessions. 'surface' — form submissions. 'inbound'/'outbound' — by direction. 'all' — no channel filter (default). Pipeline translates to appropriate source + event_type filters.","default":"all"},"active":{"type":"boolean","title":"Active","default":true},"builtin":{"type":"boolean","title":"Builtin","description":"True for platform-provided metrics (read-only key).","default":false}},"type":"object","required":["key","name","metric_type","source","event_types"],"title":"MetricDefinition","description":"A single metric definition — what to extract and how.\n\nTwo broad modes:\n- Built-in metrics: extraction is handled by hardcoded pipeline logic\n  (extract_path + aggregation). Shipped with every workspace.\n- Custom metrics: extraction uses AI functions or static JSONB paths.\n  Defined per-workspace via settings API."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The MetricSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricSettingsResponse":{"properties":{"definitions":{"items":{"$ref":"#/components/schemas/MetricDefinition"},"type":"array","title":"Definitions"}},"type":"object","required":["definitions"],"title":"MetricSettingsResponse"},"MetricDefinition":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Key","description":"Lowercase slug used as metric key (e.g. 'voice_quality_score')"},"name":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"metric_type":{"type":"string","enum":["numerical","categorical","boolean"],"title":"Metric Type"},"latency_tier":{"type":"string","enum":["streaming","near_realtime","batch"],"title":"Latency Tier","description":"'streaming' — seconds-latency via ZeroBus streaming ingestion (continuous pipeline). 'near_realtime' — minutes-latency via triggered pipeline refresh. 'batch' — hourly/daily scheduled refresh (default, cheapest).","default":"batch"},"period_granularity":{"type":"string","enum":["hourly","daily"],"title":"Period Granularity","description":"'hourly' — one row per workspace per hour. Use for near_realtime metrics where shift-level visibility matters (voice quality, latency). 'daily' — one row per workspace per day (default, cheapest).","default":"daily"},"source":{"type":"string","enum":["call_intelligence","world_events","surface_events","emotion_events","connector_events","zerobus_events"],"title":"Source","description":"'call_intelligence' reads from world.call_intelligence table. 'world_events' reads from world.events. 'surface_events' reads from world.events WHERE domain='surface'."},"event_types":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Event Types","description":"Event types to scan (e.g. 'call.outcome', 'surface.submitted'). For call_intelligence source, use pseudo-types: 'call_intelligence.row'."},"source_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Filter","description":"Optional SQL WHERE fragment for additional filtering (e.g. \"source = 'voice_agent'\"). Applied after event_type filter."},"extraction_mode":{"type":"string","enum":["static","ai_classify","ai_extract","ai_sentiment","ai_query","sql_expr"],"title":"Extraction Mode","description":"'static' — JSONB path extraction (fast, free). 'ai_classify' — AI classification into user-defined labels (free). 'ai_extract' — AI field extraction from text (free). 'ai_sentiment' — AI sentiment analysis (free). 'ai_query' — LLM-powered extraction with custom prompt (uses model_tier). 'sql_expr' — Raw SQL expression for computed metrics.","default":"static"},"extract_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extract Path","description":"JSONB path for static extraction (e.g. '$.quality_score', '$.emotion_summary.dominant_emotion'). Used when extraction_mode='static'."},"ai_labels":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":500},{"type":"null"}],"title":"Ai Labels","description":"Labels for ai_classify (categories) or ai_extract (field names). Required when extraction_mode='ai_classify' or 'ai_extract'. Examples: ['positive', 'negative', 'neutral'] or ['diagnosis', 'medication']."},"ai_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Schema","description":"Extraction schema for ai_extract. Required when extraction_mode='ai_extract'."},"ai_query_endpoint":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Ai Query Endpoint","description":"Model serving endpoint for ai_query. Optional — if omitted, platform resolves from model_tier automatically. Override for custom endpoints."},"ai_query_prompt":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Ai Query Prompt","description":"Prompt template for ai_query. Use {data} placeholder for event data. Example: 'Classify this call transcript into one of: {labels}. Transcript: {data}'"},"sql_expression":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Sql Expression","description":"Raw SQL expression evaluated in pipeline context. Has access to all columns in the source table. Example: 'CASE WHEN duration_seconds > 120 THEN 1.0 ELSE 0.0 END'. Required when extraction_mode='sql_expr'."},"aggregation":{"type":"string","enum":["count","sum","avg","min","max","count_distinct","ratio","rate"],"title":"Aggregation","description":"How to aggregate extracted values per workspace per period. 'ratio' requires ratio_numerator_event and ratio_denominator_event. 'rate' computes count(true) / count(all) for boolean metrics.","default":"count"},"ratio_numerator_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ratio Numerator Event","description":"Event type for numerator when aggregation='ratio'."},"ratio_denominator_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ratio Denominator Event","description":"Event type for denominator when aggregation='ratio'."},"valid_range_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Valid Range Min","description":"Minimum valid value for numerical metrics. Pipeline drops values outside range."},"valid_range_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Valid Range Max","description":"Maximum valid value for numerical metrics."},"freshness_sla_minutes":{"type":"integer","maximum":1440,"minimum":5,"title":"Freshness Sla Minutes","description":"Max acceptable staleness in minutes before alerting. Default: 60 (1 hour).","default":60},"unit":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Unit","description":"Display unit (e.g. 'score', 'minutes', '%', 'count')."},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":100},{"type":"null"}],"title":"Categories","description":"Allowed values for categorical metrics. Pipeline drops values not in this list when set."},"model_tier":{"type":"string","enum":["free","fast","balanced","max","custom"],"title":"Model Tier","description":"AI model tier for extraction quality/cost tradeoff. 'free' — platform managed models (ai_classify, ai_extract, ai_sentiment). 'fast' — optimized for simple classification, low latency. 'balanced' — quality scoring, moderate reasoning. 'max' — complex analysis, multi-step reasoning. 'custom' — use ai_query_endpoint directly. When extraction_mode='ai_query' and ai_query_endpoint is not set, platform resolves model_tier to the optimal model automatically.","default":"free"},"channel_scope":{"type":"string","enum":["all","voice","text","surface","inbound","outbound"],"title":"Channel Scope","description":"Business-logic channel filter. 'voice' — voice calls only. 'text' — SMS/text sessions. 'surface' — form submissions. 'inbound'/'outbound' — by direction. 'all' — no channel filter (default). Pipeline translates to appropriate source + event_type filters.","default":"all"},"active":{"type":"boolean","title":"Active","default":true},"builtin":{"type":"boolean","title":"Builtin","description":"True for platform-provided metrics (read-only key).","default":false}},"type":"object","required":["key","name","metric_type","source","event_types"],"title":"MetricDefinition","description":"A single metric definition — what to extract and how.\n\nTwo broad modes:\n- Built-in metrics: extraction is handled by hardcoded pipeline logic\n  (extract_path + aggregation). Shipped with every workspace.\n- Custom metrics: extraction uses AI functions or static JSONB paths.\n  Defined per-workspace via settings API."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The MetricValueResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MetricValueResponse":{"properties":{"metric_key":{"type":"string","title":"Metric Key"},"metric_type":{"type":"string","title":"Metric Type"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"value":{"title":"Value"},"event_count":{"type":"integer","title":"Event Count"},"avg_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Confidence"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"computed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Computed At"}},"type":"object","required":["metric_key","metric_type","period_start","period_end","value","event_count"],"title":"MetricValueResponse"}}}}
```

## The MonitorConceptResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"MonitorConceptResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"threshold":{"type":"number","title":"Threshold"},"standalone_threshold":{"type":"number","title":"Standalone Threshold"},"agent_config":{"additionalProperties":true,"type":"object","title":"Agent Config"},"escalation":{"additionalProperties":true,"type":"object","title":"Escalation"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"has_embedding":{"type":"boolean","title":"Has Embedding"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","threshold","standalone_threshold","agent_config","escalation","tags","has_embedding","created_at","updated_at"],"title":"MonitorConceptResponse"}}}}
```

## The NameString object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"NameString":{"type":"string","maxLength":256,"minLength":1}}}}
```

## The OcrRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OcrRequest":{"properties":{"image":{"type":"string","maxLength":10000000,"minLength":1,"title":"Image","description":"Base64-encoded image data"},"target_fields":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Target Fields","description":"Optional list of field keys to extract"}},"type":"object","required":["image"],"title":"OcrRequest"}}}}
```

## The OperatorPerformanceItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OperatorPerformanceItem":{"properties":{"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","title":"Status"},"total_escalations_handled":{"type":"integer","title":"Total Escalations Handled"},"avg_handle_time_seconds":{"type":"number","title":"Avg Handle Time Seconds"},"last_call_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Call At"}},"type":"object","required":["operator_id","name","status","total_escalations_handled","avg_handle_time_seconds","last_call_at"],"title":"OperatorPerformanceItem"}}}}
```

## The OperatorResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OperatorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"skills":{"items":{"type":"string"},"type":"array","title":"Skills"},"connection_method":{"type":"string","title":"Connection Method"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"last_status_change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Status Change"},"active_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Call Sid"},"total_escalations_handled":{"type":"integer","title":"Total Escalations Handled"},"avg_handle_time_seconds":{"type":"number","title":"Avg Handle Time Seconds"},"last_call_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Call At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","name","email","type","skills","connection_method","phone_number","role","status","last_status_change","active_call_sid","total_escalations_handled","avg_handle_time_seconds","last_call_at","created_at","updated_at"],"title":"OperatorResponse"}}}}
```

## The OperatorStatusCounts object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OperatorStatusCounts":{"properties":{"total":{"type":"integer","title":"Total"},"online":{"type":"integer","title":"Online"},"busy":{"type":"integer","title":"Busy"},"offline":{"type":"integer","title":"Offline"}},"type":"object","required":["total","online","busy","offline"],"title":"OperatorStatusCounts"}}}}
```

## The OutboundLogItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OutboundLogItem":{"properties":{"id":{"type":"string","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"attempt_count":{"type":"integer","title":"Attempt Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event_id","attempt_count","created_at"],"title":"OutboundLogItem"}}}}
```

## The OutboundSinkSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OutboundSinkSummary":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"data_source_name":{"type":"string","title":"Data Source Name"},"total":{"type":"integer","title":"Total"},"synced":{"type":"integer","title":"Synced"},"failed":{"type":"integer","title":"Failed"},"pending":{"type":"integer","title":"Pending"},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","required":["data_source_id","data_source_name","total","synced","failed","pending"],"title":"OutboundSinkSummary"}}}}
```

## The OutboundSummary object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OutboundSummary":{"properties":{"total":{"type":"integer","title":"Total","default":0},"synced":{"type":"integer","title":"Synced","default":0},"failed":{"type":"integer","title":"Failed","default":0},"pending":{"type":"integer","title":"Pending","default":0},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","title":"OutboundSummary"}}}}
```

## The OutboundSyncBySinkResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OutboundSyncBySinkResponse":{"properties":{"sinks":{"items":{"$ref":"#/components/schemas/SinkSyncStatus"},"type":"array","title":"Sinks"}},"type":"object","required":["sinks"],"title":"OutboundSyncBySinkResponse"},"SinkSyncStatus":{"properties":{"data_source_id":{"type":"string","format":"uuid","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"source_type":{"type":"string","title":"Source Type"},"total":{"type":"integer","title":"Total"},"synced":{"type":"integer","title":"Synced"},"failed":{"type":"integer","title":"Failed"},"pending":{"type":"integer","title":"Pending"}},"type":"object","required":["data_source_id","name","source_type","total","synced","failed","pending"],"title":"SinkSyncStatus"}}}}
```

## The OutreachRule object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OutreachRule":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"trigger":{"type":"string","enum":["appointment_window","post_visit","gap_detected","form_intake","manual"],"title":"Trigger","default":"appointment_window"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config","description":"Trigger-specific config (hours_before, hours_after, etc.)"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"sms"},"consent_required":{"type":"boolean","title":"Consent Required","default":true},"quiet_hours":{"$ref":"#/components/schemas/QuietHours"},"review_required":{"type":"boolean","title":"Review Required","default":false},"message_template":{"type":"string","maxLength":1600,"title":"Message Template","default":"Hi {first_name}, please complete your form: {surface_url}"},"data_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Template Id"},"form_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Template Id"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name"],"title":"OutreachRule","description":"A single outreach rule — defines WHEN, WHAT, and HOW to reach a patient."},"NameString":{"type":"string","maxLength":256,"minLength":1},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"QuietHours":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"start_hour":{"type":"integer","maximum":23,"minimum":0,"title":"Start Hour","default":21},"end_hour":{"type":"integer","maximum":23,"minimum":0,"title":"End Hour","default":8},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"America/New_York"}},"type":"object","title":"QuietHours","description":"TCPA-compliant quiet hours — no outbound SMS during this window."}}}}
```

## The OutreachSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OutreachSettingsRequest":{"properties":{"rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/OutreachRule"},"type":"array"},{"type":"null"}],"title":"Rules"},"data_templates":{"anyOf":[{"items":{"$ref":"#/components/schemas/DataTemplate-Input"},"type":"array"},{"type":"null"}],"title":"Data Templates"}},"type":"object","title":"OutreachSettingsRequest","description":"Partial update — only provided fields are changed.\n\nRules and data_templates lists are replaced entirely when provided."},"OutreachRule":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"trigger":{"type":"string","enum":["appointment_window","post_visit","gap_detected","form_intake","manual"],"title":"Trigger","default":"appointment_window"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config","description":"Trigger-specific config (hours_before, hours_after, etc.)"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"sms"},"consent_required":{"type":"boolean","title":"Consent Required","default":true},"quiet_hours":{"$ref":"#/components/schemas/QuietHours"},"review_required":{"type":"boolean","title":"Review Required","default":false},"message_template":{"type":"string","maxLength":1600,"title":"Message Template","default":"Hi {first_name}, please complete your form: {surface_url}"},"data_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Template Id"},"form_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Template Id"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name"],"title":"OutreachRule","description":"A single outreach rule — defines WHEN, WHAT, and HOW to reach a patient."},"NameString":{"type":"string","maxLength":256,"minLength":1},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"QuietHours":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"start_hour":{"type":"integer","maximum":23,"minimum":0,"title":"Start Hour","default":21},"end_hour":{"type":"integer","maximum":23,"minimum":0,"title":"End Hour","default":8},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"America/New_York"}},"type":"object","title":"QuietHours","description":"TCPA-compliant quiet hours — no outbound SMS during this window."},"DataTemplate-Input":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"fields":{"items":{"$ref":"#/components/schemas/DataTemplateField"},"type":"array","maxItems":50,"minItems":1,"title":"Fields"}},"type":"object","required":["name","fields"],"title":"DataTemplate","description":"Named field template — reusable across multiple outreach rules."},"DataTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state (e.g. demographics.date_of_birth)"}},"type":"object","required":["key","label","path"],"title":"DataTemplateField","description":"A field in a data template — maps to entity state path for gap detection."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."}}}}
```

## The OutreachSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"OutreachSettingsResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/OutreachRule"},"type":"array","title":"Rules"},"data_templates":{"items":{"$ref":"#/components/schemas/DataTemplate-Output"},"type":"array","title":"Data Templates"}},"type":"object","required":["rules","data_templates"],"title":"OutreachSettingsResponse"},"OutreachRule":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"trigger":{"type":"string","enum":["appointment_window","post_visit","gap_detected","form_intake","manual"],"title":"Trigger","default":"appointment_window"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config","description":"Trigger-specific config (hours_before, hours_after, etc.)"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"sms"},"consent_required":{"type":"boolean","title":"Consent Required","default":true},"quiet_hours":{"$ref":"#/components/schemas/QuietHours"},"review_required":{"type":"boolean","title":"Review Required","default":false},"message_template":{"type":"string","maxLength":1600,"title":"Message Template","default":"Hi {first_name}, please complete your form: {surface_url}"},"data_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Template Id"},"form_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Form Template Id"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name"],"title":"OutreachRule","description":"A single outreach rule — defines WHEN, WHAT, and HOW to reach a patient."},"NameString":{"type":"string","maxLength":256,"minLength":1},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"QuietHours":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"start_hour":{"type":"integer","maximum":23,"minimum":0,"title":"Start Hour","default":21},"end_hour":{"type":"integer","maximum":23,"minimum":0,"title":"End Hour","default":8},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"America/New_York"}},"type":"object","title":"QuietHours","description":"TCPA-compliant quiet hours — no outbound SMS during this window."},"DataTemplate-Output":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"$ref":"#/components/schemas/NameString"},"fields":{"items":{"$ref":"#/components/schemas/DataTemplateField"},"type":"array","maxItems":50,"minItems":1,"title":"Fields"}},"type":"object","required":["name","fields"],"title":"DataTemplate","description":"Named field template — reusable across multiple outreach rules."},"DataTemplateField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType","default":"text"},"required":{"type":"boolean","title":"Required","default":true},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"path":{"type":"string","maxLength":256,"minLength":1,"title":"Path","description":"Dot-notation path into entity state (e.g. demographics.date_of_birth)"}},"type":"object","required":["key","label","path"],"title":"DataTemplateField","description":"A field in a data template — maps to entity state path for gap detection."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."}}}}
```

## The PaginatedResponse\_ActiveEscalationItem\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_ActiveEscalationItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActiveEscalationItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ActiveEscalationItem]"},"ActiveEscalationItem":{"properties":{"call_entity_id":{"type":"string","format":"uuid","title":"Call Entity Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"escalation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Id"},"status":{"type":"string","title":"Status"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"trigger_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Source"},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concept"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"regulatory_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulatory Basis"},"immediate":{"type":"boolean","title":"Immediate"},"risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Score"},"requested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested At"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"wait_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wait Seconds"},"operator_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Entity Id"},"caller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"}},"type":"object","required":["call_entity_id","call_sid","escalation_id","status","trigger","trigger_source","concept","operator_type","regulatory_basis","immediate","risk_score","requested_at","connected_at","wait_seconds","operator_entity_id","caller_id","direction","phone_number","started_at"],"title":"ActiveEscalationItem","description":"A call with an active escalation, enriched from projected state."}}}}
```

## The PaginatedResponse\_AgentResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_AgentResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[AgentResponse]"},"AgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","created_at","updated_at"],"title":"AgentResponse"}}}}
```

## The PaginatedResponse\_AgentVersionResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_AgentVersionResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentVersionResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[AgentVersionResponse]"},"AgentVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"agent_id":{"type":"string","title":"Agent Id"},"version":{"type":"integer","title":"Version"},"name":{"type":"string","title":"Name"},"initials":{"type":"string","title":"Initials"},"identity":{"$ref":"#/components/schemas/Identity"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/VoiceConfig"},{"type":"null"}]},"background":{"type":"string","title":"Background"},"behaviors":{"items":{"type":"string"},"type":"array","title":"Behaviors"},"communication_patterns":{"items":{"type":"string"},"type":"array","title":"Communication Patterns"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","agent_id","version","name","initials","identity","voice_config","background","behaviors","communication_patterns","created_at","updated_at"],"title":"AgentVersionResponse"},"Identity":{"properties":{"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"default_spoken_language":{"type":"string","title":"Default Spoken Language"},"relationship_to_developer":{"$ref":"#/components/schemas/RelationshipToDeveloper"}},"type":"object","required":["name","role","developed_by","default_spoken_language","relationship_to_developer"],"title":"Identity"},"RelationshipToDeveloper":{"properties":{"ownership":{"type":"string","title":"Ownership"},"type":{"type":"string","title":"Type"},"conversation_visibility":{"type":"string","title":"Conversation Visibility"},"thought_visibility":{"type":"string","title":"Thought Visibility"}},"type":"object","required":["ownership","type","conversation_visibility","thought_visibility"],"title":"RelationshipToDeveloper"},"VoiceConfig":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"stability":{"type":"number","title":"Stability","default":0},"similarity_boost":{"type":"number","title":"Similarity Boost","default":0},"style":{"type":"number","title":"Style","default":0}},"type":"object","required":["voice_id"],"title":"VoiceConfig"}}}}
```

## The PaginatedResponse\_ApiKeyResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_ApiKeyResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ApiKeyResponse]"},"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"created_by_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Entity Id"},"created_by_credential_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Credential Id"},"key_id":{"type":"string","title":"Key Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","created_by_entity_id","created_by_credential_id","key_id","name","role","permissions","expires_at","last_used_at","created_at","updated_at"],"title":"ApiKeyResponse"}}}}
```

## The PaginatedResponse\_AuditEventResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_AuditEventResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/src__routes__operators_models__AuditEventResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[AuditEventResponse]"},"src__routes__operators_models__AuditEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"event_type":{"type":"string","title":"Event Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","workspace_id","event_type","data","source","ingested_at","created_at"],"title":"AuditEventResponse"}}}}
```

## The PaginatedResponse\_ContextGraphResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_ContextGraphResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContextGraphResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ContextGraphResponse]"},"ContextGraphResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"latest_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Version"},"state_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"State Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","created_at","updated_at"],"title":"ContextGraphResponse"}}}}
```

## The PaginatedResponse\_ContextGraphVersionResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_ContextGraphVersionResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContextGraphVersionResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ContextGraphVersionResponse]"},"ContextGraphVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"version":{"type":"integer","title":"Version"},"description":{"type":"string","title":"Description"},"states":{"items":{"$ref":"#/components/schemas/ContextGraphState-Output"},"type":"array","title":"States"},"new_user_initial_state":{"type":"string","title":"New User Initial State"},"returning_user_initial_state":{"type":"string","title":"Returning User Initial State"},"terminal_state":{"type":"string","title":"Terminal State"},"global_intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Intra State Navigation Guidelines"},"global_action_guidelines":{"items":{"type":"string"},"type":"array","title":"Global Action Guidelines"},"global_boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Global Boundary Constraints"},"topology_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topology Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","context_graph_id","version","description","states","new_user_initial_state","returning_user_initial_state","terminal_state","global_intra_state_navigation_guidelines","global_action_guidelines","global_boundary_constraints","topology_description","created_at","updated_at"],"title":"ContextGraphVersionResponse"},"ContextGraphState-Output":{"oneOf":[{"$ref":"#/components/schemas/ActionState"},{"$ref":"#/components/schemas/DecisionState"},{"$ref":"#/components/schemas/AnnotationState"},{"$ref":"#/components/schemas/DataCollectionState"}],"discriminator":{"propertyName":"type","mapping":{"action":"#/components/schemas/ActionState","annotation":"#/components/schemas/AnnotationState","data_collection":"#/components/schemas/DataCollectionState","decision":"#/components/schemas/DecisionState"}}},"ActionState":{"properties":{"type":{"type":"string","const":"action","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array","title":"Actions"},"intra_state_navigation_guidelines":{"items":{"type":"string"},"type":"array","title":"Intra State Navigation Guidelines"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines"},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"action_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Action Tool Call Specs","default":[]},"exit_condition_tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Exit Condition Tool Call Specs","default":[]},"escalation_config":{"anyOf":[{"$ref":"#/components/schemas/StateRiskOverride"},{"type":"null"}]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"surface_spec_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec Template"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","actions","intra_state_navigation_guidelines","action_guidelines","boundary_constraints","exit_conditions"],"title":"ActionState","description":"User-facing engagement state with actions and exit conditions."},"Action":{"properties":{"description":{"type":"string","title":"Description"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description"],"title":"Action","description":"A single action the agent can take within a state."},"ExitCondition":{"properties":{"description":{"type":"string","title":"Description"},"next_state":{"type":"string","title":"Next State"},"filler_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filler Hint"}},"type":"object","required":["description","next_state"],"title":"ExitCondition"},"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."},"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."},"Guardrail":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description"},"enforcement":{"type":"string","enum":["hard","soft"],"title":"Enforcement","default":"hard"}},"type":"object","required":["name","description"],"title":"Guardrail","description":"Typed safety rule enforced per-state (not just global freetext guidelines)."},"ChannelOverride":{"properties":{"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"suppress_filler":{"type":"boolean","title":"Suppress Filler","default":false}},"type":"object","title":"ChannelOverride","description":"Per-channel behavior override for a state."},"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."},"DecisionState":{"properties":{"type":{"type":"string","const":"decision","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"exit_conditions":{"items":{"$ref":"#/components/schemas/ExitCondition"},"type":"array","title":"Exit Conditions"},"decision_guidelines":{"items":{"type":"string"},"type":"array","title":"Decision Guidelines","default":[]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]},"wait_for":{"anyOf":[{"type":"string","enum":["surface_submission","human_approval"]},{"type":"null"}],"title":"Wait For"},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]}},"type":"object","required":["type","name","objective","exit_conditions"],"title":"DecisionState","description":"Passthrough routing state — Agent picks an exit condition, no user interaction."},"AnnotationState":{"properties":{"type":{"type":"string","const":"annotation","title":"Type"},"name":{"type":"string","title":"Name"},"inner_thought":{"type":"string","title":"Inner Thought"},"next_state":{"type":"string","title":"Next State"}},"type":"object","required":["type","name","inner_thought","next_state"],"title":"AnnotationState","description":"Injects a hardcoded inner thought (no LLM call)."},"DataCollectionState":{"properties":{"type":{"type":"string","const":"data_collection","title":"Type"},"name":{"type":"string","title":"Name"},"objective":{"type":"string","title":"Objective"},"fields":{"items":{"$ref":"#/components/schemas/CollectionField"},"type":"array","title":"Fields"},"on_complete":{"type":"string","title":"On Complete"},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"surface_fallback":{"type":"boolean","title":"Surface Fallback","default":false},"surface_fallback_after_turns":{"type":"integer","title":"Surface Fallback After Turns","default":6},"max_turns":{"type":"integer","title":"Max Turns","default":10},"guardrails":{"items":{"$ref":"#/components/schemas/Guardrail"},"type":"array","title":"Guardrails","default":[]},"channel_overrides":{"additionalProperties":{"$ref":"#/components/schemas/ChannelOverride"},"type":"object","title":"Channel Overrides"},"turn_policy":{"anyOf":[{"$ref":"#/components/schemas/TurnPolicy"},{"type":"null"}]},"tool_call_specs":{"items":{"$ref":"#/components/schemas/ToolCallSpec"},"type":"array","title":"Tool Call Specs","default":[]}},"type":"object","required":["type","name","objective","fields","on_complete"],"title":"DataCollectionState","description":"Structured voice/text data collection with field tracking.\n\nThe engine presents fields conversationally, tracks completion, and\noptionally falls back to a Surface form after N turns. Each collected\nfield produces a world.event with confidence 0.5."},"CollectionField":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"validation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation"},"ask_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ask Prompt"},"fhir_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Path"}},"type":"object","required":["key","type","label"],"title":"CollectionField","description":"A single field to collect during a data collection state."}}}}
```

## The PaginatedResponse\_CustomerItem\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_CustomerItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[CustomerItem]"},"CustomerItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"billing_email":{"type":"string","title":"Billing Email"},"billing_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Contact"},"mercury_memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mercury Memo"},"address":{"additionalProperties":true,"type":"object","title":"Address"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","slug","billing_email","billing_contact","mercury_memo","address","status","created_at","updated_at"],"title":"CustomerItem"}}}}
```

## The PaginatedResponse\_DataSourceResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_DataSourceResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DataSourceResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[DataSourceResponse]"},"DataSourceResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"source_type":{"type":"string","title":"Source Type"},"connection_config":{"additionalProperties":true,"type":"object","title":"Connection Config"},"entity_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Types"},"field_mappings":{"additionalProperties":true,"type":"object","title":"Field Mappings"},"sync_strategy":{"type":"string","title":"Sync Strategy"},"sync_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Schedule"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_event_count":{"type":"integer","title":"Last Sync Event Count"},"is_active":{"type":"boolean","title":"Is Active"},"health_status":{"type":"string","title":"Health Status"},"last_health_check":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Health Check"},"discovered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovered By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","display_name","source_type","connection_config","entity_types","field_mappings","sync_strategy","sync_schedule","last_sync_at","last_sync_status","last_sync_event_count","is_active","health_status","last_health_check","discovered_by","created_at","updated_at"],"title":"DataSourceResponse"}}}}
```

## The PaginatedResponse\_EscalationEventResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_EscalationEventResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EscalationEventResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[EscalationEventResponse]"},"EscalationEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"event_type":{"type":"string","title":"Event Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source"},"confidence":{"type":"number","title":"Confidence"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","workspace_id","event_type","data","source","confidence","ingested_at","created_at"],"title":"EscalationEventResponse"}}}}
```

## The PaginatedResponse\_IntegrationResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_IntegrationResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IntegrationResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[IntegrationResponse]"},"IntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled"},"builtin":{"type":"boolean","title":"Builtin","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name","protocol","enabled","created_at","updated_at"],"title":"IntegrationResponse"},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The PaginatedResponse\_InvoiceItem\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_InvoiceItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvoiceItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[InvoiceItem]"},"InvoiceItem":{"properties":{"id":{"type":"string","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"subtotal":{"type":"string","title":"Subtotal"},"adjustments":{"type":"string","title":"Adjustments"},"total":{"type":"string","title":"Total"},"status":{"type":"string","title":"Status"},"line_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Line Items"},"pdf_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf S3 Key"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","customer_id","invoice_number","period_start","period_end","subtotal","adjustments","total","status","line_items","pdf_s3_key","sent_at","paid_at","created_at","updated_at"],"title":"InvoiceItem"}}}}
```

## The PaginatedResponse\_MeterValueItem\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_MeterValueItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MeterValueItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[MeterValueItem]"},"MeterValueItem":{"properties":{"id":{"type":"string","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"meter_key":{"type":"string","title":"Meter Key"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"value":{"type":"string","title":"Value"},"unit":{"type":"string","title":"Unit"},"breakdown":{"additionalProperties":true,"type":"object","title":"Breakdown"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","customer_id","meter_key","period_start","period_end","value","unit","breakdown","updated_at"],"title":"MeterValueItem"}}}}
```

## The PaginatedResponse\_MonitorConceptResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_MonitorConceptResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MonitorConceptResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[MonitorConceptResponse]"},"MonitorConceptResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"threshold":{"type":"number","title":"Threshold"},"standalone_threshold":{"type":"number","title":"Standalone Threshold"},"agent_config":{"additionalProperties":true,"type":"object","title":"Agent Config"},"escalation":{"additionalProperties":true,"type":"object","title":"Escalation"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"has_embedding":{"type":"boolean","title":"Has Embedding"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","threshold","standalone_threshold","agent_config","escalation","tags","has_embedding","created_at","updated_at"],"title":"MonitorConceptResponse"}}}}
```

## The PaginatedResponse\_OperatorResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_OperatorResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OperatorResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[OperatorResponse]"},"OperatorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"skills":{"items":{"type":"string"},"type":"array","title":"Skills"},"connection_method":{"type":"string","title":"Connection Method"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"last_status_change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Status Change"},"active_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Call Sid"},"total_escalations_handled":{"type":"integer","title":"Total Escalations Handled"},"avg_handle_time_seconds":{"type":"number","title":"Avg Handle Time Seconds"},"last_call_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Call At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","name","email","type","skills","connection_method","phone_number","role","status","last_status_change","active_call_sid","total_escalations_handled","avg_handle_time_seconds","last_call_at","created_at","updated_at"],"title":"OperatorResponse"}}}}
```

## The PaginatedResponse\_OutboundLogItem\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_OutboundLogItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OutboundLogItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[OutboundLogItem]"},"OutboundLogItem":{"properties":{"id":{"type":"string","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"attempt_count":{"type":"integer","title":"Attempt Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event_id","attempt_count","created_at"],"title":"OutboundLogItem"}}}}
```

## The PaginatedResponse\_PersonaResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_PersonaResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PersonaResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[PersonaResponse]"},"PersonaResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"communication_style":{"additionalProperties":true,"type":"object","title":"Communication Style"},"default_language":{"type":"string","title":"Default Language"},"background":{"type":"string","title":"Background"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","role","developed_by","communication_style","default_language","background","created_at","updated_at"],"title":"PersonaResponse"}}}}
```

## The PaginatedResponse\_PhoneNumberResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_PhoneNumberResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PhoneNumberResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[PhoneNumberResponse]"},"PhoneNumberResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"phone_number":{"type":"string","title":"Phone Number"},"display_name":{"type":"string","title":"Display Name"},"provider":{"type":"string","title":"Provider"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"status":{"type":"string","title":"Status"},"inbound_service_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Service Id"},"provider_phone_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Phone Sid"},"notes":{"type":"string","title":"Notes"},"forwarding":{"anyOf":[{"$ref":"#/components/schemas/ForwardingConfigResponse"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","phone_number","display_name","provider","capabilities","status","inbound_service_id","provider_phone_sid","notes","forwarding","created_at","updated_at"],"title":"PhoneNumberResponse"},"ForwardingConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"forward_to":{"type":"string","title":"Forward To"},"should_disconnect":{"type":"boolean","title":"Should Disconnect"}},"type":"object","required":["enabled","forward_to","should_disconnect"],"title":"ForwardingConfigResponse"}}}}
```

## The PaginatedResponse\_ReviewItemResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_ReviewItemResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewItemResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ReviewItemResponse]"},"ReviewItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","created_at","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status","created_at"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."}}}}
```

## The PaginatedResponse\_ServiceResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_ServiceResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ServiceResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ServiceResponse]"},"ServiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"agent_id":{"type":"string","title":"Agent Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"context_graph_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Graph Name"},"persona_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Name"},"keyterms":{"items":{"type":"string"},"type":"array","title":"Keyterms"},"is_active":{"type":"boolean","title":"Is Active"},"version_sets":{"additionalProperties":{"$ref":"#/components/schemas/VersionSet"},"type":"object","title":"Version Sets"},"tags":{"items":{"$ref":"#/components/schemas/ServiceTag"},"type":"array","title":"Tags"},"tool_capacity":{"type":"integer","title":"Tool Capacity"},"safety_filters_enabled":{"type":"boolean","title":"Safety Filters Enabled","default":true},"channel_type":{"type":"string","enum":["voice","text","scribe"],"title":"Channel Type","default":"voice"},"environment":{"type":"string","enum":["sandbox","production"],"title":"Environment","default":"production"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/ServiceVoiceConfig"},{"type":"null"}]},"persona_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Id"},"is_system":{"type":"boolean","title":"Is System","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","agent_id","context_graph_id","keyterms","is_active","version_sets","tags","tool_capacity","created_at","updated_at"],"title":"ServiceResponse"},"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"},"ServiceTag":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key"],"title":"ServiceTag"},"ServiceVoiceConfig":{"properties":{"tts_model":{"anyOf":[{"type":"string","enum":["sonic-turbo","sonic-3"]},{"type":"null"}],"title":"Tts Model"},"max_buffer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Buffer Delay Ms"},"eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eager Eot Threshold"},"eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eot Timeout Ms"},"filler_style":{"type":"string","enum":["backchannel","phrase","silent"],"title":"Filler Style","default":"backchannel"},"filler_vocabulary":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filler Vocabulary"},"backchannel_delay_ms":{"type":"integer","title":"Backchannel Delay Ms","default":400},"max_response_sentences":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Sentences"},"max_response_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Words"},"barge_in_min_speech_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Min Speech S"},"barge_in_cooldown_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Cooldown S"},"forward_call_enabled":{"type":"boolean","title":"Forward Call Enabled","default":false}},"type":"object","title":"ServiceVoiceConfig","description":"Per-service voice pipeline tuning. Overrides workspace/env defaults.\n\nEach field is optional — None means inherit from the layer above\n(workspace VoiceSettings → env vars → hardcoded defaults)."}}}}
```

## The PaginatedResponse\_SkillResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_SkillResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SkillResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[SkillResponse]"},"SkillResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"result_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Schema"},"model":{"type":"string","title":"Model"},"max_tokens":{"type":"integer","title":"Max Tokens"},"max_result_chars":{"type":"integer","title":"Max Result Chars"},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"timeout_s":{"type":"number","title":"Timeout S"},"thinking_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Thinking Effort"},"enable_caching":{"type":"boolean","title":"Enable Caching"},"enable_citations":{"type":"boolean","title":"Enable Citations"},"use_structured_output":{"type":"boolean","title":"Use Structured Output"},"integration_tools":{"items":{"$ref":"#/components/schemas/src__models__IntegrationToolRef"},"type":"array","title":"Integration Tools"},"static_tools":{"items":{"$ref":"#/components/schemas/src__models__StaticToolDef"},"type":"array","title":"Static Tools"},"delivery":{"type":"string","enum":["interrupt","queue"],"title":"Delivery"},"urgency_keywords":{"items":{"type":"string"},"type":"array","title":"Urgency Keywords"},"enabled":{"type":"boolean","title":"Enabled"},"execution_tier":{"type":"string","enum":["direct","orchestrated","autonomous","browser"],"title":"Execution Tier"},"max_agent_turns":{"type":"integer","title":"Max Agent Turns"},"checkpoint_enabled":{"type":"boolean","title":"Checkpoint Enabled"},"approval_required":{"type":"boolean","title":"Approval Required"},"browser_start_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Start Url"},"browser_allowed_domains":{"items":{"type":"string"},"type":"array","title":"Browser Allowed Domains"},"browser_auth_integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Auth Integration"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","slug","name","description","system_prompt","input_schema","result_schema","model","max_tokens","max_result_chars","max_input_tokens","timeout_s","thinking_effort","enable_caching","enable_citations","use_structured_output","integration_tools","static_tools","delivery","urgency_keywords","enabled","execution_tier","max_agent_turns","checkpoint_enabled","approval_required","browser_start_url","browser_allowed_domains","browser_auth_integration","version","created_at","updated_at"],"title":"SkillResponse"},"src__models__IntegrationToolRef":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef","description":"Reference to an integration endpoint by integration + endpoint name."},"src__models__StaticToolDef":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef","description":"A built-in tool available to companion agents."}}}}
```

## The PaginatedResponse\_SourceEventItem\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_SourceEventItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SourceEventItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[SourceEventItem]"},"SourceEventItem":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"source":{"type":"string","title":"Source"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"confidence":{"type":"number","title":"Confidence"},"ingested_at":{"type":"string","format":"date-time","title":"Ingested At"}},"type":"object","required":["id","event_type","source","confidence","ingested_at"],"title":"SourceEventItem"}}}}
```

## The PaginatedResponse\_SurfaceResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_SurfaceResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SurfaceResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[SurfaceResponse]"},"SurfaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"fields_count":{"type":"integer","title":"Fields Count"},"fields":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Fields","default":[]},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"},"context":{"additionalProperties":true,"type":"object","title":"Context","default":{}},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"opened_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opened At"},"submitted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted At"},"submitted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Submitted Data"},"delivery_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Delivery Metadata"}},"type":"object","required":["id","event_id","status","fields_count"],"title":"SurfaceResponse"}}}}
```

## The PaginatedResponse\_UnificationRuleResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_UnificationRuleResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UnificationRuleResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[UnificationRuleResponse]"},"UnificationRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rule_type":{"type":"string","title":"Rule Type"},"data_source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source Id"},"source_event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Event Type"},"target_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Entity Type"},"rule_config":{"additionalProperties":true,"type":"object","title":"Rule Config"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"events_processed":{"type":"integer","title":"Events Processed"},"last_applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Applied At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"agent_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Task Id"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","rule_type","data_source_id","source_event_type","target_entity_type","rule_config","accuracy","events_processed","last_applied_at","created_by","agent_task_id","is_active","created_at","updated_at"],"title":"UnificationRuleResponse"}}}}
```

## The PaginatedResponse\_WorkspaceResponse\_ object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse_WorkspaceResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkspaceResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[WorkspaceResponse]"},"WorkspaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"environment":{"type":"string","title":"Environment"},"backend_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend Org Id"},"region":{"type":"string","title":"Region"},"connector_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Type"},"provisioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Provisioned At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","name","environment","backend_org_id","region","connector_type","provisioned_at","created_at","updated_at"],"title":"WorkspaceResponse"}}}}
```

## The PatientSearchResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PatientSearchResponse":{"properties":{"patients":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Patients"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["patients","total"],"title":"PatientSearchResponse"}}}}
```

## The PatientSummaryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PatientSummaryResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"entity_type":{"type":"string","title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"additionalProperties":true,"type":"object","title":"State"},"event_count":{"type":"integer","title":"Event Count"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["entity_id","entity_type","display_name","state","event_count","last_event_at"],"title":"PatientSummaryResponse"}}}}
```

## The PatientTimelineResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PatientTimelineResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entity_id","events","total"],"title":"PatientTimelineResponse"}}}}
```

## The PerformanceSummaryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PerformanceSummaryResponse":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"total_operators":{"type":"integer","title":"Total Operators"},"online":{"type":"integer","title":"Online"},"busy":{"type":"integer","title":"Busy"},"offline":{"type":"integer","title":"Offline"},"total_escalations_handled":{"type":"integer","title":"Total Escalations Handled"},"avg_handle_time_seconds":{"type":"number","title":"Avg Handle Time Seconds"},"operators":{"items":{"$ref":"#/components/schemas/OperatorPerformanceItem"},"type":"array","title":"Operators"}},"type":"object","required":["workspace_id","total_operators","online","busy","offline","total_escalations_handled","avg_handle_time_seconds","operators"],"title":"PerformanceSummaryResponse"},"OperatorPerformanceItem":{"properties":{"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","title":"Status"},"total_escalations_handled":{"type":"integer","title":"Total Escalations Handled"},"avg_handle_time_seconds":{"type":"number","title":"Avg Handle Time Seconds"},"last_call_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Call At"}},"type":"object","required":["operator_id","name","status","total_escalations_handled","avg_handle_time_seconds","last_call_at"],"title":"OperatorPerformanceItem"}}}}
```

## The PersonaResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PersonaResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"developed_by":{"type":"string","title":"Developed By"},"communication_style":{"additionalProperties":true,"type":"object","title":"Communication Style"},"default_language":{"type":"string","title":"Default Language"},"background":{"type":"string","title":"Background"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","role","developed_by","communication_style","default_language","background","created_at","updated_at"],"title":"PersonaResponse"}}}}
```

## The PhoneNumberCallVolume object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PhoneNumberCallVolume":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"total_calls":{"type":"integer","title":"Total Calls"},"inbound":{"type":"integer","title":"Inbound"},"outbound":{"type":"integer","title":"Outbound"},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"by_date":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Date","default":[]}},"type":"object","required":["phone_number","total_calls","inbound","outbound"],"title":"PhoneNumberCallVolume"}}}}
```

## The PhoneNumberPurchaseResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PhoneNumberPurchaseResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"phone_number":{"type":"string","title":"Phone Number"},"display_name":{"type":"string","title":"Display Name"},"provider_phone_sid":{"type":"string","title":"Provider Phone Sid"},"status":{"type":"string","title":"Status"},"capabilities":{"items":{"type":"string","enum":["inbound","outbound"]},"type":"array","title":"Capabilities"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","workspace_id","phone_number","display_name","provider_phone_sid","status","capabilities","created_at"],"title":"PhoneNumberPurchaseResponse"}}}}
```

## The PhoneNumberResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PhoneNumberResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"phone_number":{"type":"string","title":"Phone Number"},"display_name":{"type":"string","title":"Display Name"},"provider":{"type":"string","title":"Provider"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"status":{"type":"string","title":"Status"},"inbound_service_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Service Id"},"provider_phone_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Phone Sid"},"notes":{"type":"string","title":"Notes"},"forwarding":{"anyOf":[{"$ref":"#/components/schemas/ForwardingConfigResponse"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","phone_number","display_name","provider","capabilities","status","inbound_service_id","provider_phone_sid","notes","forwarding","created_at","updated_at"],"title":"PhoneNumberResponse"},"ForwardingConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"forward_to":{"type":"string","title":"Forward To"},"should_disconnect":{"type":"boolean","title":"Should Disconnect"}},"type":"object","required":["enabled","forward_to","should_disconnect"],"title":"ForwardingConfigResponse"}}}}
```

## The PipelineMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PipelineMetrics":{"properties":{"sources_total":{"type":"integer","title":"Sources Total","default":0},"sources_healthy":{"type":"integer","title":"Sources Healthy","default":0},"sources_degraded":{"type":"integer","title":"Sources Degraded","default":0},"sources_failing":{"type":"integer","title":"Sources Failing","default":0},"events_last_hour":{"type":"integer","title":"Events Last Hour","default":0},"outbound_pending":{"type":"integer","title":"Outbound Pending","default":0},"outbound_failed":{"type":"integer","title":"Outbound Failed","default":0},"connector_status":{"type":"string","title":"Connector Status","default":"unavailable"}},"type":"object","title":"PipelineMetrics"}}}}
```

## The PipelineStatusResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PipelineStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"connector_runner_status":{"type":"string","title":"Connector Runner Status"},"uptime_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Uptime Seconds"},"active_polls":{"type":"integer","title":"Active Polls","default":0},"total_events":{"type":"integer","title":"Total Events","default":0},"total_entities":{"type":"integer","title":"Total Entities","default":0},"sources":{"items":{"$ref":"#/components/schemas/SourceStatus"},"type":"array","title":"Sources","default":[]},"entity_resolution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Resolution"},"review_loop":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Review Loop"},"outbound_dispatch":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outbound Dispatch"},"outbound_subscriber":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outbound Subscriber"},"reconciliation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reconciliation"},"gap_scanner":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gap Scanner"}},"type":"object","required":["status","connector_runner_status"],"title":"PipelineStatusResponse"},"SourceStatus":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"source_type":{"type":"string","title":"Source Type"},"connector_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Type"},"status":{"type":"string","title":"Status"},"last_poll_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Poll At"},"last_poll_duration_ms":{"type":"integer","title":"Last Poll Duration Ms","default":0},"last_poll_event_count":{"type":"integer","title":"Last Poll Event Count","default":0},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"consecutive_errors":{"type":"integer","title":"Consecutive Errors","default":0},"connection_healthy":{"type":"boolean","title":"Connection Healthy","default":true}},"type":"object","required":["data_source_id","workspace_id","source_type","status"],"title":"SourceStatus"}}}}
```

## The PriorityQueueItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PriorityQueueItem":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"caller_id":{"type":"string","title":"Caller Id","default":""},"service_id":{"type":"string","title":"Service Id","default":""},"direction":{"type":"string","title":"Direction","default":"inbound"},"priority_score":{"type":"number","maximum":1,"minimum":0,"title":"Priority Score"},"priority_reasons":{"items":{"type":"string","enum":["high_risk","long_wait","negative_emotion","safety_concern","looping"]},"type":"array","title":"Priority Reasons","default":[]},"wait_seconds":{"type":"number","title":"Wait Seconds","default":0},"risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Score"},"current_emotion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Emotion"},"current_valence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Valence"},"current_state":{"type":"string","title":"Current State","default":""},"turn_count":{"type":"integer","title":"Turn Count","default":0},"escalation_active":{"type":"boolean","title":"Escalation Active","default":false},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"brief_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brief Context"}},"type":"object","required":["call_sid","priority_score"],"title":"PriorityQueueItem","description":"An active call ranked by operator priority."}}}}
```

## The PriorityQueueResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PriorityQueueResponse":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"queue":{"items":{"$ref":"#/components/schemas/PriorityQueueItem"},"type":"array","title":"Queue"},"total_active":{"type":"integer","title":"Total Active"}},"type":"object","required":["workspace_id","queue","total_active"],"title":"PriorityQueueResponse"},"PriorityQueueItem":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"caller_id":{"type":"string","title":"Caller Id","default":""},"service_id":{"type":"string","title":"Service Id","default":""},"direction":{"type":"string","title":"Direction","default":"inbound"},"priority_score":{"type":"number","maximum":1,"minimum":0,"title":"Priority Score"},"priority_reasons":{"items":{"type":"string","enum":["high_risk","long_wait","negative_emotion","safety_concern","looping"]},"type":"array","title":"Priority Reasons","default":[]},"wait_seconds":{"type":"number","title":"Wait Seconds","default":0},"risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Score"},"current_emotion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Emotion"},"current_valence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Valence"},"current_state":{"type":"string","title":"Current State","default":""},"turn_count":{"type":"integer","title":"Turn Count","default":0},"escalation_active":{"type":"boolean","title":"Escalation Active","default":false},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"brief_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brief Context"}},"type":"object","required":["call_sid","priority_score"],"title":"PriorityQueueItem","description":"An active call ranked by operator priority."}}}}
```

## The ProvisionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ProvisionResponse":{"properties":{"workspace":{"$ref":"#/components/schemas/WorkspaceResponse"}},"type":"object","required":["workspace"],"title":"ProvisionResponse"},"WorkspaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"environment":{"type":"string","title":"Environment"},"backend_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend Org Id"},"region":{"type":"string","title":"Region"},"connector_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Type"},"provisioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Provisioned At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","name","environment","backend_org_id","region","connector_type","provisioned_at","created_at","updated_at"],"title":"WorkspaceResponse"}}}}
```

## The PurchasePhoneNumberRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PurchasePhoneNumberRequest":{"properties":{"phone_number":{"type":"string","maxLength":16,"title":"Phone Number"},"display_name":{"type":"string","maxLength":256,"title":"Display Name","default":""},"capabilities":{"items":{"type":"string","enum":["inbound","outbound"]},"type":"array","title":"Capabilities","default":["inbound","outbound"]}},"type":"object","required":["phone_number"],"title":"PurchasePhoneNumberRequest"}}}}
```

## The PurgeEntityResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"PurgeEntityResponse":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"events_deleted":{"type":"integer","title":"Events Deleted"},"edges_deleted":{"type":"integer","title":"Edges Deleted"},"entity_deleted":{"type":"boolean","title":"Entity Deleted"}},"type":"object","required":["entity_id","display_name","events_deleted","edges_deleted","entity_deleted"],"title":"PurgeEntityResponse"}}}}
```

## The QualityBreakdown object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"QualityBreakdown":{"properties":{"score":{"type":"number","title":"Score"},"components":{"items":{"$ref":"#/components/schemas/QualityComponent"},"type":"array","title":"Components"},"workspace_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Workspace Avg"},"workspace_percentile":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Workspace Percentile"}},"type":"object","required":["score","components"],"title":"QualityBreakdown","description":"Structured breakdown of how quality score was computed."},"QualityComponent":{"properties":{"name":{"type":"string","title":"Name"},"penalty":{"type":"number","title":"Penalty"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"threshold":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Threshold"},"severity":{"type":"string","title":"Severity","default":"none"}},"type":"object","required":["name","penalty"],"title":"QualityComponent","description":"Single quality score component with penalty and context."}}}}
```

## The QualityComponent object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"QualityComponent":{"properties":{"name":{"type":"string","title":"Name"},"penalty":{"type":"number","title":"Penalty"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"threshold":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Threshold"},"severity":{"type":"string","title":"Severity","default":"none"}},"type":"object","required":["name","penalty"],"title":"QualityComponent","description":"Single quality score component with penalty and context."}}}}
```

## The QueryRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"QueryRequest":{"properties":{"sql":{"type":"string","maxLength":4000,"title":"Sql","description":"Read-only SQL SELECT statement"}},"type":"object","required":["sql"],"title":"QueryRequest","description":"Execute an open-scope SQL query."}}}}
```

## The QueryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"QueryResponse":{"properties":{"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"count":{"type":"integer","title":"Count","default":0},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"QueryResponse"}}}}
```

## The QuietHours object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"QuietHours":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"start_hour":{"type":"integer","maximum":23,"minimum":0,"title":"Start Hour","default":21},"end_hour":{"type":"integer","maximum":23,"minimum":0,"title":"End Hour","default":8},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"America/New_York"}},"type":"object","title":"QuietHours","description":"TCPA-compliant quiet hours — no outbound SMS during this window."}}}}
```

## The RecommendRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RecommendRequest":{"properties":{"session_id":{"type":"string","maxLength":64,"title":"Session Id"},"n":{"type":"integer","maximum":20,"minimum":1,"title":"N","default":5}},"type":"object","required":["session_id"],"title":"RecommendRequest"}}}}
```

## The RecordingMetadataResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RecordingMetadataResponse":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"workspace_id":{"type":"string","title":"Workspace Id"},"service_id":{"type":"string","title":"Service Id"},"direction":{"type":"string","title":"Direction"},"duration_seconds":{"type":"number","title":"Duration Seconds"},"inbound_format":{"type":"string","title":"Inbound Format"},"inbound_sample_rate":{"type":"integer","title":"Inbound Sample Rate"},"outbound_format":{"type":"string","title":"Outbound Format"},"outbound_sample_rate":{"type":"integer","title":"Outbound Sample Rate"},"tts_provider":{"type":"string","title":"Tts Provider"},"call_start_iso":{"type":"string","title":"Call Start Iso"},"call_end_iso":{"type":"string","title":"Call End Iso"},"inbound_size_bytes":{"type":"integer","title":"Inbound Size Bytes"},"outbound_size_bytes":{"type":"integer","title":"Outbound Size Bytes"},"media_start_epoch_ms":{"type":"number","title":"Media Start Epoch Ms"}},"type":"object","required":["call_sid","workspace_id","service_id","direction","duration_seconds","inbound_format","inbound_sample_rate","outbound_format","outbound_sample_rate","tts_provider","call_start_iso","call_end_iso","inbound_size_bytes","outbound_size_bytes","media_start_epoch_ms"],"title":"RecordingMetadataResponse","description":"Call recording metadata."}}}}
```

## The RecordingUrlsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RecordingUrlsResponse":{"properties":{"call_sid":{"type":"string","title":"Call Sid"},"status":{"type":"string","const":"available","title":"Status","default":"available"},"inbound_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Url"},"outbound_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Url"},"metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Url"}},"type":"object","required":["call_sid"],"title":"RecordingUrlsResponse","description":"Download paths for call recording playback."}}}}
```

## The RegulationTemplateResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RegulationTemplateResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"regulation":{"type":"string","title":"Regulation"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"version":{"type":"string","title":"Version"},"rules":{"items":{"$ref":"#/components/schemas/SafetyRuleResponse"},"type":"array","title":"Rules"},"is_composite":{"type":"boolean","title":"Is Composite","default":false},"template_ids":{"items":{"type":"string"},"type":"array","title":"Template Ids"}},"type":"object","required":["id","name","regulation","description","category","version","rules"],"title":"RegulationTemplateResponse"},"SafetyRuleResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"triage_hints":{"items":{"type":"string"},"type":"array","title":"Triage Hints"},"threshold":{"type":"number","title":"Threshold"},"standalone_threshold":{"type":"number","title":"Standalone Threshold"},"agent_config":{"additionalProperties":true,"type":"object","title":"Agent Config"},"escalation":{"additionalProperties":true,"type":"object","title":"Escalation"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["name","description","triage_hints","threshold","standalone_threshold","agent_config","escalation","tags"],"title":"SafetyRuleResponse"}}}}
```

## The RejectICD10Request object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RejectICD10Request":{"properties":{"code":{"type":"string","maxLength":16,"title":"Code"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","required":["code"],"title":"RejectICD10Request"}}}}
```

## The RejectRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RejectRequest":{"properties":{"reason":{"type":"string","maxLength":2000,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"RejectRequest","description":"Reject events — demotes confidence to 0.0."}}}}
```

## The RejectSurfaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RejectSurfaceRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"type":"object","title":"RejectSurfaceRequest"}}}}
```

## The RelationshipToDeveloper object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RelationshipToDeveloper":{"properties":{"ownership":{"type":"string","title":"Ownership"},"type":{"type":"string","title":"Type"},"conversation_visibility":{"type":"string","title":"Conversation Visibility"},"thought_visibility":{"type":"string","title":"Thought Visibility"}},"type":"object","required":["ownership","type","conversation_visibility","thought_visibility"],"title":"RelationshipToDeveloper"}}}}
```

## The ResolveTemplateRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ResolveTemplateRequest":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"}},"type":"object","required":["entity_id"],"title":"ResolveTemplateRequest","description":"Resolve a form template for a specific entity."}}}}
```

## The ResolveTemplateResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ResolveTemplateResponse":{"properties":{"spec":{"$ref":"#/components/schemas/SurfaceSpec"},"prefilled_count":{"type":"integer","title":"Prefilled Count"},"total_fields":{"type":"integer","title":"Total Fields"}},"type":"object","required":["spec","prefilled_count","total_fields"],"title":"ResolveTemplateResponse","description":"Resolved SurfaceSpec with prefill values."},"SurfaceSpec":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"fields":{"items":{"$ref":"#/components/schemas/SurfaceField"},"type":"array","maxItems":100,"minItems":1,"title":"Fields"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"web"},"expires_in_hours":{"type":"integer","maximum":8760,"minimum":1,"title":"Expires In Hours","default":168},"context":{"additionalProperties":true,"type":"object","title":"Context"},"resource_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Resource Type"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"sections":{"anyOf":[{"items":{"$ref":"#/components/schemas/SurfaceSection"},"type":"array"},{"type":"null"}],"title":"Sections"},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"}},"type":"object","required":["entity_id","title","fields"],"title":"SurfaceSpec","description":"A complete surface specification generated by an agent.\n\nThe agent reads the HSM (entity state, relationships,\nconfidence gaps) and produces this spec. The spec is stored as a\nworld.event and rendered by platform-api into a patient-facing page."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"SurfaceField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"prefill_value":{"anyOf":[{},{"type":"null"}],"title":"Prefill Value"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"}},"type":"object","required":["key","label","field_type"],"title":"SurfaceField","description":"A single data collection field in a surface spec.\n\nGenerated by agents from HSM analysis. Each field maps\nto a specific piece of data the world model needs."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."},"SurfaceSection":{"properties":{"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["title","field_keys"],"title":"SurfaceSection","description":"A page/step in a multi-page surface form."}}}}
```

## The ResolvedToolItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ResolvedToolItem":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"tool_type":{"type":"string","title":"Tool Type"},"description":{"type":"string","title":"Description","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"states":{"items":{"type":"string"},"type":"array","title":"States"},"tier":{"type":"string","title":"Tier","default":"world"},"is_write":{"type":"boolean","title":"Is Write","default":false},"additional_instructions":{"additionalProperties":{"type":"string"},"type":"object","title":"Additional Instructions"}},"type":"object","required":["tool_name","tool_type"],"title":"ResolvedToolItem"}}}}
```

## The RetentionPolicyRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RetentionPolicyRequest":{"properties":{"call_recordings_days":{"anyOf":[{"type":"integer","maximum":36500,"minimum":365},{"type":"null"}],"title":"Call Recordings Days"},"call_transcripts_days":{"anyOf":[{"type":"integer","maximum":36500,"minimum":365},{"type":"null"}],"title":"Call Transcripts Days"},"audit_log_days":{"anyOf":[{"type":"integer","maximum":36500,"minimum":365},{"type":"null"}],"title":"Audit Log Days"},"world_events_days":{"anyOf":[{"type":"integer","maximum":36500,"minimum":365},{"type":"null"}],"title":"World Events Days"},"phi_data_days":{"anyOf":[{"type":"integer","maximum":36500,"minimum":365},{"type":"null"}],"title":"Phi Data Days"},"legal_hold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Legal Hold"},"legal_hold_reason":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","title":"RetentionPolicyRequest"},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The RetentionPolicyResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RetentionPolicyResponse":{"properties":{"call_recordings_days":{"type":"integer","title":"Call Recordings Days"},"call_transcripts_days":{"type":"integer","title":"Call Transcripts Days"},"audit_log_days":{"type":"integer","title":"Audit Log Days"},"world_events_days":{"type":"integer","title":"World Events Days"},"phi_data_days":{"type":"integer","title":"Phi Data Days"},"legal_hold":{"type":"boolean","title":"Legal Hold"},"legal_hold_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Hold Reason"}},"type":"object","required":["call_recordings_days","call_transcripts_days","audit_log_days","world_events_days","phi_data_days","legal_hold"],"title":"RetentionPolicyResponse"}}}}
```

## The RetryConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The ReviewActionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ReviewActionResponse":{"properties":{"surface_id":{"type":"string","title":"Surface Id"},"status":{"type":"string","title":"Status"},"action":{"type":"string","title":"Action"}},"type":"object","required":["surface_id","status","action"],"title":"ReviewActionResponse"}}}}
```

## The ReviewDashboardResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ReviewDashboardResponse":{"properties":{"stats":{"$ref":"#/components/schemas/ReviewStatsResponse"},"pending_by_priority":{"additionalProperties":{"type":"integer"},"type":"object","title":"Pending By Priority"},"pending_by_reason":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pending By Reason"},"recent_completed":{"items":{"$ref":"#/components/schemas/ReviewItemResponse"},"type":"array","title":"Recent Completed"},"completion_rate_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Completion Rate 24H"}},"type":"object","required":["stats","pending_by_priority","pending_by_reason","recent_completed","completion_rate_24h"],"title":"ReviewDashboardResponse","description":"Composite dashboard for the review queue page."},"ReviewStatsResponse":{"properties":{"pending":{"type":"integer","title":"Pending"},"completed":{"type":"integer","title":"Completed"},"rejected":{"type":"integer","title":"Rejected"},"avg_review_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Review Minutes"}},"type":"object","required":["pending","completed","rejected","avg_review_minutes"],"title":"ReviewStatsResponse"},"ReviewItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","created_at","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status","created_at"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."}}}}
```

## The ReviewDiffResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ReviewDiffResponse":{"properties":{"item_id":{"type":"string","title":"Item Id"},"original_events":{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array","title":"Original Events"},"corrected_events":{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array","title":"Corrected Events"}},"type":"object","required":["item_id","original_events","corrected_events"],"title":"ReviewDiffResponse","description":"Original vs corrected event data for a completed correction."},"EventSummary":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status","created_at"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."}}}}
```

## The ReviewItemResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ReviewItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","created_at","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status","created_at"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."}}}}
```

## The ReviewMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ReviewMetrics":{"properties":{"queue_depth":{"type":"integer","title":"Queue Depth"},"pending_by_priority":{"additionalProperties":{"type":"integer"},"type":"object","title":"Pending By Priority"},"approved_7d":{"type":"integer","title":"Approved 7D"},"rejected_7d":{"type":"integer","title":"Rejected 7D"},"avg_review_time_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Review Time Hours"},"total_items":{"type":"integer","title":"Total Items","default":0}},"type":"object","required":["queue_depth","pending_by_priority","approved_7d","rejected_7d"],"title":"ReviewMetrics"}}}}
```

## The ReviewStatsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ReviewStatsResponse":{"properties":{"pending":{"type":"integer","title":"Pending"},"completed":{"type":"integer","title":"Completed"},"rejected":{"type":"integer","title":"Rejected"},"avg_review_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Review Minutes"}},"type":"object","required":["pending","completed","rejected","avg_review_minutes"],"title":"ReviewStatsResponse"}}}}
```

## The RiskSignalConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RiskSignalConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"weights":{"additionalProperties":{"type":"number"},"type":"object","title":"Weights","default":{}},"auto_escalate_threshold":{"type":"number","title":"Auto Escalate Threshold","default":70},"alert_threshold":{"type":"number","title":"Alert Threshold","default":50},"monitor_threshold":{"type":"number","title":"Monitor Threshold","default":30}},"type":"object","title":"RiskSignalConfig","description":"Per-workspace risk scoring config. Stored on Service."}}}}
```

## The RotateApiKeyRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"RotateApiKeyRequest":{"properties":{"duration_days":{"type":"integer","maximum":90,"minimum":1,"title":"Duration Days"}},"type":"object","required":["duration_days"],"title":"RotateApiKeyRequest"}}}}
```

## The SafetyConfigResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SafetyConfigResponse":{"properties":{"triage_enabled":{"type":"boolean","title":"Triage Enabled"},"triage_model":{"type":"string","title":"Triage Model"},"triage_timeout_s":{"type":"number","title":"Triage Timeout S"},"triage_max_history_turns":{"type":"integer","title":"Triage Max History Turns"},"accumulation_enabled":{"type":"boolean","title":"Accumulation Enabled"},"accumulation_window_size":{"type":"integer","title":"Accumulation Window Size"},"accumulation_single_turn_threshold":{"type":"integer","title":"Accumulation Single Turn Threshold"},"accumulation_cumulative_count":{"type":"integer","title":"Accumulation Cumulative Count"},"accumulation_mild_threshold":{"type":"integer","title":"Accumulation Mild Threshold"},"accumulation_fast_track_level":{"type":"integer","title":"Accumulation Fast Track Level"},"applied_template_ids":{"items":{"type":"string"},"type":"array","title":"Applied Template Ids"}},"type":"object","required":["triage_enabled","triage_model","triage_timeout_s","triage_max_history_turns","accumulation_enabled","accumulation_window_size","accumulation_single_turn_threshold","accumulation_cumulative_count","accumulation_mild_threshold","accumulation_fast_track_level","applied_template_ids"],"title":"SafetyConfigResponse"}}}}
```

## The SafetyRuleResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SafetyRuleResponse":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"triage_hints":{"items":{"type":"string"},"type":"array","title":"Triage Hints"},"threshold":{"type":"number","title":"Threshold"},"standalone_threshold":{"type":"number","title":"Standalone Threshold"},"agent_config":{"additionalProperties":true,"type":"object","title":"Agent Config"},"escalation":{"additionalProperties":true,"type":"object","title":"Escalation"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["name","description","triage_hints","threshold","standalone_threshold","agent_config","escalation","tags"],"title":"SafetyRuleResponse"}}}}
```

## The SchemaResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SchemaResponse":{"properties":{"lakebase_tables":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Lakebase Tables"},"databricks_catalogs":{"items":{"type":"string"},"type":"array","title":"Databricks Catalogs"},"uc_functions":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Uc Functions"},"ai_functions":{"items":{"type":"string"},"type":"array","title":"Ai Functions"}},"type":"object","required":["lakebase_tables","databricks_catalogs","uc_functions","ai_functions"],"title":"SchemaResponse"}}}}
```

## The ScoreSessionRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ScoreSessionRequest":{"properties":{"score":{"type":"number","maximum":100,"minimum":0,"title":"Score"},"score_rationale":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Score Rationale"}},"type":"object","required":["score"],"title":"ScoreSessionRequest"}}}}
```

## The ScribeCdsConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ScribeCdsConfig":{"properties":{"care_gap_surfacing":{"type":"boolean","title":"Care Gap Surfacing","default":true},"icd10_auto_suggest":{"type":"boolean","title":"Icd10 Auto Suggest","default":true},"guideline_matching":{"type":"boolean","title":"Guideline Matching","default":false},"documentation_completeness":{"type":"boolean","title":"Documentation Completeness","default":true}},"type":"object","title":"ScribeCdsConfig","description":"Clinical decision support configuration (V2/V3 workers)."}}}}
```

## The ScribeClinician object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ScribeClinician":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Name"},"role":{"type":"string","maxLength":64,"title":"Role","default":"clinician"}},"type":"object","required":["email"],"title":"ScribeClinician","description":"A clinician authorized to use Superscribe."}}}}
```

## The ScribePostEncounterConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ScribePostEncounterConfig":{"properties":{"auto_polish_note":{"type":"boolean","title":"Auto Polish Note","default":true},"order_preparation":{"type":"boolean","title":"Order Preparation","default":false},"education_materials":{"type":"boolean","title":"Education Materials","default":false},"follow_up_surface":{"type":"boolean","title":"Follow Up Surface","default":false}},"type":"object","title":"ScribePostEncounterConfig","description":"Post-encounter automation configuration."}}}}
```

## The ScribeSafetyConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ScribeSafetyConfig":{"properties":{"drug_interaction_checking":{"type":"boolean","title":"Drug Interaction Checking","default":true},"allergy_cross_reference":{"type":"boolean","title":"Allergy Cross Reference","default":true},"crisis_detection":{"type":"boolean","title":"Crisis Detection","default":true},"vital_range_alerting":{"type":"boolean","title":"Vital Range Alerting","default":true}},"type":"object","title":"ScribeSafetyConfig","description":"V0 sentinel and safety configuration."}}}}
```

## The ScribeSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ScribeSettingsRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"authorized_clinicians":{"anyOf":[{"items":{"$ref":"#/components/schemas/ScribeClinician"},"type":"array","maxItems":500},{"type":"null"}],"title":"Authorized Clinicians"},"soap_style":{"anyOf":[{"type":"string","enum":["concise","detailed","structured"]},{"type":"null"}],"title":"Soap Style"},"safety":{"anyOf":[{"$ref":"#/components/schemas/ScribeSafetyConfig"},{"type":"null"}]},"cds":{"anyOf":[{"$ref":"#/components/schemas/ScribeCdsConfig"},{"type":"null"}]},"post_encounter":{"anyOf":[{"$ref":"#/components/schemas/ScribePostEncounterConfig"},{"type":"null"}]},"voice_auth_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Voice Auth Enabled"}},"type":"object","title":"ScribeSettingsRequest","description":"Partial update — only provided fields are changed."},"ScribeClinician":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Name"},"role":{"type":"string","maxLength":64,"title":"Role","default":"clinician"}},"type":"object","required":["email"],"title":"ScribeClinician","description":"A clinician authorized to use Superscribe."},"ScribeSafetyConfig":{"properties":{"drug_interaction_checking":{"type":"boolean","title":"Drug Interaction Checking","default":true},"allergy_cross_reference":{"type":"boolean","title":"Allergy Cross Reference","default":true},"crisis_detection":{"type":"boolean","title":"Crisis Detection","default":true},"vital_range_alerting":{"type":"boolean","title":"Vital Range Alerting","default":true}},"type":"object","title":"ScribeSafetyConfig","description":"V0 sentinel and safety configuration."},"ScribeCdsConfig":{"properties":{"care_gap_surfacing":{"type":"boolean","title":"Care Gap Surfacing","default":true},"icd10_auto_suggest":{"type":"boolean","title":"Icd10 Auto Suggest","default":true},"guideline_matching":{"type":"boolean","title":"Guideline Matching","default":false},"documentation_completeness":{"type":"boolean","title":"Documentation Completeness","default":true}},"type":"object","title":"ScribeCdsConfig","description":"Clinical decision support configuration (V2/V3 workers)."},"ScribePostEncounterConfig":{"properties":{"auto_polish_note":{"type":"boolean","title":"Auto Polish Note","default":true},"order_preparation":{"type":"boolean","title":"Order Preparation","default":false},"education_materials":{"type":"boolean","title":"Education Materials","default":false},"follow_up_surface":{"type":"boolean","title":"Follow Up Surface","default":false}},"type":"object","title":"ScribePostEncounterConfig","description":"Post-encounter automation configuration."}}}}
```

## The ScribeSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ScribeSettingsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"authorized_clinicians":{"items":{"$ref":"#/components/schemas/ScribeClinician"},"type":"array","title":"Authorized Clinicians"},"soap_style":{"type":"string","enum":["concise","detailed","structured"],"title":"Soap Style","default":"concise"},"safety":{"$ref":"#/components/schemas/ScribeSafetyConfig"},"cds":{"$ref":"#/components/schemas/ScribeCdsConfig"},"post_encounter":{"$ref":"#/components/schemas/ScribePostEncounterConfig"},"voice_auth_enabled":{"type":"boolean","title":"Voice Auth Enabled","default":false}},"type":"object","required":["enabled","authorized_clinicians"],"title":"ScribeSettingsResponse"},"ScribeClinician":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Name"},"role":{"type":"string","maxLength":64,"title":"Role","default":"clinician"}},"type":"object","required":["email"],"title":"ScribeClinician","description":"A clinician authorized to use Superscribe."},"ScribeSafetyConfig":{"properties":{"drug_interaction_checking":{"type":"boolean","title":"Drug Interaction Checking","default":true},"allergy_cross_reference":{"type":"boolean","title":"Allergy Cross Reference","default":true},"crisis_detection":{"type":"boolean","title":"Crisis Detection","default":true},"vital_range_alerting":{"type":"boolean","title":"Vital Range Alerting","default":true}},"type":"object","title":"ScribeSafetyConfig","description":"V0 sentinel and safety configuration."},"ScribeCdsConfig":{"properties":{"care_gap_surfacing":{"type":"boolean","title":"Care Gap Surfacing","default":true},"icd10_auto_suggest":{"type":"boolean","title":"Icd10 Auto Suggest","default":true},"guideline_matching":{"type":"boolean","title":"Guideline Matching","default":false},"documentation_completeness":{"type":"boolean","title":"Documentation Completeness","default":true}},"type":"object","title":"ScribeCdsConfig","description":"Clinical decision support configuration (V2/V3 workers)."},"ScribePostEncounterConfig":{"properties":{"auto_polish_note":{"type":"boolean","title":"Auto Polish Note","default":true},"order_preparation":{"type":"boolean","title":"Order Preparation","default":false},"education_materials":{"type":"boolean","title":"Education Materials","default":false},"follow_up_surface":{"type":"boolean","title":"Follow Up Surface","default":false}},"type":"object","title":"ScribePostEncounterConfig","description":"Post-encounter automation configuration."}}}}
```

## The SearchAvailableNumbersResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SearchAvailableNumbersResponse":{"properties":{"numbers":{"items":{"$ref":"#/components/schemas/AvailableNumber"},"type":"array","title":"Numbers"}},"type":"object","required":["numbers"],"title":"SearchAvailableNumbersResponse"},"AvailableNumber":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"friendly_name":{"type":"string","title":"Friendly Name"},"locality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locality"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"capabilities":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Capabilities","default":{}}},"type":"object","required":["phone_number","friendly_name"],"title":"AvailableNumber"}}}}
```

## The SearchString object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SearchString":{"type":"string","maxLength":200,"minLength":1}}}}
```

## The SecretInput object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SecretInput":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"SecretInput","description":"Inline secret value — auto-provisioned to SSM on create/update."}}}}
```

## The SendGuidanceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SendGuidanceRequest":{"properties":{"call_sid":{"type":"string","maxLength":64,"minLength":1,"title":"Call Sid"},"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"}},"type":"object","required":["call_sid","message"],"title":"SendGuidanceRequest"}}}}
```

## The SendGuidanceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SendGuidanceResponse":{"properties":{"status":{"type":"string","title":"Status"},"call_sid":{"type":"string","title":"Call Sid"}},"type":"object","required":["status","call_sid"],"title":"SendGuidanceResponse"}}}}
```

## The Service object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"Service":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"agent_id":{"type":"string","title":"Agent Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"keyterms":{"items":{"type":"string"},"type":"array","title":"Keyterms"},"is_active":{"type":"boolean","title":"Is Active"},"version_sets":{"additionalProperties":{"$ref":"#/components/schemas/VersionSet"},"type":"object","title":"Version Sets"},"tags":{"items":{"$ref":"#/components/schemas/ServiceTag"},"type":"array","title":"Tags"},"tool_capacity":{"type":"integer","title":"Tool Capacity","default":3},"safety_filters_enabled":{"type":"boolean","title":"Safety Filters Enabled","default":true},"channel_type":{"type":"string","enum":["voice","text","scribe"],"title":"Channel Type","default":"voice"},"environment":{"type":"string","enum":["sandbox","production"],"title":"Environment","default":"production"},"persona_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Id"},"risk_signal_config":{"anyOf":[{"$ref":"#/components/schemas/RiskSignalConfig"},{"type":"null"}]},"hard_escalation_rules":{"items":{"$ref":"#/components/schemas/HardEscalationRule"},"type":"array","title":"Hard Escalation Rules","default":[]},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/ServiceVoiceConfig"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","description","agent_id","context_graph_id","keyterms","is_active","version_sets","tags"],"title":"Service","description":"A service links an agent + context graph + version sets."},"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"},"ServiceTag":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key"],"title":"ServiceTag"},"RiskSignalConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"weights":{"additionalProperties":{"type":"number"},"type":"object","title":"Weights","default":{}},"auto_escalate_threshold":{"type":"number","title":"Auto Escalate Threshold","default":70},"alert_threshold":{"type":"number","title":"Alert Threshold","default":50},"monitor_threshold":{"type":"number","title":"Monitor Threshold","default":30}},"type":"object","title":"RiskSignalConfig","description":"Per-workspace risk scoring config. Stored on Service."},"HardEscalationRule":{"properties":{"name":{"type":"string","title":"Name"},"operator_type":{"type":"string","title":"Operator Type"},"reason":{"type":"string","title":"Reason"},"regulatory_basis":{"type":"string","title":"Regulatory Basis"},"immediate":{"type":"boolean","title":"Immediate","default":false},"detection":{"type":"string","enum":["intent","state","fhir"],"title":"Detection"},"intent_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Intent Patterns"}},"type":"object","required":["name","operator_type","reason","regulatory_basis","detection"],"title":"HardEscalationRule","description":"Non-negotiable escalation rule for healthcare compliance."},"ServiceVoiceConfig":{"properties":{"tts_model":{"anyOf":[{"type":"string","enum":["sonic-turbo","sonic-3"]},{"type":"null"}],"title":"Tts Model"},"max_buffer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Buffer Delay Ms"},"eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eager Eot Threshold"},"eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eot Timeout Ms"},"filler_style":{"type":"string","enum":["backchannel","phrase","silent"],"title":"Filler Style","default":"backchannel"},"filler_vocabulary":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filler Vocabulary"},"backchannel_delay_ms":{"type":"integer","title":"Backchannel Delay Ms","default":400},"max_response_sentences":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Sentences"},"max_response_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Words"},"barge_in_min_speech_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Min Speech S"},"barge_in_cooldown_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Cooldown S"},"forward_call_enabled":{"type":"boolean","title":"Forward Call Enabled","default":false}},"type":"object","title":"ServiceVoiceConfig","description":"Per-service voice pipeline tuning. Overrides workspace/env defaults.\n\nEach field is optional — None means inherit from the layer above\n(workspace VoiceSettings → env vars → hardcoded defaults)."}}}}
```

## The ServiceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ServiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"agent_id":{"type":"string","title":"Agent Id"},"context_graph_id":{"type":"string","title":"Context Graph Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"context_graph_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Graph Name"},"persona_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Name"},"keyterms":{"items":{"type":"string"},"type":"array","title":"Keyterms"},"is_active":{"type":"boolean","title":"Is Active"},"version_sets":{"additionalProperties":{"$ref":"#/components/schemas/VersionSet"},"type":"object","title":"Version Sets"},"tags":{"items":{"$ref":"#/components/schemas/ServiceTag"},"type":"array","title":"Tags"},"tool_capacity":{"type":"integer","title":"Tool Capacity"},"safety_filters_enabled":{"type":"boolean","title":"Safety Filters Enabled","default":true},"channel_type":{"type":"string","enum":["voice","text","scribe"],"title":"Channel Type","default":"voice"},"environment":{"type":"string","enum":["sandbox","production"],"title":"Environment","default":"production"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/ServiceVoiceConfig"},{"type":"null"}]},"persona_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Id"},"is_system":{"type":"boolean","title":"Is System","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","agent_id","context_graph_id","keyterms","is_active","version_sets","tags","tool_capacity","created_at","updated_at"],"title":"ServiceResponse"},"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"},"ServiceTag":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key"],"title":"ServiceTag"},"ServiceVoiceConfig":{"properties":{"tts_model":{"anyOf":[{"type":"string","enum":["sonic-turbo","sonic-3"]},{"type":"null"}],"title":"Tts Model"},"max_buffer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Buffer Delay Ms"},"eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eager Eot Threshold"},"eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eot Timeout Ms"},"filler_style":{"type":"string","enum":["backchannel","phrase","silent"],"title":"Filler Style","default":"backchannel"},"filler_vocabulary":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filler Vocabulary"},"backchannel_delay_ms":{"type":"integer","title":"Backchannel Delay Ms","default":400},"max_response_sentences":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Sentences"},"max_response_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Words"},"barge_in_min_speech_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Min Speech S"},"barge_in_cooldown_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Cooldown S"},"forward_call_enabled":{"type":"boolean","title":"Forward Call Enabled","default":false}},"type":"object","title":"ServiceVoiceConfig","description":"Per-service voice pipeline tuning. Overrides workspace/env defaults.\n\nEach field is optional — None means inherit from the layer above\n(workspace VoiceSettings → env vars → hardcoded defaults)."}}}}
```

## The ServiceTag object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ServiceTag":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key"],"title":"ServiceTag"}}}}
```

## The ServiceVoiceConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ServiceVoiceConfig":{"properties":{"tts_model":{"anyOf":[{"type":"string","enum":["sonic-turbo","sonic-3"]},{"type":"null"}],"title":"Tts Model"},"max_buffer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Buffer Delay Ms"},"eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eager Eot Threshold"},"eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eot Timeout Ms"},"filler_style":{"type":"string","enum":["backchannel","phrase","silent"],"title":"Filler Style","default":"backchannel"},"filler_vocabulary":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filler Vocabulary"},"backchannel_delay_ms":{"type":"integer","title":"Backchannel Delay Ms","default":400},"max_response_sentences":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Sentences"},"max_response_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Words"},"barge_in_min_speech_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Min Speech S"},"barge_in_cooldown_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Cooldown S"},"forward_call_enabled":{"type":"boolean","title":"Forward Call Enabled","default":false}},"type":"object","title":"ServiceVoiceConfig","description":"Per-service voice pipeline tuning. Overrides workspace/env defaults.\n\nEach field is optional — None means inherit from the layer above\n(workspace VoiceSettings → env vars → hardcoded defaults)."}}}}
```

## The SessionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SessionResponse":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id"],"title":"SessionResponse"}}}}
```

## The SimulationIntelligenceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SimulationIntelligenceResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"intelligence":{"additionalProperties":true,"type":"object","title":"Intelligence"}},"type":"object","required":["session_id","intelligence"],"title":"SimulationIntelligenceResponse"}}}}
```

## The SimulationObservation object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SimulationObservation":{"properties":{"state_before":{"type":"string","title":"State Before"},"state_after":{"type":"string","title":"State After"},"state_changed":{"type":"boolean","title":"State Changed"},"agent_text":{"type":"string","title":"Agent Text"},"is_terminal":{"type":"boolean","title":"Is Terminal"},"tools_called":{"items":{"type":"string"},"type":"array","title":"Tools Called","default":[]},"tool_call_details":{"items":{"$ref":"#/components/schemas/ToolCallDetail"},"type":"array","title":"Tool Call Details","default":[]},"selected_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Action"},"empathy_tier":{"type":"integer","title":"Empathy Tier","default":0},"has_pause":{"type":"boolean","title":"Has Pause","default":false}},"type":"object","required":["state_before","state_after","state_changed","agent_text","is_terminal"],"title":"SimulationObservation"},"ToolCallDetail":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"input":{"type":"string","title":"Input","default":""},"result":{"type":"string","title":"Result","default":""},"call_id":{"type":"string","title":"Call Id","default":""},"succeeded":{"type":"boolean","title":"Succeeded","default":true}},"type":"object","required":["tool_name"],"title":"ToolCallDetail","description":"Rich tool call data from a simulation step."}}}}
```

## The SimulationSessionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SimulationSessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"greeting":{"type":"string","title":"Greeting"},"is_terminal":{"type":"boolean","title":"Is Terminal"},"snapshot":{"$ref":"#/components/schemas/SimulationSnapshotResponse"}},"type":"object","required":["session_id","greeting","is_terminal","snapshot"],"title":"SimulationSessionResponse"},"SimulationSnapshotResponse":{"properties":{"current_state":{"$ref":"#/components/schemas/SimulationStateResponse"},"reachable_states":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reachable States","default":[]},"turn_policy":{"$ref":"#/components/schemas/SimulationTurnPolicyResponse","default":{"barge_in_enabled":true,"greeting_shield_s":0,"safety_response":"suspend_forward","context_strategy":"full","block_forward_call":false,"block_forward_call_after_turns":-1}},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"states_visited":{"items":{"type":"string"},"type":"array","title":"States Visited","default":[]},"state_transitions":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"State Transitions","default":[]},"total_turns":{"type":"integer","title":"Total Turns","default":0},"tools_called":{"items":{"type":"string"},"type":"array","title":"Tools Called","default":[]},"terminal_reached":{"type":"boolean","title":"Terminal Reached","default":false},"context_graph_topology":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Context Graph Topology","default":[]},"terminal_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal State"}},"additionalProperties":true,"type":"object","required":["current_state"],"title":"SimulationSnapshotResponse"},"SimulationStateResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"objective":{"type":"string","title":"Objective","default":""},"actions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Actions","default":[]},"exit_conditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Exit Conditions","default":[]},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"guardrails":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Guardrails","default":[]},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]}},"additionalProperties":true,"type":"object","required":["name","type"],"title":"SimulationStateResponse"},"SimulationTurnPolicyResponse":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","title":"Safety Response","default":"suspend_forward"},"context_strategy":{"type":"string","title":"Context Strategy","default":"full"},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","title":"Block Forward Call After Turns","default":-1}},"type":"object","title":"SimulationTurnPolicyResponse"}}}}
```

## The SimulationSnapshotResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SimulationSnapshotResponse":{"properties":{"current_state":{"$ref":"#/components/schemas/SimulationStateResponse"},"reachable_states":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reachable States","default":[]},"turn_policy":{"$ref":"#/components/schemas/SimulationTurnPolicyResponse","default":{"barge_in_enabled":true,"greeting_shield_s":0,"safety_response":"suspend_forward","context_strategy":"full","block_forward_call":false,"block_forward_call_after_turns":-1}},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"states_visited":{"items":{"type":"string"},"type":"array","title":"States Visited","default":[]},"state_transitions":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"State Transitions","default":[]},"total_turns":{"type":"integer","title":"Total Turns","default":0},"tools_called":{"items":{"type":"string"},"type":"array","title":"Tools Called","default":[]},"terminal_reached":{"type":"boolean","title":"Terminal Reached","default":false},"context_graph_topology":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Context Graph Topology","default":[]},"terminal_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal State"}},"additionalProperties":true,"type":"object","required":["current_state"],"title":"SimulationSnapshotResponse"},"SimulationStateResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"objective":{"type":"string","title":"Objective","default":""},"actions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Actions","default":[]},"exit_conditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Exit Conditions","default":[]},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"guardrails":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Guardrails","default":[]},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]}},"additionalProperties":true,"type":"object","required":["name","type"],"title":"SimulationStateResponse"},"SimulationTurnPolicyResponse":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","title":"Safety Response","default":"suspend_forward"},"context_strategy":{"type":"string","title":"Context Strategy","default":"full"},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","title":"Block Forward Call After Turns","default":-1}},"type":"object","title":"SimulationTurnPolicyResponse"}}}}
```

## The SimulationStateResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SimulationStateResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"objective":{"type":"string","title":"Objective","default":""},"actions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Actions","default":[]},"exit_conditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Exit Conditions","default":[]},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"guardrails":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Guardrails","default":[]},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]}},"additionalProperties":true,"type":"object","required":["name","type"],"title":"SimulationStateResponse"}}}}
```

## The SimulationStepResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SimulationStepResponse":{"properties":{"observation":{"$ref":"#/components/schemas/SimulationObservation"},"snapshot":{"$ref":"#/components/schemas/SimulationSnapshotResponse"}},"type":"object","required":["observation","snapshot"],"title":"SimulationStepResponse"},"SimulationObservation":{"properties":{"state_before":{"type":"string","title":"State Before"},"state_after":{"type":"string","title":"State After"},"state_changed":{"type":"boolean","title":"State Changed"},"agent_text":{"type":"string","title":"Agent Text"},"is_terminal":{"type":"boolean","title":"Is Terminal"},"tools_called":{"items":{"type":"string"},"type":"array","title":"Tools Called","default":[]},"tool_call_details":{"items":{"$ref":"#/components/schemas/ToolCallDetail"},"type":"array","title":"Tool Call Details","default":[]},"selected_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Action"},"empathy_tier":{"type":"integer","title":"Empathy Tier","default":0},"has_pause":{"type":"boolean","title":"Has Pause","default":false}},"type":"object","required":["state_before","state_after","state_changed","agent_text","is_terminal"],"title":"SimulationObservation"},"ToolCallDetail":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"input":{"type":"string","title":"Input","default":""},"result":{"type":"string","title":"Result","default":""},"call_id":{"type":"string","title":"Call Id","default":""},"succeeded":{"type":"boolean","title":"Succeeded","default":true}},"type":"object","required":["tool_name"],"title":"ToolCallDetail","description":"Rich tool call data from a simulation step."},"SimulationSnapshotResponse":{"properties":{"current_state":{"$ref":"#/components/schemas/SimulationStateResponse"},"reachable_states":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Reachable States","default":[]},"turn_policy":{"$ref":"#/components/schemas/SimulationTurnPolicyResponse","default":{"barge_in_enabled":true,"greeting_shield_s":0,"safety_response":"suspend_forward","context_strategy":"full","block_forward_call":false,"block_forward_call_after_turns":-1}},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"states_visited":{"items":{"type":"string"},"type":"array","title":"States Visited","default":[]},"state_transitions":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"State Transitions","default":[]},"total_turns":{"type":"integer","title":"Total Turns","default":0},"tools_called":{"items":{"type":"string"},"type":"array","title":"Tools Called","default":[]},"terminal_reached":{"type":"boolean","title":"Terminal Reached","default":false},"context_graph_topology":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Context Graph Topology","default":[]},"terminal_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal State"}},"additionalProperties":true,"type":"object","required":["current_state"],"title":"SimulationSnapshotResponse"},"SimulationStateResponse":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"objective":{"type":"string","title":"Objective","default":""},"actions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Actions","default":[]},"exit_conditions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Exit Conditions","default":[]},"action_guidelines":{"items":{"type":"string"},"type":"array","title":"Action Guidelines","default":[]},"boundary_constraints":{"items":{"type":"string"},"type":"array","title":"Boundary Constraints","default":[]},"guardrails":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Guardrails","default":[]},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]}},"additionalProperties":true,"type":"object","required":["name","type"],"title":"SimulationStateResponse"},"SimulationTurnPolicyResponse":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","title":"Safety Response","default":"suspend_forward"},"context_strategy":{"type":"string","title":"Context Strategy","default":"full"},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","title":"Block Forward Call After Turns","default":-1}},"type":"object","title":"SimulationTurnPolicyResponse"}}}}
```

## The SimulationTurnPolicyResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SimulationTurnPolicyResponse":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","title":"Safety Response","default":"suspend_forward"},"context_strategy":{"type":"string","title":"Context Strategy","default":"full"},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","title":"Block Forward Call After Turns","default":-1}},"type":"object","title":"SimulationTurnPolicyResponse"}}}}
```

## The SinkSyncStatus object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SinkSyncStatus":{"properties":{"data_source_id":{"type":"string","format":"uuid","title":"Data Source Id"},"name":{"type":"string","title":"Name"},"source_type":{"type":"string","title":"Source Type"},"total":{"type":"integer","title":"Total"},"synced":{"type":"integer","title":"Synced"},"failed":{"type":"integer","title":"Failed"},"pending":{"type":"integer","title":"Pending"}},"type":"object","required":["data_source_id","name","source_type","total","synced","failed","pending"],"title":"SinkSyncStatus"}}}}
```

## The SkillContextGraphReference object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SkillContextGraphReference":{"properties":{"context_graph_id":{"type":"string","title":"Context Graph Id"},"context_graph_name":{"type":"string","title":"Context Graph Name"},"version":{"type":"integer","title":"Version"},"states":{"items":{"$ref":"#/components/schemas/SkillStateReference"},"type":"array","title":"States"}},"type":"object","required":["context_graph_id","context_graph_name","version","states"],"title":"SkillContextGraphReference"},"SkillStateReference":{"properties":{"state_name":{"type":"string","title":"State Name"},"tool_spec_category":{"type":"string","title":"Tool Spec Category"}},"type":"object","required":["state_name","tool_spec_category"],"title":"SkillStateReference"}}}}
```

## The SkillReferencesResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SkillReferencesResponse":{"properties":{"skill_id":{"type":"string","title":"Skill Id"},"skill_slug":{"type":"string","title":"Skill Slug"},"context_graph_references":{"items":{"$ref":"#/components/schemas/SkillContextGraphReference"},"type":"array","title":"Context Graph References"},"service_references":{"items":{"type":"string"},"type":"array","title":"Service References"}},"type":"object","required":["skill_id","skill_slug","context_graph_references","service_references"],"title":"SkillReferencesResponse"},"SkillContextGraphReference":{"properties":{"context_graph_id":{"type":"string","title":"Context Graph Id"},"context_graph_name":{"type":"string","title":"Context Graph Name"},"version":{"type":"integer","title":"Version"},"states":{"items":{"$ref":"#/components/schemas/SkillStateReference"},"type":"array","title":"States"}},"type":"object","required":["context_graph_id","context_graph_name","version","states"],"title":"SkillContextGraphReference"},"SkillStateReference":{"properties":{"state_name":{"type":"string","title":"State Name"},"tool_spec_category":{"type":"string","title":"Tool Spec Category"}},"type":"object","required":["state_name","tool_spec_category"],"title":"SkillStateReference"}}}}
```

## The SkillResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SkillResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"result_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Schema"},"model":{"type":"string","title":"Model"},"max_tokens":{"type":"integer","title":"Max Tokens"},"max_result_chars":{"type":"integer","title":"Max Result Chars"},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"timeout_s":{"type":"number","title":"Timeout S"},"thinking_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Thinking Effort"},"enable_caching":{"type":"boolean","title":"Enable Caching"},"enable_citations":{"type":"boolean","title":"Enable Citations"},"use_structured_output":{"type":"boolean","title":"Use Structured Output"},"integration_tools":{"items":{"$ref":"#/components/schemas/src__models__IntegrationToolRef"},"type":"array","title":"Integration Tools"},"static_tools":{"items":{"$ref":"#/components/schemas/src__models__StaticToolDef"},"type":"array","title":"Static Tools"},"delivery":{"type":"string","enum":["interrupt","queue"],"title":"Delivery"},"urgency_keywords":{"items":{"type":"string"},"type":"array","title":"Urgency Keywords"},"enabled":{"type":"boolean","title":"Enabled"},"execution_tier":{"type":"string","enum":["direct","orchestrated","autonomous","browser"],"title":"Execution Tier"},"max_agent_turns":{"type":"integer","title":"Max Agent Turns"},"checkpoint_enabled":{"type":"boolean","title":"Checkpoint Enabled"},"approval_required":{"type":"boolean","title":"Approval Required"},"browser_start_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Start Url"},"browser_allowed_domains":{"items":{"type":"string"},"type":"array","title":"Browser Allowed Domains"},"browser_auth_integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Auth Integration"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","slug","name","description","system_prompt","input_schema","result_schema","model","max_tokens","max_result_chars","max_input_tokens","timeout_s","thinking_effort","enable_caching","enable_citations","use_structured_output","integration_tools","static_tools","delivery","urgency_keywords","enabled","execution_tier","max_agent_turns","checkpoint_enabled","approval_required","browser_start_url","browser_allowed_domains","browser_auth_integration","version","created_at","updated_at"],"title":"SkillResponse"},"src__models__IntegrationToolRef":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef","description":"Reference to an integration endpoint by integration + endpoint name."},"src__models__StaticToolDef":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef","description":"A built-in tool available to companion agents."}}}}
```

## The SkillStateReference object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SkillStateReference":{"properties":{"state_name":{"type":"string","title":"State Name"},"tool_spec_category":{"type":"string","title":"Tool Spec Category"}},"type":"object","required":["state_name","tool_spec_category"],"title":"SkillStateReference"}}}}
```

## The SlugString object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SlugString":{"type":"string","maxLength":63,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$"}}}}
```

## The SourceBreakdownItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceBreakdownItem":{"properties":{"source_system":{"type":"string","title":"Source System"},"entity_type":{"type":"string","title":"Entity Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["source_system","entity_type","count"],"title":"SourceBreakdownItem"}}}}
```

## The SourceBreakdownResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceBreakdownResponse":{"properties":{"breakdown":{"items":{"$ref":"#/components/schemas/SourceBreakdownItem"},"type":"array","title":"Breakdown"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["breakdown","total"],"title":"SourceBreakdownResponse"},"SourceBreakdownItem":{"properties":{"source_system":{"type":"string","title":"Source System"},"entity_type":{"type":"string","title":"Entity Type"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["source_system","entity_type","count"],"title":"SourceBreakdownItem"}}}}
```

## The SourceEventItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceEventItem":{"properties":{"id":{"type":"string","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"source":{"type":"string","title":"Source"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"confidence":{"type":"number","title":"Confidence"},"ingested_at":{"type":"string","format":"date-time","title":"Ingested At"}},"type":"object","required":["id","event_type","source","confidence","ingested_at"],"title":"SourceEventItem"}}}}
```

## The SourceFailureItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceFailureItem":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"}},"type":"object","required":["event_id","event_type"],"title":"SourceFailureItem"}}}}
```

## The SourceHistoryItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceHistoryItem":{"properties":{"bucket":{"type":"string","title":"Bucket"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count"}},"type":"object","required":["bucket","event_count"],"title":"SourceHistoryItem"}}}}
```

## The SourceListItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceListItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"source_type":{"type":"string","title":"Source Type"},"is_active":{"type":"boolean","title":"Is Active"},"health_status":{"type":"string","title":"Health Status"},"last_poll":{"anyOf":[{"$ref":"#/components/schemas/LastPollInfo"},{"type":"null"}]},"event_count":{"type":"integer","title":"Event Count","default":0},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync At"}},"type":"object","required":["id","name","source_type","is_active","health_status"],"title":"SourceListItem"},"LastPollInfo":{"properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"At"},"duration_ms":{"type":"integer","title":"Duration Ms","default":0},"event_count":{"type":"integer","title":"Event Count","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"LastPollInfo"}}}}
```

## The SourceOverviewResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceOverviewResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"source_type":{"type":"string","title":"Source Type"},"is_active":{"type":"boolean","title":"Is Active"},"health_status":{"type":"string","title":"Health Status"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_event_count":{"type":"integer","title":"Last Sync Event Count","default":0},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"event_count":{"type":"integer","title":"Event Count","default":0},"entity_count":{"type":"integer","title":"Entity Count","default":0},"last_poll":{"anyOf":[{"$ref":"#/components/schemas/LastPollInfo"},{"type":"null"}]},"recent_failures":{"items":{"$ref":"#/components/schemas/SourceFailureItem"},"type":"array","title":"Recent Failures","default":[]},"outbound":{"$ref":"#/components/schemas/OutboundSummary","default":{"total":0,"synced":0,"failed":0,"pending":0}}},"type":"object","required":["id","name","source_type","is_active","health_status"],"title":"SourceOverviewResponse"},"LastPollInfo":{"properties":{"at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"At"},"duration_ms":{"type":"integer","title":"Duration Ms","default":0},"event_count":{"type":"integer","title":"Event Count","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"LastPollInfo"},"SourceFailureItem":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"ingested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingested At"}},"type":"object","required":["event_id","event_type"],"title":"SourceFailureItem"},"OutboundSummary":{"properties":{"total":{"type":"integer","title":"Total","default":0},"synced":{"type":"integer","title":"Synced","default":0},"failed":{"type":"integer","title":"Failed","default":0},"pending":{"type":"integer","title":"Pending","default":0},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","title":"OutboundSummary"}}}}
```

## The SourceStatus object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SourceStatus":{"properties":{"data_source_id":{"type":"string","title":"Data Source Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"source_type":{"type":"string","title":"Source Type"},"connector_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Type"},"status":{"type":"string","title":"Status"},"last_poll_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Poll At"},"last_poll_duration_ms":{"type":"integer","title":"Last Poll Duration Ms","default":0},"last_poll_event_count":{"type":"integer","title":"Last Poll Event Count","default":0},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"consecutive_errors":{"type":"integer","title":"Consecutive Errors","default":0},"connection_healthy":{"type":"boolean","title":"Connection Healthy","default":true}},"type":"object","required":["data_source_id","workspace_id","source_type","status"],"title":"SourceStatus"}}}}
```

## The SqlQueryRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SqlQueryRequest":{"properties":{"sql":{"type":"string","title":"Sql"}},"type":"object","required":["sql"],"title":"SqlQueryRequest"}}}}
```

## The SqlQueryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SqlQueryResponse":{"properties":{"results":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Results"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"SqlQueryResponse"}}}}
```

## The StateRiskOverride object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"StateRiskOverride":{"properties":{"topic_risk_score":{"type":"number","title":"Topic Risk Score","default":0},"auto_escalate_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Escalate Threshold"},"max_loop_count":{"type":"integer","title":"Max Loop Count","default":3},"operator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Skill"}},"type":"object","title":"StateRiskOverride","description":"Per-state escalation tuning. Stored on ActionState."}}}}
```

## The StaticToolDef-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"StaticToolDef-Input":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef","description":"A built-in tool available to companion agents."}}}}
```

## The StepRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"StepRequest":{"properties":{"session_id":{"type":"string","maxLength":64,"title":"Session Id"},"caller_text":{"type":"string","maxLength":2000,"title":"Caller Text"},"emotion":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Emotion"},"valence":{"anyOf":[{"type":"number","maximum":1,"minimum":-1},{"type":"null"}],"title":"Valence"}},"type":"object","required":["session_id","caller_text"],"title":"StepRequest"}}}}
```

## The StrippedNonemptyString object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"StrippedNonemptyString":{"type":"string","minLength":1}}}}
```

## The SubAccountResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SubAccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"account_sid":{"type":"string","title":"Account Sid"},"friendly_name":{"type":"string","title":"Friendly Name"},"environment":{"type":"string","title":"Environment"},"twiml_app_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twiml App Sid"},"status":{"type":"string","title":"Status","default":"active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","account_sid","friendly_name","environment","twiml_app_sid","created_at","updated_at"],"title":"SubAccountResponse"}}}}
```

## The SubToolLog object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SubToolLog":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"output":{"type":"string","title":"Output"},"duration_ms":{"type":"number","title":"Duration Ms"},"succeeded":{"type":"boolean","title":"Succeeded"},"round":{"type":"integer","title":"Round"}},"type":"object","required":["tool_name","input","output","duration_ms","succeeded","round"],"title":"SubToolLog"}}}}
```

## The SubToolLogItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SubToolLogItem":{"properties":{"tool_name":{"type":"string","title":"Tool Name","default":""},"input":{"additionalProperties":true,"type":"object","title":"Input"},"output":{"type":"string","title":"Output","default":""},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"succeeded":{"type":"boolean","title":"Succeeded","default":true}},"type":"object","title":"SubToolLogItem"}}}}
```

## The SuggestionsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SuggestionsResponse":{"properties":{"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions"}},"type":"object","required":["suggestions"],"title":"SuggestionsResponse"}}}}
```

## The SurfaceField object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SurfaceField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"prefill_value":{"anyOf":[{},{"type":"null"}],"title":"Prefill Value"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"}},"type":"object","required":["key","label","field_type"],"title":"SurfaceField","description":"A single data collection field in a surface spec.\n\nGenerated by agents from HSM analysis. Each field maps\nto a specific piece of data the world model needs."},"NameString":{"type":"string","maxLength":256,"minLength":1},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The SurfaceProgressResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SurfaceProgressResponse":{"properties":{"surface_id":{"type":"string","title":"Surface Id"},"total_fields":{"type":"integer","title":"Total Fields"},"filled_count":{"type":"integer","title":"Filled Count"},"empty_count":{"type":"integer","title":"Empty Count"},"filled_keys":{"items":{"type":"string"},"type":"array","title":"Filled Keys"},"empty_keys":{"items":{"type":"string"},"type":"array","title":"Empty Keys"},"required_empty_keys":{"items":{"type":"string"},"type":"array","title":"Required Empty Keys"}},"type":"object","required":["surface_id","total_fields","filled_count","empty_count","filled_keys","empty_keys","required_empty_keys"],"title":"SurfaceProgressResponse"}}}}
```

## The SurfaceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SurfaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"fields_count":{"type":"integer","title":"Fields Count"},"fields":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Fields","default":[]},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"},"context":{"additionalProperties":true,"type":"object","title":"Context","default":{}},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"opened_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opened At"},"submitted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted At"},"submitted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Submitted Data"},"delivery_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Delivery Metadata"}},"type":"object","required":["id","event_id","status","fields_count"],"title":"SurfaceResponse"}}}}
```

## The SurfaceSection object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SurfaceSection":{"properties":{"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["title","field_keys"],"title":"SurfaceSection","description":"A page/step in a multi-page surface form."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The SurfaceSpec object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SurfaceSpec":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"fields":{"items":{"$ref":"#/components/schemas/SurfaceField"},"type":"array","maxItems":100,"minItems":1,"title":"Fields"},"channel":{"$ref":"#/components/schemas/ChannelType","default":"web"},"expires_in_hours":{"type":"integer","maximum":8760,"minimum":1,"title":"Expires In Hours","default":168},"context":{"additionalProperties":true,"type":"object","title":"Context"},"resource_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Resource Type"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"sections":{"anyOf":[{"items":{"$ref":"#/components/schemas/SurfaceSection"},"type":"array"},{"type":"null"}],"title":"Sections"},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"}},"type":"object","required":["entity_id","title","fields"],"title":"SurfaceSpec","description":"A complete surface specification generated by an agent.\n\nThe agent reads the HSM (entity state, relationships,\nconfidence gaps) and produces this spec. The spec is stored as a\nworld.event and rendered by platform-api into a patient-facing page."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"SurfaceField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"prefill_value":{"anyOf":[{},{"type":"null"}],"title":"Prefill Value"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"}},"type":"object","required":["key","label","field_type"],"title":"SurfaceField","description":"A single data collection field in a surface spec.\n\nGenerated by agents from HSM analysis. Each field maps\nto a specific piece of data the world model needs."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."},"SurfaceSection":{"properties":{"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["title","field_keys"],"title":"SurfaceSection","description":"A page/step in a multi-page surface form."}}}}
```

## The SwitchModeRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SwitchModeRequest":{"properties":{"call_sid":{"type":"string","maxLength":64,"minLength":1,"title":"Call Sid"},"participant_call_sid":{"type":"string","maxLength":64,"title":"Participant Call Sid","default":""},"mode":{"type":"string","enum":["listen","takeover"],"title":"Mode"}},"type":"object","required":["call_sid","mode"],"title":"SwitchModeRequest","description":"Request to toggle operator mode on an active call."}}}}
```

## The SwitchModeResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SwitchModeResponse":{"properties":{"mode":{"type":"string","title":"Mode"}},"type":"object","required":["mode"],"title":"SwitchModeResponse"}}}}
```

## The SyncBulkRetryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncBulkRetryResponse":{"properties":{"retried":{"type":"integer","title":"Retried"},"failed_to_publish":{"type":"integer","title":"Failed To Publish"}},"type":"object","required":["retried","failed_to_publish"],"title":"SyncBulkRetryResponse"}}}}
```

## The SyncEventItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncEventItem":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"event_type":{"type":"string","title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"source":{"type":"string","title":"Source"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"sync_status":{"type":"string","title":"Sync Status"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["event_id","event_type","source","sync_status"],"title":"SyncEventItem"}}}}
```

## The SyncEventsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncEventsResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/SyncEventItem"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["events","total","has_more"],"title":"SyncEventsResponse"},"SyncEventItem":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"event_type":{"type":"string","title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"source":{"type":"string","title":"Source"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"sync_status":{"type":"string","title":"Sync Status"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Synced At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["event_id","event_type","source","sync_status"],"title":"SyncEventItem"}}}}
```

## The SyncFailureItem object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncFailureItem":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"sync_error":{"type":"string","title":"Sync Error"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synced At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["event_id","event_type","sync_error"],"title":"SyncFailureItem"}}}}
```

## The SyncFailuresResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncFailuresResponse":{"properties":{"failures":{"items":{"$ref":"#/components/schemas/SyncFailureItem"},"type":"array","title":"Failures"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["failures","total"],"title":"SyncFailuresResponse"},"SyncFailureItem":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"sync_error":{"type":"string","title":"Sync Error"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Synced At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["event_id","event_type","sync_error"],"title":"SyncFailureItem"}}}}
```

## The SyncHistoryEntry object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncHistoryEntry":{"properties":{"date":{"type":"string","title":"Date"},"event_count":{"type":"integer","title":"Event Count"},"synced_count":{"type":"integer","title":"Synced Count"},"failed_count":{"type":"integer","title":"Failed Count"}},"type":"object","required":["date","event_count","synced_count","failed_count"],"title":"SyncHistoryEntry"}}}}
```

## The SyncQueueResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncQueueResponse":{"properties":{"pending_count":{"type":"integer","title":"Pending Count"},"failed_count":{"type":"integer","title":"Failed Count"},"oldest_pending_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest Pending At"},"last_sync_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync Success At"},"by_resource_type":{"additionalProperties":{"additionalProperties":{"type":"integer"},"type":"object"},"type":"object","title":"By Resource Type"}},"type":"object","required":["pending_count","failed_count"],"title":"SyncQueueResponse"}}}}
```

## The SyncRetryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"SyncRetryResponse":{"properties":{"event_id":{"type":"string","title":"Event Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["event_id","status"],"title":"SyncRetryResponse"}}}}
```

## The TaskListResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TaskListResponse":{"properties":{"tasks":{"items":{"$ref":"#/components/schemas/TaskStateResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["tasks"],"title":"TaskListResponse"},"TaskStateResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"call_sid":{"type":"string","title":"Call Sid"},"workspace_id":{"type":"string","title":"Workspace Id"},"skill":{"type":"string","title":"Skill"},"tier":{"type":"string","title":"Tier"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Type"},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms"},"input_tokens":{"type":"integer","title":"Input Tokens","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","default":0},"cached_tokens":{"type":"integer","title":"Cached Tokens","default":0},"sub_tool_count":{"type":"integer","title":"Sub Tool Count","default":0},"progress_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Progress Message"},"progress_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Step"},"dispatched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["task_id","call_sid","workspace_id","skill","tier","status"],"title":"TaskStateResponse"}}}}
```

## The TaskStateResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TaskStateResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"call_sid":{"type":"string","title":"Call Sid"},"workspace_id":{"type":"string","title":"Workspace Id"},"skill":{"type":"string","title":"Skill"},"tier":{"type":"string","title":"Tier"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Type"},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms"},"input_tokens":{"type":"integer","title":"Input Tokens","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","default":0},"cached_tokens":{"type":"integer","title":"Cached Tokens","default":0},"sub_tool_count":{"type":"integer","title":"Sub Tool Count","default":0},"progress_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Progress Message"},"progress_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Step"},"dispatched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["task_id","call_sid","workspace_id","skill","tier","status"],"title":"TaskStateResponse"}}}}
```

## The TestCallerNumbersRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TestCallerNumbersRequest":{"properties":{"numbers":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Numbers"}},"type":"object","required":["numbers"],"title":"TestCallerNumbersRequest"}}}}
```

## The TestCallerNumbersResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TestCallerNumbersResponse":{"properties":{"numbers":{"items":{"type":"string"},"type":"array","title":"Numbers"}},"type":"object","required":["numbers"],"title":"TestCallerNumbersResponse"}}}}
```

## The TestEndpointRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TestEndpointRequest":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","title":"TestEndpointRequest"}}}}
```

## The TestEndpointResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TestEndpointResponse":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"retries":{"type":"integer","title":"Retries","default":0},"raw_response":{"title":"Raw Response"},"after_filter":{"title":"After Filter"},"after_mapping":{"title":"After Mapping"},"final_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"TestEndpointResponse"}}}}
```

## The TestSkillRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TestSkillRequest":{"properties":{"input":{"additionalProperties":true,"type":"object","title":"Input"},"static_tool_mocks":{"additionalProperties":{"type":"string"},"type":"object","title":"Static Tool Mocks","default":{}}},"type":"object","required":["input"],"title":"TestSkillRequest"}}}}
```

## The TestSkillResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TestSkillResponse":{"properties":{"result":{"type":"string","title":"Result"},"duration_ms":{"type":"number","title":"Duration Ms"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"cached_tokens":{"type":"integer","title":"Cached Tokens"},"rounds":{"type":"integer","title":"Rounds"},"sub_tool_logs":{"items":{"$ref":"#/components/schemas/SubToolLog"},"type":"array","title":"Sub Tool Logs"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["result","duration_ms","input_tokens","output_tokens","cached_tokens","rounds","sub_tool_logs"],"title":"TestSkillResponse"},"SubToolLog":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"output":{"type":"string","title":"Output"},"duration_ms":{"type":"number","title":"Duration Ms"},"succeeded":{"type":"boolean","title":"Succeeded"},"round":{"type":"integer","title":"Round"}},"type":"object","required":["tool_name","input","output","duration_ms","succeeded","round"],"title":"SubToolLog"}}}}
```

## The ThroughputBucket object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ThroughputBucket":{"properties":{"bucket":{"type":"string","title":"Bucket"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"event_count":{"type":"integer","title":"Event Count"}},"type":"object","required":["bucket","event_count"],"title":"ThroughputBucket"}}}}
```

## The ToolCallDetail object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ToolCallDetail":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"input":{"type":"string","title":"Input","default":""},"result":{"type":"string","title":"Result","default":""},"call_id":{"type":"string","title":"Call Id","default":""},"succeeded":{"type":"boolean","title":"Succeeded","default":true}},"type":"object","required":["tool_name"],"title":"ToolCallDetail","description":"Rich tool call data from a simulation step."}}}}
```

## The ToolCallSpec object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ToolCallSpec":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"additional_instruction":{"type":"string","title":"Additional Instruction","default":""}},"type":"object","required":["tool_id"],"title":"ToolCallSpec","description":"A tool call that the agent can make in a state."}}}}
```

## The ToolExecuteRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ToolExecuteRequest":{"properties":{"tool_type":{"type":"string","maxLength":64,"title":"Tool Type","description":"world_tool, skill, or integration"},"tool_name":{"$ref":"#/components/schemas/NameString","description":"Fully qualified tool name"},"service_id":{"type":"string","maxLength":64,"title":"Service Id","description":"Service ID that owns the HSM"},"input_params":{"additionalProperties":true,"type":"object","title":"Input Params","description":"Parameters to pass to the tool handler"},"entity_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Entity Id","description":"Optional entity ID for context"},"dry_run":{"type":"boolean","title":"Dry Run","description":"If true, write tools are simulated without persistence","default":false}},"type":"object","required":["tool_type","tool_name","service_id"],"title":"ToolExecuteRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1}}}}
```

## The ToolExecuteResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ToolExecuteResponse":{"properties":{"result":{"title":"Result"},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"dry_run":{"type":"boolean","title":"Dry Run","default":false},"source":{"type":"string","title":"Source","default":"tool_test"},"tool_type":{"type":"string","title":"Tool Type","default":""},"tier":{"type":"string","title":"Tier","default":"world"},"is_write":{"type":"boolean","title":"Is Write","default":false},"sub_tool_logs":{"items":{"$ref":"#/components/schemas/SubToolLogItem"},"type":"array","title":"Sub Tool Logs"},"blocked_side_effects":{"items":{"type":"string"},"type":"array","title":"Blocked Side Effects"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"ToolExecuteResponse"},"SubToolLogItem":{"properties":{"tool_name":{"type":"string","title":"Tool Name","default":""},"input":{"additionalProperties":true,"type":"object","title":"Input"},"output":{"type":"string","title":"Output","default":""},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"succeeded":{"type":"boolean","title":"Succeeded","default":true}},"type":"object","title":"SubToolLogItem"}}}}
```

## The ToolResolveResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ToolResolveResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ResolvedToolItem"},"type":"array","title":"Tools"},"service_id":{"type":"string","title":"Service Id"},"workspace_id":{"type":"string","title":"Workspace Id"}},"type":"object","required":["tools","service_id","workspace_id"],"title":"ToolResolveResponse"},"ResolvedToolItem":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"tool_type":{"type":"string","title":"Tool Type"},"description":{"type":"string","title":"Description","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"states":{"items":{"type":"string"},"type":"array","title":"States"},"tier":{"type":"string","title":"Tier","default":"world"},"is_write":{"type":"boolean","title":"Is Write","default":false},"additional_instructions":{"additionalProperties":{"type":"string"},"type":"object","title":"Additional Instructions"}},"type":"object","required":["tool_name","tool_type"],"title":"ResolvedToolItem"}}}}
```

## The TopSource object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TopSource":{"properties":{"source":{"type":"string","title":"Source"},"fact_count":{"type":"integer","title":"Fact Count"},"entity_count":{"type":"integer","title":"Entity Count"}},"type":"object","required":["source","fact_count","entity_count"],"title":"TopSource"}}}}
```

## The TranscriptInput object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TranscriptInput":{"properties":{"segments":{"items":{"$ref":"#/components/schemas/TranscriptSegmentInput"},"type":"array","maxItems":100,"minItems":1,"title":"Segments"}},"type":"object","required":["segments"],"title":"TranscriptInput"},"TranscriptSegmentInput":{"properties":{"speaker":{"type":"string","maxLength":64,"title":"Speaker"},"text":{"type":"string","maxLength":5000,"title":"Text"},"timestamp":{"type":"number","minimum":0,"title":"Timestamp"}},"type":"object","required":["speaker","text","timestamp"],"title":"TranscriptSegmentInput"}}}}
```

## The TranscriptProcessResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TranscriptProcessResponse":{"properties":{"soap_updates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Soap Updates","default":[]},"icd10_suggestions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Icd10 Suggestions","default":[]},"alerts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Alerts","default":[]},"entities_discovered":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities Discovered","default":[]},"agent_text":{"type":"string","title":"Agent Text","default":""},"is_terminal":{"type":"boolean","title":"Is Terminal","default":false},"state_before":{"type":"string","title":"State Before","default":""},"state_after":{"type":"string","title":"State After","default":""}},"additionalProperties":true,"type":"object","title":"TranscriptProcessResponse"}}}}
```

## The TranscriptSegment object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TranscriptSegment":{"properties":{"speaker_role":{"type":"string","title":"Speaker Role"},"transcript":{"type":"string","title":"Transcript"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"escalation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Id"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["speaker_role","transcript","timestamp","escalation_id","confidence"],"title":"TranscriptSegment"}}}}
```

## The TranscriptSegmentInput object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TranscriptSegmentInput":{"properties":{"speaker":{"type":"string","maxLength":64,"title":"Speaker"},"text":{"type":"string","maxLength":5000,"title":"Text"},"timestamp":{"type":"number","minimum":0,"title":"Timestamp"}},"type":"object","required":["speaker","text","timestamp"],"title":"TranscriptSegmentInput"}}}}
```

## The TurnPolicy object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"TurnPolicy":{"properties":{"barge_in_enabled":{"type":"boolean","title":"Barge In Enabled","default":true},"greeting_shield_s":{"type":"number","title":"Greeting Shield S","default":0},"safety_response":{"type":"string","enum":["suspend_forward","stay_empathize","alert"],"title":"Safety Response","default":"stay_empathize"},"context_strategy":{"type":"string","enum":["full","summarize","compact"],"title":"Context Strategy","default":"full"},"degradation_threshold":{"type":"integer","minimum":-1,"title":"Degradation Threshold","default":-1},"block_forward_call":{"type":"boolean","title":"Block Forward Call","default":false},"block_forward_call_after_turns":{"type":"integer","minimum":-1,"title":"Block Forward Call After Turns","default":-1},"stt_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eot Threshold"},"stt_eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Eager Eot Threshold"},"stt_eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stt Eot Timeout Ms"}},"type":"object","title":"TurnPolicy","description":"Voice pipeline parameters declared per HSM state.\n\nLives on ActionState/DecisionState alongside guardrails, wait_for, and\nchannel_overrides.  The HSM state IS the policy — no shadow state machine.\nAll fields optional with safe defaults (production behavior unchanged\nwhen no turn_policy is set)."}}}}
```

## The UnificationRuleResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UnificationRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rule_type":{"type":"string","title":"Rule Type"},"data_source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source Id"},"source_event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Event Type"},"target_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Entity Type"},"rule_config":{"additionalProperties":true,"type":"object","title":"Rule Config"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"events_processed":{"type":"integer","title":"Events Processed"},"last_applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Applied At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"agent_task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Task Id"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","rule_type","data_source_id","source_event_type","target_entity_type","rule_config","accuracy","events_processed","last_applied_at","created_by","agent_task_id","is_active","created_at","updated_at"],"title":"UnificationRuleResponse"}}}}
```

## The UpdateAgentRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateAgentRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","title":"UpdateAgentRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The UpdateConfigRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateConfigRequest":{"properties":{"strategy":{"anyOf":[{"type":"string","enum":["usage","outcome","custom"]},{"type":"null"}],"title":"Strategy"},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Currency"},"billing_cycle":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}],"title":"Billing Cycle"},"billing_day":{"anyOf":[{"type":"integer","maximum":28,"minimum":1},{"type":"null"}],"title":"Billing Day"},"price_rules":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":100},{"type":"null"}],"title":"Price Rules"},"minimum_charge":{"anyOf":[{"type":"number","minimum":0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Minimum Charge"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective To"}},"type":"object","title":"UpdateConfigRequest"}}}}
```

## The UpdateContextGraphRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateContextGraphRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","title":"UpdateContextGraphRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The UpdateCustomerRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateCustomerRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Name"},"billing_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Billing Email"},"billing_contact":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Billing Contact"},"mercury_memo":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Mercury Memo"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"},"status":{"anyOf":[{"type":"string","enum":["active","archived"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"UpdateCustomerRequest"}}}}
```

## The UpdateDataSourceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateDataSourceRequest":{"properties":{"display_name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"connection_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Connection Config"},"entity_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Types"},"field_mappings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Field Mappings"},"sync_strategy":{"anyOf":[{"type":"string","enum":["manual","scheduled","webhook","continuous"]},{"type":"null"}],"title":"Sync Strategy"},"sync_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Schedule"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateDataSourceRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1}}}}
```

## The UpdateIntegrationRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateIntegrationRequest":{"properties":{"display_name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"protocol":{"anyOf":[{"type":"string","enum":["rest","fhir","mcp"]},{"type":"null"}],"title":"Protocol"},"base_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfigWithSecrets"},{"type":"null"}]},"endpoints":{"anyOf":[{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array"},{"type":"null"}],"title":"Endpoints"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"mcp_transport":{"anyOf":[{"type":"string","enum":["stdio","sse","http"]},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","title":"UpdateIntegrationRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"AuthConfigWithSecrets":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"},"api_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"bearer_token_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"client_secret_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"private_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]}},"type":"object","required":["type"],"title":"AuthConfigWithSecrets","description":"AuthConfig that accepts inline secret values for auto-provisioning.\n\nIf provided, platform-api writes the value to SSM and replaces\nthe field with the generated ssm_param_path."},"SecretInput":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"SecretInput","description":"Inline secret value — auto-provisioned to SSM on create/update."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."}}}}
```

## The UpdateMonitorConceptRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateMonitorConceptRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"standalone_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Standalone Threshold"},"agent_config":{"anyOf":[{"$ref":"#/components/schemas/AgentConfigPayload"},{"type":"null"}]},"escalation":{"anyOf":[{"$ref":"#/components/schemas/EscalationConfigPayload"},{"type":"null"}]},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"UpdateMonitorConceptRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"AgentConfigPayload":{"properties":{"model":{"type":"string","title":"Model","default":"gemini-2.5-flash"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"timeout_s":{"type":"number","title":"Timeout S","default":3},"action_space":{"items":{"type":"string"},"type":"array","title":"Action Space"}},"type":"object","title":"AgentConfigPayload"},"EscalationConfigPayload":{"properties":{"operator_type":{"type":"string","title":"Operator Type","default":"crisis_counselor"},"reason":{"type":"string","title":"Reason","default":""},"regulatory_basis":{"type":"string","title":"Regulatory Basis","default":""},"immediate":{"type":"boolean","title":"Immediate","default":true}},"type":"object","title":"EscalationConfigPayload"}}}}
```

## The UpdateOperatorRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateOperatorRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"type":{"anyOf":[{"type":"string","enum":["clinical","administrative","crisis_counselor"]},{"type":"null"}],"title":"Type"},"skills":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Skills"},"connection_method":{"anyOf":[{"type":"string","enum":["browser","phone"]},{"type":"null"}],"title":"Connection Method"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"role":{"anyOf":[{"type":"string","enum":["operator","supervisor","admin"]},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string","enum":["online","busy","offline"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"UpdateOperatorRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1}}}}
```

## The UpdatePersonaRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdatePersonaRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"role":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"developed_by":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"communication_style":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Communication Style"},"default_language":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Default Language"},"background":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]}},"type":"object","title":"UpdatePersonaRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The UpdatePhoneNumberRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdatePhoneNumberRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Display Name"},"provider":{"anyOf":[{"type":"string","enum":["twilio","livekit"]},{"type":"null"}],"title":"Provider"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"status":{"anyOf":[{"type":"string","enum":["active","inactive"]},{"type":"null"}],"title":"Status"},"inbound_service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Inbound Service Id"},"provider_phone_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Phone Sid"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"forwarding":{"anyOf":[{"$ref":"#/components/schemas/ForwardingConfigRequest"},{"type":"null"}]}},"type":"object","title":"UpdatePhoneNumberRequest"},"ForwardingConfigRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"forward_to":{"type":"string","title":"Forward To"},"should_disconnect":{"type":"boolean","title":"Should Disconnect","default":true}},"type":"object","required":["forward_to"],"title":"ForwardingConfigRequest","description":"Call forwarding configuration for create/update requests."}}}}
```

## The UpdateSafetyConfigRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateSafetyConfigRequest":{"properties":{"triage_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Triage Enabled"},"triage_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triage Model"},"triage_timeout_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Triage Timeout S"},"triage_max_history_turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Triage Max History Turns"},"accumulation_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accumulation Enabled"},"accumulation_window_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accumulation Window Size"},"accumulation_single_turn_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accumulation Single Turn Threshold"},"accumulation_cumulative_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accumulation Cumulative Count"},"accumulation_mild_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accumulation Mild Threshold"},"accumulation_fast_track_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accumulation Fast Track Level"}},"type":"object","title":"UpdateSafetyConfigRequest"}}}}
```

## The UpdateServiceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateServiceRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"context_graph_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Context Graph Id"},"keyterms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keyterms"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"version_sets":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/VersionSet"},"type":"object"},{"type":"null"}],"title":"Version Sets"},"tags":{"anyOf":[{"items":{"$ref":"#/components/schemas/ServiceTag"},"type":"array"},{"type":"null"}],"title":"Tags"},"tool_capacity":{"anyOf":[{"type":"integer","maximum":10,"minimum":1},{"type":"null"}],"title":"Tool Capacity"},"safety_filters_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Safety Filters Enabled"},"channel_type":{"anyOf":[{"type":"string","enum":["voice","text","scribe"]},{"type":"null"}],"title":"Channel Type"},"environment":{"anyOf":[{"type":"string","enum":["sandbox","production"]},{"type":"null"}],"title":"Environment"},"persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Persona Id"},"voice_config":{"anyOf":[{"$ref":"#/components/schemas/ServiceVoiceConfig"},{"type":"null"}]}},"type":"object","title":"UpdateServiceRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"},"ServiceTag":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["key"],"title":"ServiceTag"},"ServiceVoiceConfig":{"properties":{"tts_model":{"anyOf":[{"type":"string","enum":["sonic-turbo","sonic-3"]},{"type":"null"}],"title":"Tts Model"},"max_buffer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Buffer Delay Ms"},"eager_eot_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Eager Eot Threshold"},"eot_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Eot Timeout Ms"},"filler_style":{"type":"string","enum":["backchannel","phrase","silent"],"title":"Filler Style","default":"backchannel"},"filler_vocabulary":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filler Vocabulary"},"backchannel_delay_ms":{"type":"integer","title":"Backchannel Delay Ms","default":400},"max_response_sentences":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Sentences"},"max_response_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Response Words"},"barge_in_min_speech_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Min Speech S"},"barge_in_cooldown_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Barge In Cooldown S"},"forward_call_enabled":{"type":"boolean","title":"Forward Call Enabled","default":false}},"type":"object","title":"ServiceVoiceConfig","description":"Per-service voice pipeline tuning. Overrides workspace/env defaults.\n\nEach field is optional — None means inherit from the layer above\n(workspace VoiceSettings → env vars → hardcoded defaults)."}}}}
```

## The UpdateSkillRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateSkillRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/StrippedNonemptyString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/StrippedNonemptyString"},{"type":"null"}]},"system_prompt":{"anyOf":[{"$ref":"#/components/schemas/StrippedNonemptyString"},{"type":"null"}]},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"},"result_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Schema"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"max_result_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Result Chars"},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"timeout_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timeout S"},"thinking_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Thinking Effort"},"enable_caching":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Caching"},"enable_citations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Citations"},"use_structured_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Structured Output"},"integration_tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/IntegrationToolRef-Input"},"type":"array"},{"type":"null"}],"title":"Integration Tools"},"static_tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/StaticToolDef-Input"},"type":"array"},{"type":"null"}],"title":"Static Tools"},"delivery":{"anyOf":[{"type":"string","enum":["interrupt","queue"]},{"type":"null"}],"title":"Delivery"},"urgency_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Urgency Keywords"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"execution_tier":{"anyOf":[{"type":"string","enum":["direct","orchestrated","autonomous","browser"]},{"type":"null"}],"title":"Execution Tier"},"max_agent_turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Agent Turns"},"checkpoint_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checkpoint Enabled"},"approval_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Approval Required"},"browser_start_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Start Url"},"browser_allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Browser Allowed Domains"},"browser_auth_integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser Auth Integration"}},"type":"object","title":"UpdateSkillRequest"},"StrippedNonemptyString":{"type":"string","minLength":1},"IntegrationToolRef-Input":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef","description":"Reference to an integration endpoint by integration + endpoint name."},"StaticToolDef-Input":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef","description":"A built-in tool available to companion agents."}}}}
```

## The UpdateSurfaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateSurfaceRequest":{"properties":{"title":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/SurfaceField"},"type":"array","maxItems":100,"minItems":1},{"type":"null"}],"title":"Fields"},"branding":{"anyOf":[{"$ref":"#/components/schemas/BrandingConfig"},{"type":"null"}]},"sections":{"anyOf":[{"items":{"$ref":"#/components/schemas/SurfaceSection"},"type":"array"},{"type":"null"}],"title":"Sections"},"completion_title":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Completion Title"},"completion_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Completion Message"},"completion_action_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Completion Action Url"},"submit_button_text":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Submit Button Text"},"channel":{"anyOf":[{"$ref":"#/components/schemas/ChannelType"},{"type":"null"}]},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},"type":"object","title":"UpdateSurfaceRequest","description":"Partial update to an existing surface.\n\nAll fields are optional. Only provided fields are merged into the spec.\nOnly allowed while status is CREATED or DELIVERED."},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000},"SurfaceField":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"$ref":"#/components/schemas/NameString"},"field_type":{"$ref":"#/components/schemas/FieldType"},"required":{"type":"boolean","title":"Required","default":true},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Placeholder"},"prefill_value":{"anyOf":[{},{"type":"null"}],"title":"Prefill Value"},"validation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation"},"sensitive":{"type":"boolean","title":"Sensitive","default":false},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"consent_text":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Consent Text"}},"type":"object","required":["key","label","field_type"],"title":"SurfaceField","description":"A single data collection field in a surface spec.\n\nGenerated by agents from HSM analysis. Each field maps\nto a specific piece of data the world model needs."},"FieldType":{"type":"string","enum":["text","textarea","date","phone","email","number","select","multiselect","checkbox","photo","signature","file","heading","info"],"title":"FieldType","description":"Input field types for surface data collection."},"BrandingConfig":{"properties":{"logo_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Primary Color"},"background_color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Background Color"},"font_family":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingConfig","description":"Visual branding for patient-facing surfaces."},"SurfaceSection":{"properties":{"title":{"$ref":"#/components/schemas/NameString"},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"field_keys":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Field Keys"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"}},"type":"object","required":["title","field_keys"],"title":"SurfaceSection","description":"A page/step in a multi-page surface form."},"ChannelType":{"type":"string","enum":["sms","whatsapp","imessage","email","voice","web"],"title":"ChannelType","description":"Delivery channels for surfaces."}}}}
```

## The UpdateSyncStatusRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateSyncStatusRequest":{"properties":{"data_source_id":{"type":"string","format":"uuid","title":"Data Source Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"last_sync_at":{"type":"string","format":"date-time","title":"Last Sync At"},"last_sync_status":{"type":"string","enum":["success","partial","error"],"title":"Last Sync Status"},"last_sync_event_count":{"type":"integer","title":"Last Sync Event Count","default":0}},"type":"object","required":["data_source_id","workspace_id","last_sync_at","last_sync_status"],"title":"UpdateSyncStatusRequest","description":"Report sync status for a data source after a poll cycle."}}}}
```

## The UpdateUnificationRuleRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateUnificationRuleRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"description":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"rule_type":{"anyOf":[{"type":"string","enum":["field_mapping","entity_resolution","dedup","transform"]},{"type":"null"}],"title":"Rule Type"},"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"source_event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Event Type"},"target_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Entity Type"},"rule_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rule Config"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateUnificationRuleRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"DescriptionString":{"type":"string","maxLength":2000}}}}
```

## The UpdateWorkspaceRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpdateWorkspaceRequest":{"properties":{"name":{"anyOf":[{"$ref":"#/components/schemas/StrippedNonemptyString"},{"type":"null"}]},"environment":{"anyOf":[{"type":"string","enum":["production","staging","development"]},{"type":"null"}],"title":"Environment"},"region":{"anyOf":[{"type":"string","enum":["us-east-1","ap-southeast-2","eu-central-1","ca-central-1"]},{"type":"null"}],"title":"Region"},"connector_type":{"anyOf":[{"type":"string","enum":["revolution","epic","cerner","allscripts","fhir_store","hubspot","athenahealth","charmhealth","eclinicalworks","meditab"]},{"type":"null"}],"title":"Connector Type"}},"type":"object","title":"UpdateWorkspaceRequest"},"StrippedNonemptyString":{"type":"string","minLength":1}}}}
```

## The UpsertVersionSetRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UpsertVersionSetRequest":{"properties":{"version_set":{"$ref":"#/components/schemas/VersionSet"}},"type":"object","required":["version_set"],"title":"UpsertVersionSetRequest"},"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"}}}}
```

## The UsageBucket object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UsageBucket":{"properties":{"event_type":{"type":"string","title":"Event Type"},"event_date":{"type":"string","format":"date","title":"Event Date"},"count":{"type":"integer","title":"Count"},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"total_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Duration Seconds"}},"type":"object","required":["event_type","event_date","count"],"title":"UsageBucket"}}}}
```

## The UsageSummaryResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UsageSummaryResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"},"buckets":{"items":{"$ref":"#/components/schemas/UsageBucket"},"type":"array","title":"Buckets"},"total_events":{"type":"integer","title":"Total Events"}},"type":"object","required":["workspace_id","period_start","period_end","buckets","total_events"],"title":"UsageSummaryResponse"},"UsageBucket":{"properties":{"event_type":{"type":"string","title":"Event Type"},"event_date":{"type":"string","format":"date","title":"Event Date"},"count":{"type":"integer","title":"Count"},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"total_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Duration Seconds"}},"type":"object","required":["event_type","event_date","count"],"title":"UsageBucket"}}}}
```

## The UsageTrendPoint object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"UsageTrendPoint":{"properties":{"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"meter_key":{"type":"string","title":"Meter Key"},"value":{"type":"number","title":"Value"},"unit":{"type":"string","title":"Unit"}},"type":"object","required":["period_start","period_end","meter_key","value","unit"],"title":"UsageTrendPoint"}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## The VersionSet object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VersionSet":{"properties":{"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"context_graph_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Graph Version Number"},"llm_model_preferences":{"additionalProperties":{"$ref":"#/components/schemas/LLMConfig"},"type":"object","title":"Llm Model Preferences","default":{}}},"type":"object","title":"VersionSet","description":"Pins agent, state machine, and LLM model versions for a service."},"LLMConfig":{"properties":{"llm_name":{"type":"string","title":"Llm Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","required":["llm_name"],"title":"LLMConfig"}}}}
```

## The VoiceConfig object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VoiceConfig":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"stability":{"type":"number","title":"Stability","default":0},"similarity_boost":{"type":"number","title":"Similarity Boost","default":0},"style":{"type":"number","title":"Style","default":0}},"type":"object","required":["voice_id"],"title":"VoiceConfig"}}}}
```

## The VoiceMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VoiceMetrics":{"properties":{"active_calls":{"type":"integer","title":"Active Calls","default":0},"active_escalated":{"type":"integer","title":"Active Escalated","default":0},"calls_today":{"type":"integer","title":"Calls Today","default":0},"avg_quality_score_today":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Quality Score Today"},"escalation_rate_today":{"type":"number","title":"Escalation Rate Today","default":0}},"type":"object","title":"VoiceMetrics"}}}}
```

## The VoiceSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VoiceSettingsRequest":{"properties":{"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone"},"speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speed"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"keyterms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keyterms"},"correction_categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Correction Categories"},"pronunciation_dict_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pronunciation Dict Id"},"sensitive_topics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sensitive Topics"},"post_call_analysis_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Post Call Analysis Enabled"},"transcript_correction_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcript Correction Enabled"}},"type":"object","title":"VoiceSettingsRequest","description":"Voice experience control plane — PM-facing, high-level controls.\n\nControls the caller experience without exposing engineering internals.\nEmotion detection, filler speech, model selection, and buffer tuning\nare always-on internals managed by engineering."}}}}
```

## The VoiceSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VoiceSettingsResponse":{"properties":{"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone"},"speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speed"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"},"language":{"type":"string","title":"Language"},"keyterms":{"items":{"type":"string"},"type":"array","title":"Keyterms"},"correction_categories":{"items":{"type":"string"},"type":"array","title":"Correction Categories"},"pronunciation_dict_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pronunciation Dict Id"},"sensitive_topics":{"items":{"type":"string"},"type":"array","title":"Sensitive Topics"},"post_call_analysis_enabled":{"type":"boolean","title":"Post Call Analysis Enabled"},"transcript_correction_enabled":{"type":"boolean","title":"Transcript Correction Enabled"}},"type":"object","required":["voice_id","tone","speed","volume","language","keyterms","correction_categories","pronunciation_dict_id","sensitive_topics","post_call_analysis_enabled","transcript_correction_enabled"],"title":"VoiceSettingsResponse","description":"Voice experience state — what the PM configured."}}}}
```

## The VoiceprintEnrollResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VoiceprintEnrollResponse":{"properties":{"enrolled":{"type":"boolean","title":"Enrolled","default":true},"entity_id":{"type":"string","title":"Entity Id"},"model_id":{"type":"string","title":"Model Id"},"dimensions":{"type":"integer","title":"Dimensions","default":192}},"type":"object","required":["entity_id","model_id"],"title":"VoiceprintEnrollResponse"}}}}
```

## The VoiceprintStatusResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VoiceprintStatusResponse":{"properties":{"enrolled":{"type":"boolean","title":"Enrolled"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"enrolled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enrolled At"}},"type":"object","required":["enrolled"],"title":"VoiceprintStatusResponse"}}}}
```

## The VoiceprintVerifyResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"VoiceprintVerifyResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"similarity":{"type":"number","title":"Similarity"},"entity_id":{"type":"string","title":"Entity Id"}},"type":"object","required":["verified","similarity","entity_id"],"title":"VoiceprintVerifyResponse"}}}}
```

## The WorkflowSettingsRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkflowSettingsRequest":{"properties":{"workflows":{"items":{"$ref":"#/components/schemas/WorkflowSpec-Input"},"type":"array","maxItems":100,"title":"Workflows"}},"type":"object","required":["workflows"],"title":"WorkflowSettingsRequest"},"WorkflowSpec-Input":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"trigger":{"$ref":"#/components/schemas/WorkflowTrigger"},"input_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Query"},"steps":{"items":{"$ref":"#/components/schemas/WorkflowStep-Input"},"type":"array","title":"Steps"},"timeout":{"type":"string","format":"duration","title":"Timeout","default":"P7D"},"max_concurrent":{"type":"integer","title":"Max Concurrent","default":10},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name","trigger","steps"],"title":"WorkflowSpec","description":"A workflow definition stored in workspace settings.\n\nWorkflows are identified by name (unique within a workspace)."},"WorkflowTrigger":{"properties":{"type":{"type":"string","enum":["cron","event","manual"],"title":"Type"},"cron_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron Expression"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter"}},"type":"object","required":["type"],"title":"WorkflowTrigger","description":"When and how a workflow starts."},"WorkflowStep-Input":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["tool_call","integration_call","wait","branch","for_each","surface"],"title":"Type"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_params":{"additionalProperties":true,"type":"object","title":"Tool Params"},"integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"request_body":{"additionalProperties":true,"type":"object","title":"Request Body"},"wait_duration":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Wait Duration"},"wait_for_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For Event"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"on_true":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On True"},"on_false":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On False"},"items_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items From"},"body_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowStep-Input"},"type":"array"},{"type":"null"}],"title":"Body Steps"},"surface_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec"},"retry_count":{"type":"integer","title":"Retry Count","default":3},"retry_backoff_seconds":{"type":"number","title":"Retry Backoff Seconds","default":2}},"type":"object","required":["name","type"],"title":"WorkflowStep","description":"A single step in a workflow spec.\n\nSteps are declarative — no LLM decides which step to run next.\nThe engine executes them sequentially unless branch/for_each alters flow."}}}}
```

## The WorkflowSettingsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkflowSettingsResponse":{"properties":{"workflows":{"items":{"$ref":"#/components/schemas/WorkflowSpec-Output"},"type":"array","title":"Workflows"}},"type":"object","title":"WorkflowSettingsResponse"},"WorkflowSpec-Output":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"trigger":{"$ref":"#/components/schemas/WorkflowTrigger"},"input_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Query"},"steps":{"items":{"$ref":"#/components/schemas/WorkflowStep-Output"},"type":"array","title":"Steps"},"timeout":{"type":"string","format":"duration","title":"Timeout","default":"P7D"},"max_concurrent":{"type":"integer","title":"Max Concurrent","default":10},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name","trigger","steps"],"title":"WorkflowSpec","description":"A workflow definition stored in workspace settings.\n\nWorkflows are identified by name (unique within a workspace)."},"WorkflowTrigger":{"properties":{"type":{"type":"string","enum":["cron","event","manual"],"title":"Type"},"cron_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron Expression"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter"}},"type":"object","required":["type"],"title":"WorkflowTrigger","description":"When and how a workflow starts."},"WorkflowStep-Output":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["tool_call","integration_call","wait","branch","for_each","surface"],"title":"Type"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_params":{"additionalProperties":true,"type":"object","title":"Tool Params"},"integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"request_body":{"additionalProperties":true,"type":"object","title":"Request Body"},"wait_duration":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Wait Duration"},"wait_for_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For Event"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"on_true":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On True"},"on_false":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On False"},"items_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items From"},"body_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowStep-Output"},"type":"array"},{"type":"null"}],"title":"Body Steps"},"surface_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec"},"retry_count":{"type":"integer","title":"Retry Count","default":3},"retry_backoff_seconds":{"type":"number","title":"Retry Backoff Seconds","default":2}},"type":"object","required":["name","type"],"title":"WorkflowStep","description":"A single step in a workflow spec.\n\nSteps are declarative — no LLM decides which step to run next.\nThe engine executes them sequentially unless branch/for_each alters flow."}}}}
```

## The WorkflowSpec-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkflowSpec-Input":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"trigger":{"$ref":"#/components/schemas/WorkflowTrigger"},"input_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Query"},"steps":{"items":{"$ref":"#/components/schemas/WorkflowStep-Input"},"type":"array","title":"Steps"},"timeout":{"type":"string","format":"duration","title":"Timeout","default":"P7D"},"max_concurrent":{"type":"integer","title":"Max Concurrent","default":10},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name","trigger","steps"],"title":"WorkflowSpec","description":"A workflow definition stored in workspace settings.\n\nWorkflows are identified by name (unique within a workspace)."},"WorkflowTrigger":{"properties":{"type":{"type":"string","enum":["cron","event","manual"],"title":"Type"},"cron_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron Expression"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter"}},"type":"object","required":["type"],"title":"WorkflowTrigger","description":"When and how a workflow starts."},"WorkflowStep-Input":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["tool_call","integration_call","wait","branch","for_each","surface"],"title":"Type"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_params":{"additionalProperties":true,"type":"object","title":"Tool Params"},"integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"request_body":{"additionalProperties":true,"type":"object","title":"Request Body"},"wait_duration":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Wait Duration"},"wait_for_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For Event"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"on_true":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On True"},"on_false":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On False"},"items_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items From"},"body_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowStep-Input"},"type":"array"},{"type":"null"}],"title":"Body Steps"},"surface_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec"},"retry_count":{"type":"integer","title":"Retry Count","default":3},"retry_backoff_seconds":{"type":"number","title":"Retry Backoff Seconds","default":2}},"type":"object","required":["name","type"],"title":"WorkflowStep","description":"A single step in a workflow spec.\n\nSteps are declarative — no LLM decides which step to run next.\nThe engine executes them sequentially unless branch/for_each alters flow."}}}}
```

## The WorkflowSpec-Output object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkflowSpec-Output":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"trigger":{"$ref":"#/components/schemas/WorkflowTrigger"},"input_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Query"},"steps":{"items":{"$ref":"#/components/schemas/WorkflowStep-Output"},"type":"array","title":"Steps"},"timeout":{"type":"string","format":"duration","title":"Timeout","default":"P7D"},"max_concurrent":{"type":"integer","title":"Max Concurrent","default":10},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name","trigger","steps"],"title":"WorkflowSpec","description":"A workflow definition stored in workspace settings.\n\nWorkflows are identified by name (unique within a workspace)."},"WorkflowTrigger":{"properties":{"type":{"type":"string","enum":["cron","event","manual"],"title":"Type"},"cron_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron Expression"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter"}},"type":"object","required":["type"],"title":"WorkflowTrigger","description":"When and how a workflow starts."},"WorkflowStep-Output":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["tool_call","integration_call","wait","branch","for_each","surface"],"title":"Type"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_params":{"additionalProperties":true,"type":"object","title":"Tool Params"},"integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"request_body":{"additionalProperties":true,"type":"object","title":"Request Body"},"wait_duration":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Wait Duration"},"wait_for_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For Event"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"on_true":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On True"},"on_false":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On False"},"items_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items From"},"body_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowStep-Output"},"type":"array"},{"type":"null"}],"title":"Body Steps"},"surface_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec"},"retry_count":{"type":"integer","title":"Retry Count","default":3},"retry_backoff_seconds":{"type":"number","title":"Retry Backoff Seconds","default":2}},"type":"object","required":["name","type"],"title":"WorkflowStep","description":"A single step in a workflow spec.\n\nSteps are declarative — no LLM decides which step to run next.\nThe engine executes them sequentially unless branch/for_each alters flow."}}}}
```

## The WorkflowStep-Input object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkflowStep-Input":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["tool_call","integration_call","wait","branch","for_each","surface"],"title":"Type"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_params":{"additionalProperties":true,"type":"object","title":"Tool Params"},"integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"request_body":{"additionalProperties":true,"type":"object","title":"Request Body"},"wait_duration":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Wait Duration"},"wait_for_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For Event"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"on_true":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On True"},"on_false":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On False"},"items_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items From"},"body_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowStep-Input"},"type":"array"},{"type":"null"}],"title":"Body Steps"},"surface_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec"},"retry_count":{"type":"integer","title":"Retry Count","default":3},"retry_backoff_seconds":{"type":"number","title":"Retry Backoff Seconds","default":2}},"type":"object","required":["name","type"],"title":"WorkflowStep","description":"A single step in a workflow spec.\n\nSteps are declarative — no LLM decides which step to run next.\nThe engine executes them sequentially unless branch/for_each alters flow."}}}}
```

## The WorkflowStep-Output object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkflowStep-Output":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["tool_call","integration_call","wait","branch","for_each","surface"],"title":"Type"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"tool_params":{"additionalProperties":true,"type":"object","title":"Tool Params"},"integration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"request_body":{"additionalProperties":true,"type":"object","title":"Request Body"},"wait_duration":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Wait Duration"},"wait_for_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For Event"},"condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition"},"on_true":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On True"},"on_false":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On False"},"items_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items From"},"body_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkflowStep-Output"},"type":"array"},{"type":"null"}],"title":"Body Steps"},"surface_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Surface Spec"},"retry_count":{"type":"integer","title":"Retry Count","default":3},"retry_backoff_seconds":{"type":"number","title":"Retry Backoff Seconds","default":2}},"type":"object","required":["name","type"],"title":"WorkflowStep","description":"A single step in a workflow spec.\n\nSteps are declarative — no LLM decides which step to run next.\nThe engine executes them sequentially unless branch/for_each alters flow."}}}}
```

## The WorkflowTrigger object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkflowTrigger":{"properties":{"type":{"type":"string","enum":["cron","event","manual"],"title":"Type"},"cron_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron Expression"},"event_filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Filter"}},"type":"object","required":["type"],"title":"WorkflowTrigger","description":"When and how a workflow starts."}}}}
```

## The WorkspaceBenchmarks object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkspaceBenchmarks":{"properties":{"avg_quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Quality Score"},"p50_quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Quality Score"},"p25_quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P25 Quality Score"},"p75_quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P75 Quality Score"},"total_calls":{"type":"integer","title":"Total Calls","default":0},"avg_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration Seconds"},"escalation_rate":{"type":"number","title":"Escalation Rate","default":0},"quality_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Quality Distribution","default":{}}},"type":"object","title":"WorkspaceBenchmarks","description":"Workspace-level call quality benchmarks for contextual comparison."}}}}
```

## The WorkspaceConnectorConfigResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkspaceConnectorConfigResponse":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"connector_type":{"type":"string","title":"Connector Type"},"data_source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Data Source Id"},"connection_config":{"additionalProperties":true,"type":"object","title":"Connection Config","default":{}},"outbound_entity_types":{"items":{"type":"string"},"type":"array","title":"Outbound Entity Types","default":[]}},"type":"object","required":["workspace_id","connector_type"],"title":"WorkspaceConnectorConfigResponse","description":"Connector configuration for a workspace."}}}}
```

## The WorkspaceResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WorkspaceResponse":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"environment":{"type":"string","title":"Environment"},"backend_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend Org Id"},"region":{"type":"string","title":"Region"},"connector_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connector Type"},"provisioned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Provisioned At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","name","environment","backend_org_id","region","connector_type","provisioned_at","created_at","updated_at"],"title":"WorkspaceResponse"}}}}
```

## The WrapUpRequest object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WrapUpRequest":{"properties":{"call_sid":{"type":"string","maxLength":64,"minLength":1,"title":"Call Sid"},"outcome":{"type":"string","enum":["resolved","escalated","transferred"],"title":"Outcome"},"notes":{"type":"string","maxLength":2000,"title":"Notes","default":""}},"type":"object","required":["call_sid","outcome"],"title":"WrapUpRequest","description":"Request to record operator intervention wrap-up."}}}}
```

## The WrapUpResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"WrapUpResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"WrapUpResponse"}}}}
```

## The src\_\_models\_\_IntegrationToolRef object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"src__models__IntegrationToolRef":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef","description":"Reference to an integration endpoint by integration + endpoint name."}}}}
```

## The src\_\_models\_\_StaticToolDef object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"src__models__StaticToolDef":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef","description":"A built-in tool available to companion agents."}}}}
```

## The src\_\_routes\_\_audit\_\_AuditEventResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"src__routes__audit__AuditEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"timestamp":{"type":"string","title":"Timestamp"},"service":{"type":"string","title":"Service"},"actor_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Entity Id"},"actor_credential_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Credential Id"},"action":{"type":"string","title":"Action"},"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"resource_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Name"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"phi_accessed":{"type":"boolean","title":"Phi Accessed","default":false}},"type":"object","required":["id","workspace_id","timestamp","service","action","resource_type"],"title":"AuditEventResponse"}}}}
```

## The src\_\_routes\_\_internal\_skills\_\_IntegrationToolRef object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"src__routes__internal_skills__IntegrationToolRef":{"properties":{"integration":{"type":"string","title":"Integration"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["integration","endpoint"],"title":"IntegrationToolRef"}}}}
```

## The src\_\_routes\_\_internal\_skills\_\_StaticToolDef object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"src__routes__internal_skills__StaticToolDef":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"handler":{"type":"string","title":"Handler"}},"type":"object","required":["name","description","input_schema","handler"],"title":"StaticToolDef"}}}}
```

## The src\_\_routes\_\_operators\_models\_\_AuditEventResponse object

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"components":{"schemas":{"src__routes__operators_models__AuditEventResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"event_type":{"type":"string","title":"Event Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"source":{"type":"string","title":"Source"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","workspace_id","event_type","data","source","ingested_at","created_at"],"title":"AuditEventResponse"}}}}
```
