{"openapi": "3.1.0", "info": {"title": "Sage API V1", "version": "1.0.0", "description": ""}, "paths": {"/api/v1/organization/{organization_id}/care-plans/match-criteria-dimensions": {"get": {"operationId": "care_plans_api_list_match_criteria_dimensions", "summary": "List Match Criteria Dimensions", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MatchCriterionDimensionOut"}, "title": "Response", "type": "array"}}}}}, "description": "An organization's active match-criterion catalog, ordered for display.\n\nClients use this to build match-criteria forms and learn the valid `criteria` keys.", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organization/{organization_id}/care-plans/adl-options": {"get": {"operationId": "care_plans_api_list_adl_options", "summary": "List Adl Options", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ADLOptionOut"}, "title": "Response", "type": "array"}}}}}, "description": "An organization's active ADL catalog with task options, ordered for display.\n\nClients use this to build ADL forms and learn the valid `activities` and task keys.\nReturns ORM objects rather than pre-dumped dicts: the response schema's ``resolve_tasks``\nruns again during response validation, and on a dict it silently resolves to [].", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organization/{organization_id}/care-plans/iadl-options": {"get": {"operationId": "care_plans_api_list_iadl_options", "summary": "List Iadl Options", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/IADLOptionOut"}, "title": "Response", "type": "array"}}}}}, "description": "An organization's active IADL catalog with task options, ordered for display.\n\nClients use this to build IADL forms and learn the valid `activities` and task keys.\nReturns ORM objects rather than pre-dumped dicts: the response schema's ``resolve_tasks``\nruns again during response validation, and on a dict it silently resolves to [].", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/care-plans/{care_plan_id}": {"get": {"operationId": "care_plans_api_get_care_plan", "summary": "Get Care Plan", "parameters": [{"in": "path", "name": "care_plan_id", "schema": {"title": "Care Plan Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CarePlan"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}, "patch": {"operationId": "care_plans_api_update_care_plan", "summary": "Update Care Plan", "parameters": [{"in": "path", "name": "care_plan_id", "schema": {"title": "Care Plan Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CarePlan"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateCarePlan"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/care-plans": {"post": {"operationId": "care_plans_api_create_care_plan", "summary": "Create Care Plan", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CarePlan"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewCarePlan"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organization/{organization_id}/emails/accounts": {"get": {"operationId": "email_app_api_list_email_accounts_for_organization", "summary": "List Email Accounts For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/EmailAccountSchema"}, "title": "Response", "type": "array"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organization/{organization_id}/emails/send": {"post": {"operationId": "email_app_api_send_email_for_organization", "summary": "Send Email For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "424": {"description": "Failed Dependency", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReauthRequiredError"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SendEmailRequest"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/emails/accounts": {"get": {"operationId": "email_app_api_list_email_accounts", "summary": "List Email Accounts", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/EmailAccountSchema"}, "title": "Response", "type": "array"}}}}}, "tags": ["include_in_client_gen"], "deprecated": true, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/emails/send": {"post": {"operationId": "email_app_api_send_email_view", "summary": "Send Email View", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "424": {"description": "Failed Dependency", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReauthRequiredError"}}}}}, "tags": ["include_in_client_gen"], "deprecated": true, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SendEmailRequest"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organization/{organization_id}/emails/send-with-attachments": {"post": {"operationId": "email_app_api_send_email_with_attachments_for_organization", "summary": "Send Email With Attachments For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "413": {"description": "Content Too Large", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "424": {"description": "Failed Dependency", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReauthRequiredError"}}}}}, "description": "Send an email with files attached. The JSON endpoint still covers the no-file case.", "tags": ["include_in_client_gen"], "requestBody": {"content": {"multipart/form-data": {"schema": {"properties": {"attachments": {"items": {"format": "binary", "type": "string"}, "title": "Attachments", "type": "array"}, "details": {"$ref": "#/components/schemas/SendEmailRequest"}}, "required": ["attachments", "details"], "title": "MultiPartBodyParams", "type": "object"}, "encoding": {"attachments": {"contentType": "application/octet-stream"}}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/emails/attachments/{attachment_id}/download": {"get": {"operationId": "email_app_api_download_email_attachment", "summary": "Download Email Attachment", "parameters": [{"in": "path", "name": "attachment_id", "schema": {"title": "Attachment Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK"}, "424": {"description": "Failed Dependency", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReauthRequiredError"}}}}}, "description": "Stream a sent attachment back from the provider. 404 once the provider drops it.", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organizations/{org_id}/feature-flags": {"get": {"operationId": "flags_api_feature_flags", "summary": "Feature Flags", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": {"type": "boolean"}, "propertyNames": {"$ref": "#/components/schemas/FlagName"}, "title": "Response", "type": "object"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/contacts/{contact_id}": {"get": {"operationId": "contacts_api_get_contact", "summary": "Get Contact", "parameters": [{"in": "path", "name": "contact_id", "schema": {"title": "Contact Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}, "patch": {"operationId": "contacts_api_update_contact", "summary": "Update Contact", "parameters": [{"in": "path", "name": "contact_id", "schema": {"title": "Contact Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateContact"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/contacts": {"post": {"operationId": "contacts_api_create_contact", "summary": "Create Contact", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewContact"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organizations/{org_id}/directory": {"get": {"operationId": "directory_api_directory_list", "summary": "Directory List", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}, {"in": "query", "name": "types", "schema": {"default": [], "items": {"anyOf": [{"$ref": "#/components/schemas/DirectoryTypeFilter"}, {"type": "string"}]}, "title": "Types", "type": "array"}, "required": false}, {"in": "query", "name": "client_statuses", "schema": {"default": [], "items": {"anyOf": [{"$ref": "#/components/schemas/PatientStatus"}, {"type": "string"}]}, "title": "Client Statuses", "type": "array"}, "required": false}, {"in": "query", "name": "referrer_kinds", "schema": {"default": [], "items": {"anyOf": [{"$ref": "#/components/schemas/DirectoryReferrerKindFilter"}, {"type": "string"}]}, "title": "Referrer Kinds", "type": "array"}, "required": false}, {"in": "query", "name": "search", "schema": {"default": "", "title": "Search", "type": "string"}, "required": false}, {"in": "query", "name": "sort", "schema": {"anyOf": [{"$ref": "#/components/schemas/DirectorySortField"}, {"type": "string"}], "default": "", "title": "Sort"}, "required": false}, {"in": "query", "name": "direction", "schema": {"anyOf": [{"$ref": "#/components/schemas/DirectorySortDirection"}, {"type": "string"}], "default": "asc", "title": "Direction"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Directory"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organizations/{org_id}/directory/dialer-search": {"get": {"operationId": "directory_api_dialer_search", "summary": "Dialer Search", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}, {"in": "query", "name": "q", "schema": {"default": "", "title": "Q", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 10, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DialerSearchResults"}}}}}, "description": "Search for dialable entities (patients, contacts, referrers) by name or phone number.\n\nReturns entities that have at least one phone number, along with validation\nof whether the query itself is a dialable number.", "tags": ["include_in_client_gen"]}}, "/api/v1/patients/{patient_id}": {"get": {"operationId": "patients_api_get_patient", "summary": "Get Patient", "parameters": [{"in": "path", "name": "patient_id", "schema": {"title": "Patient Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Patient"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}, "patch": {"operationId": "patients_api_update_patient", "summary": "Update Patient", "parameters": [{"in": "path", "name": "patient_id", "schema": {"title": "Patient Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Patient"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdatePatient"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/patients": {"post": {"operationId": "patients_api_create_patient", "summary": "Create Patient", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Patient"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewPatient"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/post-hoc-actions/{action_id}/mark-email-sent": {"post": {"operationId": "post_hoc_actions_api_mark_email_sent", "summary": "Mark Email Sent", "parameters": [{"in": "path", "name": "action_id", "schema": {"title": "Action Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK"}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/minimum-versions": {"get": {"operationId": "core_api_get_minimum_versions", "summary": "Get Minimum Versions", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MinimumVersions"}}}}}, "tags": ["include_in_client_gen"]}}, "/api/v1/organizations": {"get": {"operationId": "organization_api_list_organizations", "summary": "List Organizations", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/OrganizationListItem"}, "title": "Response", "type": "array"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/invitations/acceptance": {"post": {"operationId": "organization_api_accept_invitation", "summary": "Accept Invitation", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorData"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InvitationAcceptance"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/invitations/{invitation_token}": {"get": {"operationId": "organization_api_invitation_details", "summary": "Invitation Details", "parameters": [{"in": "path", "name": "invitation_token", "schema": {"title": "Invitation Token", "type": "string"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InvitationData"}}}}}, "tags": ["include_in_client_gen"]}}, "/api/v1/recordings": {"post": {"operationId": "recordings_api_upload_recording", "summary": "Upload Recording", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Recording"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"multipart/form-data": {"schema": {"properties": {"audio_file": {"format": "binary", "title": "Audio File", "type": "string"}, "details": {"$ref": "#/components/schemas/NewRecording"}}, "required": ["audio_file", "details"], "title": "MultiPartBodyParams", "type": "object"}, "encoding": {"audio_file": {"contentType": "audio/wav"}}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/recordings/{recording_id}": {"get": {"operationId": "recordings_api_get_recording_details", "summary": "Get Recording Details", "parameters": [{"in": "path", "name": "recording_id", "schema": {"title": "Recording Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RecordingDetailsResponse"}}}}}, "description": "Get recording details by ID.\n\nReturns recording information including associated patient/contact/user,\nprocessing status, and post-hoc actions.", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/recordings/{recording_id}/transcript": {"get": {"operationId": "recordings_api_get_recording_transcript", "summary": "Get Recording Transcript", "parameters": [{"in": "path", "name": "recording_id", "schema": {"title": "Recording Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RecordingTranscriptResponse"}}}}}, "description": "Get transcript for a recording with speaker diarization.\n\nReturns transcript fragments ordered by sequence with speaker IDs (1-10).", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/recordings/{recording_id}/audio": {"get": {"operationId": "recordings_api_get_recording_audio", "summary": "Get Recording Audio", "parameters": [{"in": "path", "name": "recording_id", "schema": {"title": "Recording Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Stream recording audio from GCS with Range request support.\nUses WAV format which supports partial content requests for seeking.\nAccepts authentication via ?token= query parameter for iOS AVPlayer.", "tags": ["include_in_client_gen"]}}, "/api/v1/twilio/access-token/org/{org_id}": {"get": {"operationId": "twilio_app_api_build_access_token", "summary": "Build Access Token", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccessTokenResponse"}}}}}, "tags": ["include_in_client_gen"]}}, "/api/v1/calls/{twilio_call_sid}/recording": {"get": {"operationId": "twilio_app_api_get_call_recording", "summary": "Get Call Recording", "parameters": [{"in": "path", "name": "twilio_call_sid", "schema": {"title": "Twilio Call Sid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Stream call recording from Twilio with Range request support.\nUses WAV format which supports partial content requests for seeking.\nAccepts authentication via ?token= query parameter.", "tags": ["include_in_client_gen"]}}, "/api/v1/calls/{twilio_call_sid}": {"get": {"operationId": "twilio_app_api_get_call_details", "summary": "Get Call Details", "parameters": [{"in": "path", "name": "twilio_call_sid", "schema": {"title": "Twilio Call Sid", "type": "string"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallDetailsResponse"}}}}}, "description": "Get call details by Twilio SID.\nReturns call information including associated user and patient if available.", "tags": ["include_in_client_gen"]}}, "/api/v1/calls/{twilio_call_sid}/transcript": {"get": {"operationId": "twilio_app_api_get_call_transcript", "summary": "Get Call Transcript", "parameters": [{"in": "path", "name": "twilio_call_sid", "schema": {"title": "Twilio Call Sid", "type": "string"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallTranscriptResponse"}}}}}, "description": "Get call transcript by Twilio SID.\nReturns all transcript fragments ordered by sequence ID.", "tags": ["include_in_client_gen"]}}, "/api/v1/organizations/{org_id}/calls": {"get": {"operationId": "twilio_app_api_list_organization_calls", "summary": "List Organization Calls", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallHistory"}}}}}, "description": "Get call history for an organization.\nReturns all calls for the organization.", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/patients/{patient_id}/calls": {"get": {"operationId": "twilio_app_api_list_patient_calls", "summary": "List Patient Calls", "parameters": [{"in": "path", "name": "patient_id", "schema": {"title": "Patient Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallHistory"}}}}}, "description": "Get call history for a patient.\nReturns all calls where the patient's phone numbers were involved (inbound or outbound).", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/contacts/{contact_id}/calls": {"get": {"operationId": "twilio_app_api_list_contact_calls", "summary": "List Contact Calls", "parameters": [{"in": "path", "name": "contact_id", "schema": {"title": "Contact Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallHistory"}}}}}, "description": "Get call history for a contact.\nReturns all calls where the patient's phone numbers were involved (inbound or outbound).", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organizations/{org_id}/call-availability": {"get": {"operationId": "twilio_app_api_get_call_availability", "summary": "Get Call Availability", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallAvailability"}}}}}, "tags": ["include_in_client_gen"]}, "patch": {"operationId": "twilio_app_api_update_call_availability", "summary": "Update Call Availability", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallAvailability"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallAvailabilityUpdate"}}}, "required": true}}}, "/api/v1/organizations/{org_id}/call-availability/global": {"patch": {"operationId": "twilio_app_api_update_global_call_availability", "summary": "Update Global Call Availability", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallAvailability"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GlobalCallAvailabilityUpdate"}}}, "required": true}}}, "/api/v1/organization/{organization_id}/inbox": {"get": {"operationId": "inbox_api_fetch_inbox_for_organization", "summary": "Fetch Inbox For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}, {"in": "query", "name": "limit", "schema": {"ge": 1, "le": 200, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "activity_types", "schema": {"default": [], "items": {"enum": ["call", "recording", "email_referral", "email_thread"], "title": "ActivityType", "type": "string"}, "title": "Activity Types", "type": "array"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Inbox"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/contacts/{contact_id}/inbox": {"get": {"operationId": "inbox_api_fetch_inbox_for_contact", "summary": "Fetch Inbox For Contact", "parameters": [{"in": "path", "name": "contact_id", "schema": {"title": "Contact Id", "type": "integer"}, "required": true}, {"in": "query", "name": "limit", "schema": {"ge": 1, "le": 200, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "activity_types", "schema": {"default": [], "items": {"enum": ["call", "recording", "email_referral", "email_thread"], "title": "ActivityType", "type": "string"}, "title": "Activity Types", "type": "array"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Inbox"}}}}}, "description": "Get inbox (calls + recordings) for a specific contact.\n\nReturns:\n- Calls where the contact's phone numbers were involved\n- Recordings directly associated with the contact\n- Recordings associated with patients that have a PatientAssociation to this contact\n\nAll items sorted by timestamp (most recent first).", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/patients/{patient_id}/inbox": {"get": {"operationId": "inbox_api_fetch_inbox_for_patient", "summary": "Fetch Inbox For Patient", "parameters": [{"in": "path", "name": "patient_id", "schema": {"title": "Patient Id", "type": "integer"}, "required": true}, {"in": "query", "name": "limit", "schema": {"ge": 1, "le": 200, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "activity_types", "schema": {"default": [], "items": {"enum": ["call", "recording", "email_referral", "email_thread"], "title": "ActivityType", "type": "string"}, "title": "Activity Types", "type": "array"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Inbox"}}}}}, "description": "Get inbox (calls + recordings) for a specific patient.\n\nReturns:\n- Calls where the patient's phone numbers were involved\n- Recordings directly associated with the patient\n- Recordings associated with contacts that have a PatientAssociation to this patient\n\nAll items sorted by timestamp (most recent first).", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/referrers/{referrer_id}/inbox": {"get": {"operationId": "inbox_api_fetch_inbox_for_referrer", "summary": "Fetch Inbox For Referrer", "parameters": [{"in": "path", "name": "referrer_id", "schema": {"title": "Referrer Id", "type": "integer"}, "required": true}, {"in": "query", "name": "limit", "schema": {"ge": 1, "le": 200, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "activity_types", "schema": {"default": [], "items": {"enum": ["call", "recording", "email_referral", "email_thread"], "title": "ActivityType", "type": "string"}, "title": "Activity Types", "type": "array"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Inbox"}}}}}, "description": "Get inbox (calls + recordings) for a specific referrer.\n\nReturns:\n- Calls where the referrer's phone numbers were involved (from/to)\n\nAll items sorted by timestamp (most recent first).", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/referrer-institutions/{institution_id}/inbox": {"get": {"operationId": "inbox_api_fetch_inbox_for_referrer_institution", "summary": "Fetch Inbox For Referrer Institution", "parameters": [{"in": "path", "name": "institution_id", "schema": {"title": "Institution Id", "type": "integer"}, "required": true}, {"in": "query", "name": "limit", "schema": {"ge": 1, "le": 200, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "activity_types", "schema": {"default": [], "items": {"enum": ["call", "recording", "email_referral", "email_thread"], "title": "ActivityType", "type": "string"}, "title": "Activity Types", "type": "array"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Inbox"}}}}}, "description": "Get inbox (calls) for a specific referrer institution.\n\nReturns:\n- Calls where the institution's phone numbers were involved (from/to)\n\nAll items sorted by timestamp (most recent first).", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/notifications/device-tokens": {"post": {"operationId": "notifications_api_register_device_token", "summary": "Register Device Token", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "204": {"description": "No Content"}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceTokenInput"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}, "delete": {"operationId": "notifications_api_unregister_device_token", "summary": "Unregister Device Token", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "204": {"description": "No Content"}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceTokenInput"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/email-referrals/{activity_id}/": {"get": {"operationId": "paid_marketing_api_get_email_referral", "summary": "Get Email Referral", "parameters": [{"in": "path", "name": "activity_id", "schema": {"title": "Activity Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmailReferralDetailResponse"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/referrers/{pk}": {"get": {"operationId": "referrals_api_get_referrer", "summary": "Get Referrer", "parameters": [{"in": "path", "name": "pk", "schema": {"title": "Pk", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferrerSchema"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}, "patch": {"operationId": "referrals_api_update_referrer", "summary": "Update Referrer", "parameters": [{"in": "path", "name": "pk", "schema": {"title": "Pk", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferrerSchema"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateReferrer"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/referrers": {"post": {"operationId": "referrals_api_create_referrer", "summary": "Create Referrer", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferrerSchema"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewReferrer"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/referrer-institutions/{pk}": {"get": {"operationId": "referrals_api_get_referrer_institution", "summary": "Get Referrer Institution", "parameters": [{"in": "path", "name": "pk", "schema": {"title": "Pk", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferrerInstitutionSchema"}}}}}, "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}, "patch": {"operationId": "referrals_api_update_referrer_institution", "summary": "Update Referrer Institution", "parameters": [{"in": "path", "name": "pk", "schema": {"title": "Pk", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferrerInstitutionSchema"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateReferrerInstitution"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/referrer-institutions": {"post": {"operationId": "referrals_api_create_referrer_institution", "summary": "Create Referrer Institution", "parameters": [], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferrerInstitutionSchema"}}}}}, "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NewReferrerInstitution"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organizations/{org_id}/omni-search": {"get": {"operationId": "search_api_omni_search", "summary": "Omni Search", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}, {"in": "query", "name": "q", "schema": {"default": "", "title": "Q", "type": "string"}, "required": false}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OmniSearchResultsSchema"}}}}}, "description": "Search the organization's records and return grouped hits.", "tags": ["include_in_client_gen"], "security": [{"SessionTokenAuth": []}]}}, "/api/v1/organizations/{org_id}/duplicate-suggestions": {"post": {"operationId": "search_api_duplicate_suggestions", "summary": "Duplicate Suggestions", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "integer"}, "required": true}], "responses": {"401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessage"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidationErrorData"}}}}, "200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DuplicateSuggestionsResponse"}}}}}, "description": "Return possible duplicate records for a new entity.", "tags": ["include_in_client_gen"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DuplicateSuggestionsRequest"}}}, "required": true}, "security": [{"SessionTokenAuth": []}]}}, "/api/v1/email/message-created": {"get": {"operationId": "email_app_webhooks_message_created_challenge", "summary": "Message Created Challenge", "parameters": [{"in": "query", "name": "challenge", "schema": {"title": "Challenge", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}}, "post": {"operationId": "email_app_webhooks_message_created", "summary": "Message Created", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NylasWebhookPayload"}}}, "required": true}}}, "/api/v1/email/message-updated": {"get": {"operationId": "email_app_webhooks_message_updated_challenge", "summary": "Message Updated Challenge", "parameters": [{"in": "query", "name": "challenge", "schema": {"title": "Challenge", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}}, "post": {"operationId": "email_app_webhooks_message_updated", "summary": "Message Updated", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/NylasWebhookPayload"}}}, "required": true}}}, "/api/v1/twilio/voice-status-callback": {"post": {"operationId": "twilio_app_webhooks_voice_status_callback", "summary": "Voice Status Callback", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "This webhook/callback gets hit when a call status changes.\nCaptures total call duration when the call completes.", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ParentCallSid": {"title": "Parentcallsid", "type": "string"}, "CallDuration": {"title": "Callduration", "type": "integer"}, "DialCallDuration": {"title": "Dialcallduration", "type": "integer"}, "RecordingDuration": {"title": "Recordingduration", "type": "integer"}, "RecordingSid": {"title": "Recordingsid", "type": "string"}, "RecordingUrl": {"title": "Recordingurl", "type": "string"}, "DialCallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Dialcallstatus", "type": "string"}, "DialBridged": {"enum": ["true", "false"], "title": "Dialbridged", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"]}}}, "required": true}}}, "/api/v1/twilio/inbound-call-complete": {"post": {"operationId": "twilio_app_webhooks_inbound_call_complete", "summary": "Inbound Call Complete", "parameters": [{"in": "query", "name": "current_to", "schema": {"type": "string", "nullable": true, "title": "Current To"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Callback after <Dial> completes for inbound call.\nRoutes to the current line's fallback (voicemail, voice agent, or forward) if\nno answer, otherwise marks complete. `current_to` names the number the completed\ndial rang when it differs from the original To (i.e., forwarded legs).", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ParentCallSid": {"title": "Parentcallsid", "type": "string"}, "CallDuration": {"title": "Callduration", "type": "integer"}, "DialCallDuration": {"title": "Dialcallduration", "type": "integer"}, "RecordingDuration": {"title": "Recordingduration", "type": "integer"}, "RecordingSid": {"title": "Recordingsid", "type": "string"}, "RecordingUrl": {"title": "Recordingurl", "type": "string"}, "DialCallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Dialcallstatus", "type": "string"}, "DialBridged": {"enum": ["true", "false"], "title": "Dialbridged", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"]}}}, "required": true}}}, "/api/v1/twilio/voicemail-recording-complete": {"post": {"operationId": "twilio_app_webhooks_voicemail_recording_complete", "summary": "Voicemail Recording Complete", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "This webhook gets called after a voicemail recording completes.\nWe store the RecordingSid to the Call record.", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ParentCallSid": {"title": "Parentcallsid", "type": "string"}, "CallDuration": {"title": "Callduration", "type": "integer"}, "DialCallDuration": {"title": "Dialcallduration", "type": "integer"}, "RecordingDuration": {"title": "Recordingduration", "type": "integer"}, "RecordingSid": {"title": "Recordingsid", "type": "string"}, "RecordingUrl": {"title": "Recordingurl", "type": "string"}, "DialCallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Dialcallstatus", "type": "string"}, "DialBridged": {"enum": ["true", "false"], "title": "Dialbridged", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"]}}}, "required": true}}}, "/api/v1/twilio/outbound-call-complete": {"post": {"operationId": "twilio_app_webhooks_outbound_call_complete", "summary": "Outbound Call Complete", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Callback after outbound call completes.", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ParentCallSid": {"title": "Parentcallsid", "type": "string"}, "CallDuration": {"title": "Callduration", "type": "integer"}, "DialCallDuration": {"title": "Dialcallduration", "type": "integer"}, "RecordingDuration": {"title": "Recordingduration", "type": "integer"}, "RecordingSid": {"title": "Recordingsid", "type": "string"}, "RecordingUrl": {"title": "Recordingurl", "type": "string"}, "DialCallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Dialcallstatus", "type": "string"}, "DialBridged": {"enum": ["true", "false"], "title": "Dialbridged", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"]}}}, "required": true}}}, "/api/v1/twilio/inbound-client-answered": {"post": {"operationId": "twilio_app_webhooks_inbound_client_answered", "summary": "Inbound Client Answered", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "This webhook gets called when a specific client answers an inbound call.\nWe set the answered_by field to the user who answered.", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ParentCallSid": {"title": "Parentcallsid", "type": "string"}, "CallDuration": {"title": "Callduration", "type": "integer"}, "DialCallDuration": {"title": "Dialcallduration", "type": "integer"}, "RecordingDuration": {"title": "Recordingduration", "type": "integer"}, "RecordingSid": {"title": "Recordingsid", "type": "string"}, "RecordingUrl": {"title": "Recordingurl", "type": "string"}, "DialCallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Dialcallstatus", "type": "string"}, "DialBridged": {"enum": ["true", "false"], "title": "Dialbridged", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"]}}}, "required": true}}}, "/api/v1/twilio/transcription-status": {"post": {"operationId": "twilio_app_webhooks_transcription_status", "summary": "Transcription Status", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "This is the callback we receive each time Twilio transcribes a piece of the conversation", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"AccountSid": {"title": "Accountsid", "type": "string"}, "CallSid": {"title": "Callsid", "type": "string"}, "TranscriptionSid": {"title": "Transcriptionsid", "type": "string"}, "Timestamp": {"format": "date-time", "title": "Timestamp", "type": "string"}, "SequenceId": {"title": "Sequenceid", "type": "integer"}, "TranscriptionEvent": {"enum": ["transcription-started", "transcription-content", "transcription-stopped", "transcription-error"], "title": "Transcriptionevent", "type": "string"}, "TranscriptionError": {"title": "Transcriptionerror", "type": "string"}, "TranscriptionErrorCode": {"title": "Transcriptionerrorcode", "type": "string"}, "TranscriptionEngine": {"title": "Transcriptionengine", "type": "string"}, "PartialResults": {"title": "Partialresults", "type": "boolean"}, "Final": {"title": "Final", "type": "boolean"}, "InboundTrackLabel": {"title": "Inboundtracklabel", "type": "string"}, "OutboundTrackLabel": {"title": "Outboundtracklabel", "type": "string"}, "Track": {"enum": ["inbound_track", "outbound_track", "both_tracks"], "title": "Track", "type": "string"}, "TranscriptionData": {"title": "Transcriptiondata", "type": "string"}}, "required": ["AccountSid", "CallSid", "TranscriptionSid", "Timestamp", "SequenceId", "TranscriptionEvent"]}}}, "required": true}}}, "/api/v1/twilio/voice-request": {"post": {"operationId": "twilio_app_webhooks_voice_request", "summary": "Voice Request", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"]}}}, "required": true}}}, "/api/v1/twilio/voice-fallback": {"post": {"operationId": "twilio_app_webhooks_voice_fallback", "summary": "Voice Fallback", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ErrorCode": {"title": "Errorcode", "type": "string"}, "ErrorUrl": {"title": "Errorurl", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction", "ErrorCode", "ErrorUrl"]}}}, "required": true}}}, "/api/v1/twilio/play-recording-disclaimer": {"post": {"operationId": "twilio_app_webhooks_play_recording_disclaimer", "summary": "Play Recording Disclaimer", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "This endpoint returns TwiML to play a recording disclaimer message."}}, "/api/v1/twilio/caller-id-verification-status": {"post": {"operationId": "twilio_app_webhooks_caller_id_verification_status_callback", "summary": "Caller Id Verification Status Callback", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "VerificationStatus": {"title": "Verificationstatus", "type": "string"}, "OutgoingCallerIdSid": {"title": "Outgoingcalleridsid", "type": "string"}}, "required": ["AccountSid", "From", "To", "VerificationStatus"]}}}, "required": true}}}, "/api/v1/twilio/debugger": {"post": {"operationId": "twilio_app_webhooks_debugger_event", "summary": "Debugger Event", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "A single Twilio error or warning, delivered as it happens rather than on a threshold.\n\nSeverity picks the log level, so an error reaches Sentry and a warning stays in the logs.\nThe message carries the error code so Sentry groups by failure rather than fingerprinting\nevery event separately.", "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"AccountSid": {"title": "Accountsid", "type": "string"}, "Level": {"anyOf": [{"enum": ["error", "warning"], "type": "string"}, {"type": "string"}], "default": "", "title": "Level"}, "ParentAccountSid": {"default": "", "title": "Parentaccountsid", "type": "string"}, "Sid": {"default": "", "title": "Sid", "type": "string"}, "PayloadType": {"default": "", "title": "Payloadtype", "type": "string"}, "Timestamp": {"default": "", "title": "Timestamp", "type": "string"}, "Payload": {"default": "", "title": "Payload", "type": "string"}}, "required": ["AccountSid"]}}}, "required": true}}}, "/api/v1/retell/call-events": {"post": {"operationId": "retell_app_webhooks_call_events_callback", "summary": "Call Events Callback", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RetellEvent"}}}, "required": true}}}, "/api/v1/sendgrid/inbound-email": {"post": {"operationId": "paid_marketing_webhooks_inbound_email", "summary": "Inbound Email", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/x-www-form-urlencoded": {"schema": {"title": "FormParams", "type": "object", "properties": {"to": {"title": "To", "type": "string"}, "envelope": {"default": "", "title": "Envelope", "type": "string"}, "subject": {"default": "", "title": "Subject", "type": "string"}, "text": {"default": "", "title": "Text", "type": "string"}, "html": {"default": "", "title": "Html", "type": "string"}}, "required": ["to"]}}}, "required": true}}}, "/api/v1/ringcentral/telephony-sessions": {"post": {"operationId": "ringcentral_app_webhooks_telephony_sessions", "summary": "Telephony Sessions", "parameters": [], "responses": {"200": {"description": "OK"}}, "requestBody": {"content": {"application/json": {"schema": {"allOf": [{"$ref": "#/components/schemas/RCWebhookPayload"}], "nullable": true}}}, "required": false}}}}, "components": {"schemas": {"ErrorMessage": {"properties": {"detail": {"title": "Detail", "type": "string"}}, "required": ["detail"], "title": "ErrorMessage", "type": "object"}, "ValidationErrorData": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationErrorDetailData"}, "title": "Detail", "type": "array"}}, "required": ["detail"], "title": "ValidationErrorData", "type": "object"}, "ValidationErrorDetailData": {"properties": {"type": {"title": "Type", "type": "string"}, "loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "title": "Loc", "type": "array"}, "msg": {"title": "Msg", "type": "string"}, "ctx": {"additionalProperties": true, "type": "object", "nullable": true, "title": "Ctx"}}, "required": ["type", "msg"], "title": "ValidationErrorDetailData", "type": "object"}, "MatchCriterionDimensionOut": {"description": "One entry in an organization's match-criterion catalog (for building forms).", "properties": {"key": {"description": "Dimension key to send in `criteria`", "title": "Key", "type": "string"}, "label": {"description": "Human-readable dimension label", "title": "Label", "type": "string"}}, "required": ["key", "label"], "title": "MatchCriterionDimensionOut", "type": "object"}, "ADLOptionOut": {"description": "One entry in an organization's ADL task catalog (for building forms).", "properties": {"key": {"description": "Option key to send in `activities`", "title": "Key", "type": "string"}, "label": {"description": "Human-readable task label", "title": "Label", "type": "string"}, "description": {"default": "", "description": "Description of the task", "title": "Description", "type": "string"}, "tasks": {"description": "Active caregiver task options for this ADL", "items": {"$ref": "#/components/schemas/ADLTaskOptionOut"}, "title": "Tasks", "type": "array"}}, "required": ["key", "label"], "title": "ADLOptionOut", "type": "object"}, "ADLTaskOptionOut": {"description": "One caregiver task option under an ADL option (for building forms).", "properties": {"key": {"description": "Task option key to send in an activity's `tasks`", "title": "Key", "type": "string"}, "title": {"description": "Human-readable task title", "title": "Title", "type": "string"}, "caregiver_instruction": {"default": "", "description": "Instruction read to the caregiver", "title": "Caregiver Instruction", "type": "string"}}, "required": ["key", "title"], "title": "ADLTaskOptionOut", "type": "object"}, "IADLOptionOut": {"description": "One entry in an organization's IADL task catalog (for building forms).", "properties": {"key": {"description": "Option key to send in `activities`", "title": "Key", "type": "string"}, "label": {"description": "Human-readable task label", "title": "Label", "type": "string"}, "description": {"default": "", "description": "Description of the task", "title": "Description", "type": "string"}, "tasks": {"description": "Active caregiver task options for this IADL", "items": {"$ref": "#/components/schemas/ADLTaskOptionOut"}, "title": "Tasks", "type": "array"}}, "required": ["key", "label"], "title": "IADLOptionOut", "type": "object"}, "ADLActivity": {"description": "Schema for a single ADL activity", "properties": {"notes": {"title": "Notes", "type": "string"}, "level": {"allOf": [{"$ref": "#/components/schemas/ADLLevel"}], "title": "Level"}}, "title": "ADLActivity", "type": "object"}, "ADLLevel": {"description": "Level of assistance needed for Activities of Daily Living", "enum": ["independent", "requires_assistance", "dependent"], "title": "ADLLevel", "type": "string"}, "ADLTaskValue": {"description": "A caregiver task scheduled against an ADL.\n\nUsually references a catalog task option by ``key``; a custom (manually entered)\ntask instead carries its own ``title`` with no ``key``.", "properties": {"key": {"type": "string", "nullable": true, "description": "Task option key (one of the task keys provided for this ADL)", "title": "Key"}, "title": {"type": "string", "nullable": true, "description": "Task title; set for a custom task not in the option catalog", "title": "Title"}, "caregiver_instruction": {"type": "string", "nullable": true, "description": "Per-task instruction read to the caregiver", "title": "Caregiver Instruction"}, "shift": {"anyOf": [{"$ref": "#/components/schemas/TaskShift"}, {"type": "string"}], "description": "Shift the task is scheduled for", "title": "Shift"}, "days": {"description": "Days of the week the task is scheduled for; all seven when the task is daily, empty when no days were discussed", "items": {"anyOf": [{"$ref": "#/components/schemas/DayOfWeek"}, {"type": "string"}]}, "title": "Days", "type": "array"}, "start_time": {"description": "Start time for the task", "format": "time", "title": "Start Time", "type": "string"}}, "title": "ADLTaskValue", "type": "object"}, "ADLValue": {"description": "A single ADL task assessment: an option key with its level of assistance and notes.", "properties": {"key": {"description": "ADL option key (must be one of the provided keys)", "title": "Key", "type": "string"}, "level": {"allOf": [{"$ref": "#/components/schemas/ADLLevel"}], "description": "Level of assistance needed: independent = performs without assistance, requires_assistance = needs some help, dependent = fully dependent on caregiver", "title": "Level"}, "notes": {"description": "Notes about this task", "title": "Notes", "type": "string"}, "tasks": {"description": "Caregiver tasks scheduled for this ADL. Include a task only when the caregiver should clearly perform it \u2014 an assessment with no tasks is normal. Every task must reference a catalog task `key` for this ADL; never invent custom tasks.", "items": {"$ref": "#/components/schemas/ADLTaskValue"}, "title": "Tasks", "type": "array"}, "label": {"type": "string", "nullable": true, "description": "Human-readable task label; populated in API responses", "title": "Label"}}, "required": ["key"], "title": "ADLValue", "type": "object"}, "Allergy": {"description": "Known allergens, seeded from WellSky's allergy catalog.\n\nOpen at the API/schema boundary (``Allergy | str``), so allergens outside this catalog\nare still captured. Canonical members carry WellSky's display text as their label, which\nis how they map back onto WellSky's allergy multi-select for write-back.", "enum": ["ace_inhibitors", "aciphex", "actonel", "actos", "adhesive_tape", "albuterol", "allegra", "allopurinol", "almonds", "amantadine", "amides", "amiodarone", "amoxicillin", "ampicillin", "anectine", "antiemtics", "antihistamines", "aricept", "aspartame", "aspirin_asa_or_salicylates", "atenolol", "augmentin", "bacitracin", "bactrim", "bananas", "barbituates", "bee_stings", "benadryl", "beta_adrenergic_blockers", "bisphosphonates", "bleach", "carbapenem", "cashews", "cataflam", "cats", "ceclor", "cefepime", "celebrex", "cephalosporins", "chocolate", "cinnamon", "ciprofloxin", "citalopram", "clarithromycin", "cleaning_products", "clindamycin", "codeine", "colchicine", "compazine", "corn", "corticosteroids", "coumadin", "crabmeat", "creatine_monohydrate", "dairy_products", "demerol", "depakote", "detrol", "diazepam", "dicloxacillin", "diflucan", "digoxin", "dilantin", "dilaudid", "diltiazem", "dogs", "doxycycline", "dust", "dye_radiologic", "eggs", "ephedrine", "epinephrine", "erythromycin", "ether", "feathers", "fentanyl", "fish", "flagyl", "fosamax", "fougera", "fruit", "garlic", "gentamicin", "glucagon", "glucocorticoids", "gluten", "haldol", "hazelnuts", "hydrochlorothiazide", "hydrocodone", "ibuprofen", "imipenem", "influenza_vaccine", "iodine", "keflex", "kiwi", "lactose_intolerance", "lamictal", "lasix", "latex", "levaquin", "librax", "lidocaine", "lipitor", "lisinopril", "lithium", "lopid", "lorazepam", "macrobid", "macrodantin", "mercury", "metaxalone", "methotrexate", "metronidazole", "mexiletine", "milk", "minocin", "mold", "morphine", "moxifloxacin", "myambutol", "mycobutin", "nafcillin", "namenda", "naproxen", "neosporin", "niacin", "nitrofurantoin_macrocrystals", "nitroglycerin_via_iv", "no_known_allergies_nka", "non_steroidal_anti_inflammatory_drugs_nsaids", "normal_saline", "norvasc", "nutmeg", "nuts", "oats", "oxycodone", "oxycontin", "peanuts", "penicillin", "percocet", "perfume", "persantine", "pet_dander", "phenobarbitol", "plavix", "poison_oak", "pollen", "polyester", "prednisone", "premarin", "prevacid", "prilosec", "propulsid", "proton_pump_inhibitors", "quinine_sulfate", "quinolones", "ragweed", "raw_apples", "red_meat", "reglan", "relafen", "remeron", "reminyl", "risperdal", "scallops", "seafood", "seasonal_hayfever", "seldane", "senna_s", "septra", "serzone", "shellfish", "shrimp", "simvastatin", "skelaxin", "smoke", "soy", "statins", "stelazine", "strawberries", "sulfonamides_sulfa_drugs", "sulphites", "suprax", "tegretol", "terazosin", "tetanus", "tetracycline", "thiosulfil", "thorazine", "tiazac", "tomatoes", "topamax", "tramadol", "tree_nuts", "trimethoprim", "trovan", "ultram", "vancomycin", "vaseretic", "vasotec", "versed", "vicodin", "vioxx", "voltaren", "walnuts", "wellbutrin", "wheat", "wine", "zantac", "zithromax", "zoloft", "zyprexa", "zyvox"], "title": "Allergy", "type": "string"}, "Appetite": {"description": "Patient appetite level", "enum": ["poor", "good"], "title": "Appetite", "type": "string"}, "AttendsServices": {"description": "Religious service attendance", "enum": ["unknown", "yes", "no"], "title": "AttendsServices", "type": "string"}, "CarePlan": {"properties": {"structured_care_needs": {"allOf": [{"$ref": "#/components/schemas/StructuredCareNeeds"}], "description": "Structured care plan data (Care Needs section)", "title": "Structured Care Needs"}, "structured_demographics": {"allOf": [{"$ref": "#/components/schemas/StructuredDemographics"}], "description": "Structured demographic data (Demographics section)", "title": "Structured Demographics"}, "structured_medical_conditions": {"allOf": [{"$ref": "#/components/schemas/StructuredMedicalConditions"}], "description": "Structured medical conditions data (Medical Conditions section)", "title": "Structured Medical Conditions"}, "structured_allergies": {"allOf": [{"$ref": "#/components/schemas/StructuredAllergies"}], "description": "Structured allergies data (Allergies section)", "title": "Structured Allergies"}, "structured_adls": {"allOf": [{"$ref": "#/components/schemas/StructuredADLsResponse"}], "description": "Structured ADL activities", "title": "Structured Adls"}, "structured_iadls": {"allOf": [{"$ref": "#/components/schemas/StructuredIADLsResponse"}], "description": "Structured IADL activities", "title": "Structured Iadls"}, "structured_match_criteria": {"allOf": [{"$ref": "#/components/schemas/StructuredMatchCriteriaResponse"}], "description": "Structured match criteria data", "title": "Structured Match Criteria"}, "structured_meals": {"allOf": [{"$ref": "#/components/schemas/StructuredMeals"}], "description": "Structured meals data (diet, appetite, meal scheduling, food preferences)", "title": "Structured Meals"}, "structured_driving": {"allOf": [{"$ref": "#/components/schemas/StructuredDriving"}], "description": "Structured driving data (vehicle arrangement, errands, appointments)", "title": "Structured Driving"}, "structured_transfers": {"allOf": [{"$ref": "#/components/schemas/StructuredTransfers"}], "description": "Structured transfers data (transfer types, aids, risks)", "title": "Structured Transfers"}, "structured_equipment": {"allOf": [{"$ref": "#/components/schemas/StructuredEquipmentEnvironment"}], "description": "Structured equipment / environment data (in-home equipment, safety, Lifeline interest)", "title": "Structured Equipment"}, "patient_id": {"description": "Patient ID - optional for AI generation, required for API save", "title": "Patient Id", "type": "integer"}, "post_hoc_action_id": {"description": "Post hoc action ID - marks the action as complete after care plan creation", "title": "Post Hoc Action Id", "type": "integer"}, "id": {"title": "Id", "type": "integer"}, "source": {"anyOf": [{"$ref": "#/components/schemas/DataSource"}, {"type": "string"}], "title": "Source"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "source", "created_at", "updated_at"], "title": "CarePlan", "type": "object"}, "CaregiverVehicle": {"description": "Whose car does the caregiver drive", "enum": ["aides_car", "clients_car"], "title": "CaregiverVehicle", "type": "string"}, "DataSource": {"description": "Centralized data source choices for all care models", "enum": ["wellsky_api", "wellsky_scraper", "axiscare_sync", "manual", "device_contacts", "ai_action", "caring", "apfm"], "title": "DataSource", "type": "string"}, "DayOfWeek": {"description": "Day of the week a caregiver task is scheduled for", "enum": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"], "title": "DayOfWeek", "type": "string"}, "DemographicsGender": {"description": "Gender choices for Demographics (separate from Person.Gender)", "enum": ["male", "female"], "title": "DemographicsGender", "type": "string"}, "Diet": {"description": "Diet assessment", "enum": ["poor_nutrition", "desires_improved", "special"], "title": "Diet", "type": "string"}, "EquipmentItem": {"description": "In-home equipment / environment modifications. Values mirror WellSky's checkbox names.", "enum": ["bedrails", "hospital_bed", "bed_commode", "grab_bars", "lift_chair", "raised_toilet_seat", "shower_bench", "handheld_showerhead", "other"], "title": "EquipmentItem", "type": "string"}, "FunctionalLimitation": {"description": "Functional limitations", "enum": ["amputation", "incontinence", "contracture", "hearing", "paralysis", "endurance", "ambulation", "speech", "legally_blind", "dyspnea"], "title": "FunctionalLimitation", "type": "string"}, "HearingLevel": {"description": "Hearing level choices", "enum": ["good", "poor", "deaf"], "title": "HearingLevel", "type": "string"}, "IADLActivity": {"description": "Schema for a single IADL activity", "properties": {"notes": {"title": "Notes", "type": "string"}, "level": {"allOf": [{"$ref": "#/components/schemas/ADLLevel"}], "title": "Level"}}, "title": "IADLActivity", "type": "object"}, "IADLValue": {"description": "A single IADL task assessment: an option key with its level of assistance and notes.", "properties": {"key": {"description": "IADL option key (must be one of the provided keys)", "title": "Key", "type": "string"}, "level": {"allOf": [{"$ref": "#/components/schemas/ADLLevel"}], "description": "Level of assistance needed: independent = performs without assistance, requires_assistance = needs some help, dependent = fully dependent on caregiver", "title": "Level"}, "notes": {"description": "Notes about this task", "title": "Notes", "type": "string"}, "tasks": {"description": "Caregiver tasks scheduled for this IADL. Include a task only when the caregiver should clearly perform it \u2014 an assessment with no tasks is normal. Every task must reference a catalog task `key` for this IADL; never invent custom tasks.", "items": {"$ref": "#/components/schemas/ADLTaskValue"}, "title": "Tasks", "type": "array"}, "label": {"type": "string", "nullable": true, "description": "Human-readable task label; populated in API responses", "title": "Label"}}, "required": ["key"], "title": "IADLValue", "type": "object"}, "Language": {"description": "Supported languages", "enum": ["english", "spanish", "arabic", "armenian", "mandarin", "french", "french_creole", "german", "greek", "gujarati", "hindi", "italian", "japanese", "korean", "persian", "polish", "portuguese", "russian", "tagalog", "urdu", "vietnamese", "other", "hebrew", "cantonese"], "title": "Language", "type": "string"}, "MaritalStatus": {"description": "Marital status choices", "enum": ["married", "cohabitating", "domestic_partnership", "single", "separated", "divorced", "widowed"], "title": "MaritalStatus", "type": "string"}, "MatchCriteriaLevel": {"description": "Match criteria preference level", "enum": ["not_needed", "preferred", "required"], "title": "MatchCriteriaLevel", "type": "string"}, "MatchCriterionValue": {"description": "A single caregiver matching preference: a dimension key and its required level.", "properties": {"key": {"description": "Match criterion dimension key (must be one of the provided keys)", "title": "Key", "type": "string"}, "value": {"$ref": "#/components/schemas/MatchCriteriaLevel", "description": "Preference level for this dimension. Use required only when explicitly stated as mandatory; use preferred when desired but not mandatory, and also when the topic is merely mentioned outside a caregiver-matching context (e.g. the patient has dementia and a dementia_experience dimension exists)."}, "label": {"type": "string", "nullable": true, "description": "Human-readable dimension label; populated in API responses", "title": "Label"}}, "required": ["key", "value"], "title": "MatchCriterionValue", "type": "object"}, "MealsAssistance": {"description": "Types of meal-related assistance the patient needs", "enum": ["cooking", "preparation", "feeding"], "title": "MealsAssistance", "type": "string"}, "MealsOther": {"description": "Other meal-related conditions", "enum": ["swallowing_issues", "encourage_liquids"], "title": "MealsOther", "type": "string"}, "OtherCondition": {"description": "Other medical conditions", "enum": ["smoker", "sensitive_to_smell", "on_oxygen", "colostomy_bag", "feeding_tube"], "title": "OtherCondition", "type": "string"}, "Prognosis": {"enum": ["poor", "guarded", "fair", "good", "excellent"], "title": "Prognosis", "type": "string"}, "Religion": {"description": "Religion choices", "enum": ["christianity", "judaism", "buddhism", "islam", "hinduism", "other", "unaffiliated"], "title": "Religion", "type": "string"}, "SpeechLevel": {"description": "Speech level choices", "enum": ["good", "poor", "none"], "title": "SpeechLevel", "type": "string"}, "StructuredADLsResponse": {"description": "Care plan ADL response: both shapes, so clients migrate at their own pace.\n\nExtends the dynamic `activities` representation (newer clients) with the original six\nfixed keys (older iOS builds). The fixed keys are deprecated \u2014 new clients should read\n`activities`. Both are populated from the same sparse rows; the fixed keys only reflect\nthose six tasks, while `activities` reflects all of them.", "properties": {"activities": {"description": "ADL task assessments. Include an entry only for tasks that are part of the care plan; omit tasks that don't apply. Each `key` must be one of the organization's configured ADL option keys.", "items": {"$ref": "#/components/schemas/ADLValue"}, "title": "Activities", "type": "array"}, "ambulation": {"allOf": [{"$ref": "#/components/schemas/ADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Ambulation"}, "bathing": {"allOf": [{"$ref": "#/components/schemas/ADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Bathing"}, "continence": {"allOf": [{"$ref": "#/components/schemas/ADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Continence"}, "dressing": {"allOf": [{"$ref": "#/components/schemas/ADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Dressing"}, "eating": {"allOf": [{"$ref": "#/components/schemas/ADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Eating"}, "toileting": {"allOf": [{"$ref": "#/components/schemas/ADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Toileting"}}, "title": "StructuredADLsResponse", "type": "object"}, "StructuredAllergies": {"description": "Structured allergies data - known allergens and related notes.\nMaps to Allergies model for structured data storage.", "properties": {"allergies": {"description": "Known allergens. Prefer a value from the provided allergy list; use a free-text name only for an allergen not on the list. Use ['no_known_allergies_nka'] when the patient is explicitly stated to have no known allergies.", "items": {"anyOf": [{"$ref": "#/components/schemas/Allergy"}, {"type": "string"}]}, "title": "Allergies", "type": "array"}, "notes": {"description": "Additional allergy notes", "title": "Notes", "type": "string"}}, "title": "StructuredAllergies", "type": "object"}, "StructuredCareNeeds": {"description": "Structured care plan data - starting with Care Needs section fields.\nMaps to CareNeeds model for structured data storage.", "properties": {"initial_contact": {"description": "Date of initial contact with patient", "format": "date", "title": "Initial Contact", "type": "string"}, "start_date": {"description": "Desired/actual care start date", "format": "date", "title": "Start Date", "type": "string"}, "prognosis": {"allOf": [{"$ref": "#/components/schemas/Prognosis"}], "description": "Patient prognosis, based on medical discussion and overall condition. Null if not discussed.", "title": "Prognosis"}, "care_goals": {"description": "Care goals: a concise markdown bulleted list of the desired outcomes the patient, family, and medical team agreed on. Cover the level of care needed, specific assistance required (bathing, meal prep, medication reminders, ...), what the patient/family hope to achieve, special considerations, and required caregiver qualifications (e.g. CNA, dementia experience). Goals are durable: describe ongoing needs, never specific appointment dates, one-off events, or scheduling logistics.", "title": "Care Goals", "type": "string"}, "proposed_schedule": {"description": "Proposed recurring care schedule (e.g., 'Mon-Fri 9am-5pm', '24/7 live-in'). Never one-off events or specific appointment dates.", "title": "Proposed Schedule", "type": "string"}}, "title": "StructuredCareNeeds", "type": "object"}, "StructuredDemographics": {"description": "Structured demographics data - patient demographic information.\nMaps to Demographics model for structured data storage.", "properties": {"date_of_birth": {"description": "Patient's date of birth", "format": "date", "title": "Date Of Birth", "type": "string"}, "height": {"description": "Patient height, normalized to feet-and-inches like 5'8\" (accept forms like '5 foot 8' or 'five eight')", "maxLength": 50, "title": "Height", "type": "string"}, "weight": {"description": "Patient weight in pounds", "exclusiveMinimum": 0, "title": "Weight", "type": "integer"}, "date_of_death": {"description": "Date of death if applicable", "format": "date", "title": "Date Of Death", "type": "string"}, "gender": {"allOf": [{"$ref": "#/components/schemas/DemographicsGender"}], "description": "Patient gender. Map variations (M/Man -> male, F/Woman -> female); null if not discussed or non-binary/other.", "title": "Gender"}, "marital_status": {"allOf": [{"$ref": "#/components/schemas/MaritalStatus"}], "description": "Marital status. Map variations ('living together' -> cohabitating, 'partner' -> domestic_partnership).", "title": "Marital Status"}, "spouse_name": {"description": "Spouse or partner name", "maxLength": 255, "title": "Spouse Name", "type": "string"}, "lives_with": {"description": "Very concise description of living arrangements. One short sentence, 10 words or fewer (e.g., 'alone', 'with daughter', 'with spouse and adult son').", "maxLength": 255, "title": "Lives With", "type": "string"}, "religion": {"allOf": [{"$ref": "#/components/schemas/Religion"}], "description": "Religious affiliation", "title": "Religion"}, "attends_services": {"allOf": [{"$ref": "#/components/schemas/AttendsServices"}], "description": "Attends religious services (Yes/No/Unknown). Default to unknown when religion is mentioned but attendance is not.", "title": "Attends Services"}, "dnr": {"description": "Do Not Resuscitate status (true=Yes, false=No, null=Unknown). Set only when explicitly discussed ('has a DNR', 'no DNR', 'DNR in place').", "title": "Dnr", "type": "boolean"}, "languages": {"description": "Languages spoken by patient. Default to ['english'] for a patient in the US when not discussed.", "items": {"$ref": "#/components/schemas/Language"}, "maxItems": 24, "title": "Languages", "type": "array"}, "past_profession": {"description": "Previous occupation or profession", "maxLength": 255, "title": "Past Profession", "type": "string"}}, "title": "StructuredDemographics", "type": "object"}, "StructuredDriving": {"description": "Structured driving data - vehicle arrangement, errands, doctor appointments, notes.\nMaps to Driving model for structured data storage.", "properties": {"vehicle": {"description": "Vehicle / transportation arrangement (Client Drives, Needs Caregiver)", "items": {"$ref": "#/components/schemas/Vehicle"}, "maxItems": 2, "title": "Vehicle", "type": "array"}, "caregiver_vehicle": {"anyOf": [{"$ref": "#/components/schemas/CaregiverVehicle"}, {"type": "string"}], "description": "Whose car the caregiver drives (Aide's Car / Client's Car)", "title": "Caregiver Vehicle"}, "errands_description": {"description": "Errands the caregiver helps with", "title": "Errands Description", "type": "string"}, "doctor_appointment_description": {"description": "Ongoing doctor's-appointment transport needs (e.g. 'monthly cardiology', 'weekly PT'); never specific appointment dates or times", "title": "Doctor Appointment Description", "type": "string"}, "notes": {"description": "Additional driving notes", "title": "Notes", "type": "string"}}, "title": "StructuredDriving", "type": "object"}, "StructuredEquipmentEnvironment": {"description": "Structured equipment / environment data - in-home equipment, safety, and accessibility.\nMaps to EquipmentEnvironment model for structured data storage.", "properties": {"safety_assessment_done": {"description": "Whether a home safety assessment has been completed", "title": "Safety Assessment Done", "type": "boolean"}, "interested_in_lifeline": {"description": "Whether the patient is interested in a Lifeline / medical alert system", "title": "Interested In Lifeline", "type": "boolean"}, "equipment": {"description": "In-home equipment and environment modifications. Use 'other' for an item not on the list and describe it in `equipment_other`.", "items": {"$ref": "#/components/schemas/EquipmentItem"}, "maxItems": 9, "title": "Equipment", "type": "array"}, "equipment_other": {"description": "Description of any other equipment or environment modification (when 'other' is selected)", "title": "Equipment Other", "type": "string"}, "notes": {"description": "Additional equipment / environment notes", "title": "Notes", "type": "string"}}, "title": "StructuredEquipmentEnvironment", "type": "object"}, "StructuredIADLsResponse": {"description": "Care plan IADL response: both shapes, so clients migrate at their own pace.\n\nExtends the dynamic `activities` representation (newer clients) with the original nine\nfixed keys (older iOS builds). The fixed keys are deprecated \u2014 new clients should read\n`activities`. Both are populated from the same sparse rows; the fixed keys only reflect\nthose nine tasks, while `activities` reflects all of them.", "properties": {"activities": {"description": "IADL task assessments. Include an entry only for tasks that are part of the care plan; omit tasks that don't apply. Each `key` must be one of the organization's configured IADL option keys.", "items": {"$ref": "#/components/schemas/IADLValue"}, "title": "Activities", "type": "array"}, "device_request": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Device Request"}, "housework": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Housework"}, "laundry": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Laundry"}, "medication": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Medication"}, "money_and_bills": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Money And Bills"}, "observation": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Observation"}, "pet_care": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Pet Care"}, "pharmacy": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Pharmacy"}, "preparing_meals": {"allOf": [{"$ref": "#/components/schemas/IADLActivity"}], "deprecated": true, "description": "Deprecated: use `activities`.", "title": "Preparing Meals"}}, "title": "StructuredIADLsResponse", "type": "object"}, "StructuredMatchCriteriaResponse": {"description": "Care plan match-criteria response: both shapes, so clients migrate at their own pace.\n\nExtends the dynamic `criteria` representation (newer clients) with the original seven\nfixed keys (older iOS builds). The fixed keys are deprecated \u2014 new clients should read\n`criteria`. Both are populated from the same sparse dimensions; the fixed keys only\nreflect those seven dimensions, while `criteria` reflects all of them.", "properties": {"criteria": {"description": "Caregiver matching preferences. Include an entry only for dimensions that are preferred or required; omit dimensions that are not needed. Include gender or language preferences only when explicitly stated. Each `key` must be one of the organization's configured match criterion dimension keys.", "items": {"$ref": "#/components/schemas/MatchCriterionValue"}, "title": "Criteria", "type": "array"}, "dementia_experience": {"allOf": [{"$ref": "#/components/schemas/MatchCriteriaLevel"}], "default": "not_needed", "deprecated": true, "description": "Deprecated: use `criteria`. Dementia experience requirement"}, "hospice_experience": {"allOf": [{"$ref": "#/components/schemas/MatchCriteriaLevel"}], "default": "not_needed", "deprecated": true, "description": "Deprecated: use `criteria`. Hospice experience requirement"}, "incontinence_experience": {"allOf": [{"$ref": "#/components/schemas/MatchCriteriaLevel"}], "default": "not_needed", "deprecated": true, "description": "Deprecated: use `criteria`. Incontinence experience requirement"}, "ok_with_client_smoking": {"allOf": [{"$ref": "#/components/schemas/MatchCriteriaLevel"}], "default": "not_needed", "deprecated": true, "description": "Deprecated: use `criteria`. OK with client smoking requirement"}, "prefers_female_caregiver": {"allOf": [{"$ref": "#/components/schemas/MatchCriteriaLevel"}], "default": "not_needed", "deprecated": true, "description": "Deprecated: use `criteria`. Preference for female caregiver"}, "prefers_male_caregiver": {"allOf": [{"$ref": "#/components/schemas/MatchCriteriaLevel"}], "default": "not_needed", "deprecated": true, "description": "Deprecated: use `criteria`. Preference for male caregiver"}, "speak_client_language": {"allOf": [{"$ref": "#/components/schemas/MatchCriteriaLevel"}], "default": "not_needed", "deprecated": true, "description": "Deprecated: use `criteria`. Must speak client's language"}}, "title": "StructuredMatchCriteriaResponse", "type": "object"}, "StructuredMeals": {"description": "Structured meals data - diet, appetite, meal scheduling, food preferences.\nMaps to Meals model for structured data storage.", "properties": {"meals_assistance": {"description": "Types of meal-related assistance needed (Cooking, Preparation, Feeding)", "items": {"$ref": "#/components/schemas/MealsAssistance"}, "maxItems": 3, "title": "Meals Assistance", "type": "array"}, "appetite": {"anyOf": [{"$ref": "#/components/schemas/Appetite"}, {"type": "string"}], "description": "Patient appetite (Poor/Good)", "title": "Appetite"}, "diet": {"anyOf": [{"$ref": "#/components/schemas/Diet"}, {"type": "string"}], "description": "Diet assessment (Poor Nutrition / Desires Improved Nutrition / Special Diet)", "title": "Diet"}, "special_diet": {"description": "Description of any special diet", "title": "Special Diet", "type": "string"}, "shopping_by": {"description": "Who does grocery shopping", "title": "Shopping By", "type": "string"}, "breakfast_time": {"description": "Scheduled breakfast time", "format": "time", "title": "Breakfast Time", "type": "string"}, "lunch_time": {"description": "Scheduled lunch time", "format": "time", "title": "Lunch Time", "type": "string"}, "dinner_time": {"description": "Scheduled dinner time", "format": "time", "title": "Dinner Time", "type": "string"}, "snacks_time": {"description": "Scheduled snacks time", "format": "time", "title": "Snacks Time", "type": "string"}, "meals_other": {"description": "Other meal-related conditions (Swallowing Issues, Encourage Liquids)", "items": {"$ref": "#/components/schemas/MealsOther"}, "maxItems": 2, "title": "Meals Other", "type": "array"}, "favorite_breakfast": {"description": "Favorite breakfast foods", "maxLength": 200, "title": "Favorite Breakfast", "type": "string"}, "favorite_lunch": {"description": "Favorite lunch foods", "maxLength": 200, "title": "Favorite Lunch", "type": "string"}, "favorite_snack": {"description": "Favorite snack foods", "maxLength": 200, "title": "Favorite Snack", "type": "string"}, "favorite_dinner": {"description": "Favorite dinner foods", "maxLength": 200, "title": "Favorite Dinner", "type": "string"}, "notes": {"description": "Additional meals-related notes", "title": "Notes", "type": "string"}}, "title": "StructuredMeals", "type": "object"}, "StructuredMedicalConditions": {"description": "Structured medical conditions data - patient medical conditions and functional limitations.\nMaps to MedicalConditions model for structured data storage.", "properties": {"medical_conditions": {"description": "Chronic/acute conditions, hospital stays, etc.", "title": "Medical Conditions", "type": "string"}, "hearing": {"allOf": [{"$ref": "#/components/schemas/HearingLevel"}], "description": "Hearing level (Good/Poor/Deaf)", "title": "Hearing"}, "hearing_aid": {"description": "Uses hearing aid", "title": "Hearing Aid", "type": "boolean"}, "speech": {"allOf": [{"$ref": "#/components/schemas/SpeechLevel"}], "description": "Speech level (Good/Poor/None)", "title": "Speech"}, "vision": {"allOf": [{"$ref": "#/components/schemas/VisionLevel"}], "description": "Vision level (Good/Poor/Blind)", "title": "Vision"}, "glasses": {"description": "Wears glasses", "title": "Glasses", "type": "boolean"}, "swallowing": {"allOf": [{"$ref": "#/components/schemas/SwallowingLevel"}], "description": "Swallowing level (Good/Poor/None)", "title": "Swallowing"}, "other_conditions": {"description": "Other medical conditions (smoker, on oxygen, etc.)", "items": {"$ref": "#/components/schemas/OtherCondition"}, "maxItems": 5, "title": "Other Conditions", "type": "array"}, "functional_limitations": {"description": "Functional limitations (amputation, incontinence, etc.)", "items": {"$ref": "#/components/schemas/FunctionalLimitation"}, "maxItems": 10, "title": "Functional Limitations", "type": "array"}}, "title": "StructuredMedicalConditions", "type": "object"}, "StructuredTransfers": {"description": "Structured transfers data - transfer types, aids used, risks, notes.\nMaps to Transfers model for structured data storage.", "properties": {"transfer_types": {"description": "How the patient transfers (e.g. stand pivot, two-person assist)", "title": "Transfer Types", "type": "string"}, "transfer_aides": {"description": "Aids used to help the patient transfer (Gait Belt, Hoyer, Other)", "items": {"$ref": "#/components/schemas/TransferAide"}, "maxItems": 3, "title": "Transfer Aides", "type": "array"}, "aides_other": {"description": "Description of any other transfer aid (when Other is selected)", "title": "Aides Other", "type": "string"}, "transfer_risks": {"description": "Risks associated with transferring the patient", "title": "Transfer Risks", "type": "string"}, "notes": {"description": "Additional transfer notes", "title": "Notes", "type": "string"}}, "title": "StructuredTransfers", "type": "object"}, "SwallowingLevel": {"description": "Swallowing level choices", "enum": ["good", "poor", "none"], "title": "SwallowingLevel", "type": "string"}, "TaskShift": {"description": "Shift a caregiver task is scheduled for, mirroring WellSky's fixed set", "enum": ["all_shifts", "morning", "afternoon", "evening", "overnight"], "title": "TaskShift", "type": "string"}, "TransferAide": {"description": "Aids used to help the patient transfer. Values mirror WellSky's checkbox values.", "enum": ["gait_belt", "hoyer", "aides_other"], "title": "TransferAide", "type": "string"}, "Vehicle": {"description": "Vehicle/transport arrangement", "enum": ["client_drives", "needs_caregiver"], "title": "Vehicle", "type": "string"}, "VisionLevel": {"description": "Vision level choices", "enum": ["good", "poor", "blind"], "title": "VisionLevel", "type": "string"}, "StructuredADLs": {"description": "Structured ADL (Activities of Daily Living) data.\n\nStored as sparse ADLAssessment rows keyed by dynamic ADLOption.", "properties": {"activities": {"description": "ADL task assessments. Include an entry only for tasks that are part of the care plan; omit tasks that don't apply. Each `key` must be one of the organization's configured ADL option keys.", "items": {"$ref": "#/components/schemas/ADLValue"}, "title": "Activities", "type": "array"}}, "title": "StructuredADLs", "type": "object"}, "StructuredIADLs": {"description": "Structured IADL (Instrumental Activities of Daily Living) data.\n\nStored as sparse IADLAssessment rows keyed by dynamic IADLOption.", "properties": {"activities": {"description": "IADL task assessments. Include an entry only for tasks that are part of the care plan; omit tasks that don't apply. Each `key` must be one of the organization's configured IADL option keys.", "items": {"$ref": "#/components/schemas/IADLValue"}, "title": "Activities", "type": "array"}}, "title": "StructuredIADLs", "type": "object"}, "StructuredMatchCriteria": {"description": "Structured match criteria data - caregiver matching preferences.\n\nStored as sparse MatchCriterion rows keyed by dynamic MatchCriterionDimension.", "properties": {"criteria": {"description": "Caregiver matching preferences. Include an entry only for dimensions that are preferred or required; omit dimensions that are not needed. Include gender or language preferences only when explicitly stated. Each `key` must be one of the organization's configured match criterion dimension keys.", "items": {"$ref": "#/components/schemas/MatchCriterionValue"}, "title": "Criteria", "type": "array"}}, "title": "StructuredMatchCriteria", "type": "object"}, "UpdateCarePlan": {"properties": {"structured_care_needs": {"allOf": [{"$ref": "#/components/schemas/StructuredCareNeeds"}], "description": "Structured care plan data (Care Needs section)", "title": "Structured Care Needs"}, "structured_demographics": {"allOf": [{"$ref": "#/components/schemas/StructuredDemographics"}], "description": "Structured demographic data (Demographics section)", "title": "Structured Demographics"}, "structured_medical_conditions": {"allOf": [{"$ref": "#/components/schemas/StructuredMedicalConditions"}], "description": "Structured medical conditions data (Medical Conditions section)", "title": "Structured Medical Conditions"}, "structured_allergies": {"allOf": [{"$ref": "#/components/schemas/StructuredAllergies"}], "description": "Structured allergies data (Allergies section)", "title": "Structured Allergies"}, "structured_adls": {"allOf": [{"$ref": "#/components/schemas/StructuredADLs"}], "description": "Structured ADL activities", "title": "Structured Adls"}, "structured_iadls": {"allOf": [{"$ref": "#/components/schemas/StructuredIADLs"}], "description": "Structured IADL activities", "title": "Structured Iadls"}, "structured_match_criteria": {"allOf": [{"$ref": "#/components/schemas/StructuredMatchCriteria"}], "description": "Structured match criteria data", "title": "Structured Match Criteria"}, "structured_meals": {"allOf": [{"$ref": "#/components/schemas/StructuredMeals"}], "description": "Structured meals data (diet, appetite, meal scheduling, food preferences)", "title": "Structured Meals"}, "structured_driving": {"allOf": [{"$ref": "#/components/schemas/StructuredDriving"}], "description": "Structured driving data (vehicle arrangement, errands, appointments)", "title": "Structured Driving"}, "structured_transfers": {"allOf": [{"$ref": "#/components/schemas/StructuredTransfers"}], "description": "Structured transfers data (transfer types, aids, risks)", "title": "Structured Transfers"}, "structured_equipment": {"allOf": [{"$ref": "#/components/schemas/StructuredEquipmentEnvironment"}], "description": "Structured equipment / environment data (in-home equipment, safety, Lifeline interest)", "title": "Structured Equipment"}, "care_plan_id": {"description": "The ID of the care plan to update", "title": "Care Plan Id", "type": "integer"}, "post_hoc_action_id": {"description": "Post hoc action ID - marks the action as complete after care plan creation", "title": "Post Hoc Action Id", "type": "integer"}}, "title": "UpdateCarePlan", "type": "object"}, "NewCarePlan": {"description": "AI-generated care plan sections from phone call.\nEach field contains markdown-formatted text summary to be manually entered into WellSky.\nNull fields indicate the section was not discussed during the call.", "properties": {"structured_care_needs": {"allOf": [{"$ref": "#/components/schemas/StructuredCareNeeds"}], "description": "Structured care plan data (Care Needs section)", "title": "Structured Care Needs"}, "structured_demographics": {"allOf": [{"$ref": "#/components/schemas/StructuredDemographics"}], "description": "Structured demographic data (Demographics section)", "title": "Structured Demographics"}, "structured_medical_conditions": {"allOf": [{"$ref": "#/components/schemas/StructuredMedicalConditions"}], "description": "Structured medical conditions data (Medical Conditions section)", "title": "Structured Medical Conditions"}, "structured_allergies": {"allOf": [{"$ref": "#/components/schemas/StructuredAllergies"}], "description": "Structured allergies data (Allergies section)", "title": "Structured Allergies"}, "structured_adls": {"allOf": [{"$ref": "#/components/schemas/StructuredADLs"}], "description": "Structured ADL activities", "title": "Structured Adls"}, "structured_iadls": {"allOf": [{"$ref": "#/components/schemas/StructuredIADLs"}], "description": "Structured IADL activities", "title": "Structured Iadls"}, "structured_match_criteria": {"allOf": [{"$ref": "#/components/schemas/StructuredMatchCriteria"}], "description": "Structured match criteria data", "title": "Structured Match Criteria"}, "structured_meals": {"allOf": [{"$ref": "#/components/schemas/StructuredMeals"}], "description": "Structured meals data (diet, appetite, meal scheduling, food preferences)", "title": "Structured Meals"}, "structured_driving": {"allOf": [{"$ref": "#/components/schemas/StructuredDriving"}], "description": "Structured driving data (vehicle arrangement, errands, appointments)", "title": "Structured Driving"}, "structured_transfers": {"allOf": [{"$ref": "#/components/schemas/StructuredTransfers"}], "description": "Structured transfers data (transfer types, aids, risks)", "title": "Structured Transfers"}, "structured_equipment": {"allOf": [{"$ref": "#/components/schemas/StructuredEquipmentEnvironment"}], "description": "Structured equipment / environment data (in-home equipment, safety, Lifeline interest)", "title": "Structured Equipment"}, "patient_id": {"description": "Patient ID - optional for AI generation, required for API save", "title": "Patient Id", "type": "integer"}, "post_hoc_action_id": {"description": "Post hoc action ID - marks the action as complete after care plan creation", "title": "Post Hoc Action Id", "type": "integer"}}, "title": "NewCarePlan", "type": "object"}, "EmailAccountSchema": {"properties": {"id": {"title": "Id", "type": "integer"}, "email": {"title": "Email", "type": "string"}, "provider": {"title": "Provider", "type": "string"}, "signature_html": {"title": "Signature Html", "type": "string"}, "signature_text": {"title": "Signature Text", "type": "string"}}, "required": ["id", "email", "provider", "signature_html", "signature_text"], "title": "EmailAccountSchema", "type": "object"}, "ReauthRequiredError": {"description": "The email account's connection expired and must be re-authenticated.\n\nClients detect this by `code` and open `reconnect_url` (the same connect\nflow the web app uses) so the user can reconnect the account.", "properties": {"code": {"const": "grant_reauth_required", "default": "grant_reauth_required", "title": "Code", "type": "string"}, "detail": {"title": "Detail", "type": "string"}, "email_account_id": {"title": "Email Account Id", "type": "integer"}, "reconnect_url": {"title": "Reconnect Url", "type": "string"}}, "required": ["detail", "email_account_id", "reconnect_url"], "title": "ReauthRequiredError", "type": "object"}, "SendEmailRequest": {"properties": {"email_account_id": {"title": "Email Account Id", "type": "integer"}, "subject": {"title": "Subject", "type": "string"}, "body": {"title": "Body", "type": "string"}, "to": {"format": "email", "title": "To", "type": "string"}, "cc": {"format": "email", "title": "Cc", "type": "string"}, "bcc": {"format": "email", "title": "Bcc", "type": "string"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}}, "required": ["email_account_id", "subject", "body"], "title": "SendEmailRequest", "type": "object"}, "FlagName": {"description": "Canonical names for every feature flag in the project.\n\nAdd a member here when introducing a new flag; pass `FlagName.X` to\n`flag_is_active(request, ...)` or `is_active_for_organization(org, ...)`\ninstead of a string literal.", "enum": ["email_features", "email_signatures", "pipeline", "web_calling", "chat", "suggested_action_titles"], "title": "FlagName", "type": "string"}, "Address": {"properties": {"address_type": {"anyOf": [{"$ref": "#/components/schemas/AddressType"}, {"type": "string"}], "title": "Address Type"}, "address_line1": {"default": "", "title": "Address Line1", "type": "string"}, "address_line2": {"default": "", "title": "Address Line2", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "state": {"anyOf": [{"$ref": "#/components/schemas/USState", "description": "US state 2-letter abbreviation code", "title": "US state"}, {"type": "string"}], "default": "", "title": "State"}, "zip_code": {"anyOf": [{"description": "US Postal Service ZIP code (5 digit format or ZIP+4 format)", "pattern": "^(\\d{5})(\\-\\d{4})?$", "title": "US postal ZIP code", "type": "string"}, {"type": "string"}], "default": "", "title": "Zip Code"}}, "required": ["address_type"], "title": "Address", "type": "object"}, "AddressType": {"description": "Address type choices", "enum": ["home", "work", "mailing", "other"], "title": "AddressType", "type": "string"}, "Contact": {"properties": {"id": {"title": "Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "source": {"anyOf": [{"$ref": "#/components/schemas/DataSource"}, {"type": "string"}], "title": "Source"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "title": "Emails", "type": "array"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "description": {"title": "Description", "type": "string"}, "associations": {"items": {"anyOf": [{"$ref": "#/components/schemas/PatientAssociation"}, {"$ref": "#/components/schemas/InstitutionAssociation"}]}, "title": "Associations", "type": "array"}}, "required": ["id", "first_name", "last_name", "organization_id", "source", "emails", "phone_numbers", "addresses", "description", "associations"], "title": "Contact", "type": "object"}, "Email": {"properties": {"email_type": {"anyOf": [{"enum": ["personal", "work", "other"], "type": "string"}, {"type": "string"}], "default": "other", "title": "Email Type"}, "email": {"format": "email", "title": "Email", "type": "string"}}, "required": ["email"], "title": "Email", "type": "object"}, "Gender": {"description": "Centralized gender choices for care models", "enum": ["male", "female", "unknown"], "title": "Gender", "type": "string"}, "InstitutionAssociation": {"properties": {"entity_type": {"const": "institution", "default": "institution", "title": "Entity Type", "type": "string"}, "id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "relationship": {"title": "Relationship", "type": "string"}}, "required": ["id", "name", "relationship"], "title": "InstitutionAssociation", "type": "object"}, "PatientAssociation": {"properties": {"entity_type": {"const": "patient", "default": "patient", "title": "Entity Type", "type": "string"}, "id": {"title": "Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "relationship": {"title": "Relationship", "type": "string"}}, "required": ["id", "first_name", "last_name", "relationship"], "title": "PatientAssociation", "type": "object"}, "PhoneNumber": {"properties": {"phone_type": {"anyOf": [{"$ref": "#/components/schemas/PhoneType"}, {"type": "string"}], "title": "Phone Type"}, "number": {"description": "US phone number", "examples": ["(555) 123-4567", "719-266-2837", "+13402021850"], "title": "US phone number", "type": "string"}}, "required": ["phone_type", "number"], "title": "PhoneNumber", "type": "object"}, "PhoneType": {"description": "Phone number type choices", "enum": ["home", "mobile", "work", "fax", "other"], "title": "PhoneType", "type": "string"}, "USState": {"description": "US State abbreviations", "enum": ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "DC", "PR", "VI", "GU", "AS", "MP"], "title": "USState", "type": "string"}, "UpdateContact": {"additionalProperties": false, "properties": {"post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "maxItems": 1, "title": "Emails", "type": "array"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "description": {"title": "Description", "type": "string"}}, "title": "UpdateContact", "type": "object"}, "NewContact": {"properties": {"first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "emails": {"default": [], "items": {"$ref": "#/components/schemas/Email"}, "maxItems": 1, "title": "Emails", "type": "array"}, "phone_numbers": {"default": [], "items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"default": [], "items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}}, "required": ["first_name", "last_name", "organization_id"], "title": "NewContact", "type": "object"}, "DirectoryFilterSchema": {"properties": {"types": {"default": [], "items": {"anyOf": [{"$ref": "#/components/schemas/DirectoryTypeFilter"}, {"type": "string"}]}, "title": "Types", "type": "array"}, "client_statuses": {"default": [], "items": {"anyOf": [{"$ref": "#/components/schemas/PatientStatus"}, {"type": "string"}]}, "title": "Client Statuses", "type": "array"}, "referrer_kinds": {"default": [], "items": {"anyOf": [{"$ref": "#/components/schemas/DirectoryReferrerKindFilter"}, {"type": "string"}]}, "title": "Referrer Kinds", "type": "array"}, "search": {"default": "", "title": "Search", "type": "string"}, "sort": {"anyOf": [{"$ref": "#/components/schemas/DirectorySortField"}, {"type": "string"}], "default": "", "title": "Sort"}, "direction": {"anyOf": [{"$ref": "#/components/schemas/DirectorySortDirection"}, {"type": "string"}], "default": "asc", "title": "Direction"}}, "title": "DirectoryFilterSchema", "type": "object"}, "DirectoryReferrerKindFilter": {"enum": ["referrer_person", "referrer_institution"], "title": "DirectoryReferrerKindFilter", "type": "string"}, "DirectorySortDirection": {"enum": ["asc", "desc"], "title": "DirectorySortDirection", "type": "string"}, "DirectorySortField": {"enum": ["name", "status", "description", "source", "referrals", "last_contacted"], "title": "DirectorySortField", "type": "string"}, "DirectoryTypeFilter": {"enum": ["client", "contact", "institution", "referrer"], "title": "DirectoryTypeFilter", "type": "string"}, "PatientStatus": {"enum": ["prospect", "closed_lost", "active", "churned"], "title": "PatientStatus", "type": "string"}, "Directory": {"properties": {"contacts": {"items": {"$ref": "#/components/schemas/DirectoryContact"}, "title": "Contacts", "type": "array"}, "patients": {"items": {"$ref": "#/components/schemas/DirectoryPatient"}, "title": "Patients", "type": "array"}, "referrers": {"default": [], "items": {"$ref": "#/components/schemas/DirectoryReferrer"}, "title": "Referrers", "type": "array"}}, "required": ["contacts", "patients"], "title": "Directory", "type": "object"}, "DirectoryContact": {"properties": {"entity_type": {"const": "contact", "title": "Entity Type", "type": "string"}, "id": {"title": "Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "source": {"anyOf": [{"$ref": "#/components/schemas/DataSource"}, {"type": "string"}], "default": "", "title": "Source"}, "last_contacted_at": {"format": "date-time", "type": "string", "nullable": true, "title": "Last Contacted At"}, "abbreviation": {"title": "Abbreviation", "type": "string"}, "sort_letter": {"title": "Sort Letter", "type": "string"}}, "required": ["entity_type", "id", "first_name", "last_name"], "title": "DirectoryContact", "type": "object"}, "DirectoryPatient": {"properties": {"entity_type": {"const": "patient", "title": "Entity Type", "type": "string"}, "id": {"title": "Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PatientStatus"}, {"type": "string"}], "title": "Status"}, "description": {"default": "", "title": "Description", "type": "string"}, "source": {"anyOf": [{"$ref": "#/components/schemas/DataSource"}, {"type": "string"}], "default": "", "title": "Source"}, "last_contacted_at": {"format": "date-time", "type": "string", "nullable": true, "title": "Last Contacted At"}, "abbreviation": {"title": "Abbreviation", "type": "string"}, "sort_letter": {"title": "Sort Letter", "type": "string"}}, "required": ["entity_type", "id", "first_name", "last_name", "status"], "title": "DirectoryPatient", "type": "object"}, "DirectoryReferrer": {"properties": {"entity_type": {"anyOf": [{"enum": ["referrer_person", "referrer_institution"], "type": "string"}, {"type": "string"}], "title": "Entity Type"}, "id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "source": {"anyOf": [{"$ref": "#/components/schemas/DataSource"}, {"type": "string"}], "default": "", "title": "Source"}, "referrals": {"default": 0, "title": "Referrals", "type": "integer"}, "last_contacted_at": {"format": "date-time", "type": "string", "nullable": true, "title": "Last Contacted At"}, "abbreviation": {"title": "Abbreviation", "type": "string"}, "sort_letter": {"title": "Sort Letter", "type": "string"}}, "required": ["entity_type", "id", "name"], "title": "DirectoryReferrer", "type": "object"}, "DialerPhoneNumber": {"description": "Phone number for dialer search results.", "properties": {"number": {"title": "Number", "type": "string"}, "display": {"title": "Display", "type": "string"}, "label": {"title": "Label", "type": "string"}, "is_primary": {"title": "Is Primary", "type": "boolean"}}, "required": ["number", "display", "label", "is_primary"], "title": "DialerPhoneNumber", "type": "object"}, "DialerSearchResult": {"description": "Entity result from dialer search.", "properties": {"entity_type": {"anyOf": [{"enum": ["patient", "contact", "referrer_person", "referrer_institution"], "type": "string"}, {"type": "string"}], "title": "Entity Type"}, "id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "initials": {"title": "Initials", "type": "string"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/DialerPhoneNumber"}, "title": "Phone Numbers", "type": "array"}}, "required": ["entity_type", "id", "name", "initials", "phone_numbers"], "title": "DialerSearchResult", "type": "object"}, "DialerSearchResults": {"description": "Response for dialer search endpoint.", "properties": {"results": {"items": {"$ref": "#/components/schemas/DialerSearchResult"}, "title": "Results", "type": "array"}, "raw_number_valid": {"title": "Raw Number Valid", "type": "boolean"}, "raw_number_formatted": {"type": "string", "nullable": true, "title": "Raw Number Formatted"}}, "required": ["results", "raw_number_valid", "raw_number_formatted"], "title": "DialerSearchResults", "type": "object"}, "ContactAssociation": {"properties": {"entity_type": {"const": "contact", "default": "contact", "title": "Entity Type", "type": "string"}, "id": {"title": "Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "relationship": {"title": "Relationship", "type": "string"}}, "required": ["id", "first_name", "last_name", "relationship"], "title": "ContactAssociation", "type": "object"}, "EntityKind": {"enum": ["client", "contact", "referrer", "institution"], "type": "string"}, "Patient": {"properties": {"id": {"title": "Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "source": {"anyOf": [{"$ref": "#/components/schemas/DataSource"}, {"type": "string"}], "title": "Source"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "title": "Emails", "type": "array"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "status": {"$ref": "#/components/schemas/PatientStatus"}, "pipeline_stage": {"allOf": [{"$ref": "#/components/schemas/PipelineStage"}], "nullable": true}, "description": {"title": "Description", "type": "string"}, "care_plan_id": {"title": "Care Plan Id", "type": "integer"}, "associations": {"items": {"anyOf": [{"$ref": "#/components/schemas/ContactAssociation"}, {"$ref": "#/components/schemas/InstitutionAssociation"}]}, "title": "Associations", "type": "array"}, "referrers": {"items": {"$ref": "#/components/schemas/ReferringEntity"}, "title": "Referrers", "type": "array"}}, "required": ["id", "first_name", "last_name", "organization_id", "source", "emails", "phone_numbers", "addresses", "status", "description"], "title": "Patient", "type": "object"}, "PipelineStage": {"properties": {"id": {"title": "Id", "type": "integer"}, "label": {"title": "Label", "type": "string"}, "bucket": {"anyOf": [{"$ref": "#/components/schemas/PipelineStageBucket"}, {"type": "string"}], "title": "Bucket"}}, "required": ["id", "label", "bucket"], "title": "PipelineStage", "type": "object"}, "PipelineStageBucket": {"enum": ["prospect", "active", "inactive"], "title": "PipelineStageBucket", "type": "string"}, "ReferringEntity": {"description": "Whoever a referral records as the referrer, in whichever of the four kinds it is.", "properties": {"entity_type": {"anyOf": [{"$ref": "#/components/schemas/EntityKind"}, {"type": "string"}], "title": "Entity Type"}, "entity_id": {"title": "Entity Id", "type": "integer"}, "entity_name": {"title": "Entity Name", "type": "string"}}, "required": ["entity_type", "entity_id", "entity_name"], "title": "ReferringEntity", "type": "object"}, "UpdatePatient": {"additionalProperties": false, "properties": {"post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "maxItems": 1, "title": "Emails", "type": "array"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "status": {"allOf": [{"$ref": "#/components/schemas/PatientStatus"}], "title": "Status"}, "description": {"title": "Description", "type": "string"}}, "title": "UpdatePatient", "type": "object"}, "NewPatient": {"properties": {"first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "emails": {"default": [], "items": {"$ref": "#/components/schemas/Email"}, "maxItems": 1, "title": "Emails", "type": "array"}, "phone_numbers": {"default": [], "items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"default": [], "items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}}, "required": ["first_name", "last_name", "organization_id"], "title": "NewPatient", "type": "object"}, "MinimumVersions": {"properties": {"ios": {"$ref": "#/components/schemas/SemanticVersion"}}, "required": ["ios"], "title": "MinimumVersions", "type": "object"}, "SemanticVersion": {"properties": {"major": {"title": "Major", "type": "integer"}, "minor": {"title": "Minor", "type": "integer"}, "patch": {"title": "Patch", "type": "integer"}, "version": {"readOnly": true, "title": "Version", "type": "string"}}, "required": ["major", "minor", "patch", "version"], "title": "SemanticVersion", "type": "object"}, "OrganizationListItem": {"properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}}, "required": ["id", "name"], "title": "OrganizationListItem", "type": "object"}, "ErrorData": {"properties": {"code": {"title": "Code", "type": "string"}, "description": {"title": "Description", "type": "string"}}, "required": ["code", "description"], "title": "ErrorData", "type": "object"}, "InvitationAcceptance": {"properties": {"token": {"title": "Token", "type": "string"}}, "required": ["token"], "title": "InvitationAcceptance", "type": "object"}, "InvitationData": {"properties": {"organization": {"$ref": "#/components/schemas/InvitationOrganization"}, "invited_email": {"title": "Invited Email", "type": "string"}}, "required": ["organization", "invited_email"], "title": "InvitationData", "type": "object"}, "InvitationOrganization": {"properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}}, "required": ["id", "name"], "title": "InvitationOrganization", "type": "object"}, "Recording": {"description": "Response schema for a recording.", "properties": {"id": {"title": "Id", "type": "integer"}, "audio_file_url": {"title": "Audio File Url", "type": "string"}, "duration_seconds": {"title": "Duration Seconds", "type": "integer"}, "patient_id": {"title": "Patient Id", "type": "integer"}, "contact_id": {"title": "Contact Id", "type": "integer"}, "uploaded_by_id": {"title": "Uploaded By Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "summary": {"title": "Summary", "type": "string"}, "description": {"title": "Description", "type": "string"}}, "required": ["id", "audio_file_url", "duration_seconds", "organization_id", "created_at", "updated_at"], "title": "Recording", "type": "object"}, "NewRecording": {"description": "Input schema for uploading a new recording.", "properties": {"organization_id": {"title": "Organization Id", "type": "integer"}, "duration_seconds": {"title": "Duration Seconds", "type": "integer"}, "patient_id": {"title": "Patient Id", "type": "integer"}, "contact_id": {"title": "Contact Id", "type": "integer"}}, "required": ["organization_id", "duration_seconds"], "title": "NewRecording", "type": "object"}, "DescriptionResult": {"properties": {"description": {"title": "Description", "type": "string"}}, "required": ["description"], "title": "DescriptionResult", "type": "object"}, "EmailDraft": {"properties": {"subject": {"description": "Brief, professional email subject line", "title": "Subject", "type": "string"}, "body": {"description": "Concise, polite email body. Include only facts from the transcript\u2014no invented details. Reference the phone conversation, include clear next steps.", "title": "Body", "type": "string"}, "to": {"description": "Recipient email address: one stated in the communication, or the recipient's stored address from their record (fetch_contact_details, fetch_client_details, fetch_referrer_details). Set to null only when neither has one. Never invent an email address.", "format": "email", "title": "To", "type": "string"}, "cc": {"format": "email", "title": "Cc", "type": "string"}, "bcc": {"format": "email", "title": "Bcc", "type": "string"}}, "required": ["subject", "body"], "title": "EmailDraft", "type": "object"}, "NewReferrer": {"properties": {"first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "emails": {"default": [], "items": {"$ref": "#/components/schemas/Email"}, "title": "Emails", "type": "array"}, "phone_numbers": {"default": [], "items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"default": [], "items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}}, "required": ["first_name", "last_name", "organization_id"], "title": "NewReferrer", "type": "object"}, "NewReferrerInstitution": {"properties": {"name": {"title": "Name", "type": "string"}, "url": {"type": "string", "nullable": true, "title": "Url"}, "emails": {"default": [], "items": {"$ref": "#/components/schemas/Email"}, "title": "Emails", "type": "array"}, "phone_numbers": {"default": [], "items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"default": [], "items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}}, "required": ["name", "organization_id"], "title": "NewReferrerInstitution", "type": "object"}, "PostHocActionStatus": {"enum": ["in_progress", "blocked", "failed", "proposed", "accepted", "declined", "cancelled"], "title": "PostHocActionStatus", "type": "string"}, "PostHocActions": {"properties": {"call_description": {"allOf": [{"$ref": "#/components/schemas/PostHocDescriptionDetail"}], "title": "Call Description"}, "call_summary": {"allOf": [{"$ref": "#/components/schemas/PostHocSummaryDetail"}], "title": "Call Summary"}, "follow_up_email": {"allOf": [{"$ref": "#/components/schemas/PostHocEmailDetail"}], "title": "Follow Up Email"}, "create_patient": {"allOf": [{"$ref": "#/components/schemas/PostHocCreatePatientDetail"}], "title": "Create Patient"}, "update_patient": {"allOf": [{"$ref": "#/components/schemas/PostHocUpdatePatientDetail"}], "title": "Update Patient"}, "create_contact": {"allOf": [{"$ref": "#/components/schemas/PostHocCreateContactDetail"}], "title": "Create Contact"}, "update_contact": {"allOf": [{"$ref": "#/components/schemas/PostHocUpdateContactDetail"}], "title": "Update Contact"}, "create_referrer": {"allOf": [{"$ref": "#/components/schemas/PostHocCreateReferrerDetail"}], "title": "Create Referrer"}, "update_referrer": {"allOf": [{"$ref": "#/components/schemas/PostHocUpdateReferrerDetail"}], "title": "Update Referrer"}, "create_referrer_institution": {"allOf": [{"$ref": "#/components/schemas/PostHocCreateReferrerInstitutionDetail"}], "title": "Create Referrer Institution"}, "generate_care_plan": {"allOf": [{"$ref": "#/components/schemas/PostHocGenerateCarePlanDetail"}], "title": "Generate Care Plan"}, "update_care_plan": {"allOf": [{"$ref": "#/components/schemas/PostHocUpdateCarePlanDetail"}], "title": "Update Care Plan"}}, "title": "PostHocActions", "type": "object"}, "PostHocCreateContactDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/NewContact"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocCreateContactDetail", "type": "object"}, "PostHocCreatePatientDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/NewPatient"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocCreatePatientDetail", "type": "object"}, "PostHocCreateReferrerDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/NewReferrer"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocCreateReferrerDetail", "type": "object"}, "PostHocCreateReferrerInstitutionDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/NewReferrerInstitution"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocCreateReferrerInstitutionDetail", "type": "object"}, "PostHocDescriptionDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/DescriptionResult"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocDescriptionDetail", "type": "object"}, "PostHocEmailDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/EmailDraft"}], "title": "Proposal"}, "signature_managed": {"default": false, "title": "Signature Managed", "type": "boolean"}, "attachments": {"default": [], "items": {"$ref": "#/components/schemas/SentEmailAttachment"}, "title": "Attachments", "type": "array"}, "is_sent": {"default": false, "title": "Is Sent", "type": "boolean"}, "sent_at": {"format": "date-time", "type": "string", "nullable": true, "title": "Sent At"}, "sent_email": {"allOf": [{"$ref": "#/components/schemas/SentFollowUpEmail"}], "nullable": true}}, "required": ["id", "status", "started_at"], "title": "PostHocEmailDetail", "type": "object"}, "PostHocGenerateCarePlanDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/NewCarePlan"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocGenerateCarePlanDetail", "type": "object"}, "PostHocProcessing": {"properties": {"overall_status": {"anyOf": [{"$ref": "#/components/schemas/ProcessingStatus"}, {"type": "string"}], "title": "Overall Status"}, "actions": {"$ref": "#/components/schemas/PostHocActions"}}, "required": ["overall_status", "actions"], "title": "PostHocProcessing", "type": "object"}, "PostHocSummaryDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/SummaryResult"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocSummaryDetail", "type": "object"}, "PostHocUpdateCarePlanDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/UpdateCarePlan"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocUpdateCarePlanDetail", "type": "object"}, "PostHocUpdateContactDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/UpdateContactProposal"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocUpdateContactDetail", "type": "object"}, "PostHocUpdatePatientDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/UpdatePatientProposal"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocUpdatePatientDetail", "type": "object"}, "PostHocUpdateReferrerDetail": {"properties": {"id": {"title": "Id", "type": "integer"}, "status": {"anyOf": [{"$ref": "#/components/schemas/PostHocActionStatus"}, {"type": "string"}], "title": "Status"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "finished_at": {"format": "date-time", "title": "Finished At", "type": "string"}, "blocked_on_action_ids": {"items": {"type": "integer"}, "title": "Blocked On Action Ids", "type": "array"}, "result": {"title": "Result", "type": "integer"}, "display_title": {"default": "", "description": "AI-generated conversational headline for the suggestion, e.g. \"Add John as a client\". Empty on actions proposed before generated copy shipped and on internal enrichment actions \u2014 fall back to the action type label.", "title": "Display Title", "type": "string"}, "display_reason": {"default": "", "description": "AI-generated one-line reason grounded in the conversation, e.g. \"He mentioned he moved to Ridgewood Rd last month.\" Empty on actions proposed before generated copy shipped and on internal enrichment actions.", "title": "Display Reason", "type": "string"}, "proposal": {"allOf": [{"$ref": "#/components/schemas/UpdateReferrerProposal"}], "title": "Proposal"}}, "required": ["id", "status", "started_at"], "title": "PostHocUpdateReferrerDetail", "type": "object"}, "ProcessingStatus": {"enum": ["pending", "initializing", "processing", "complete", "failed"], "title": "ProcessingStatus", "type": "string"}, "RecordingDetailsResponse": {"description": "Detailed recording information including processing status.", "properties": {"id": {"title": "Id", "type": "integer"}, "audio_file_url": {"title": "Audio File Url", "type": "string"}, "duration_seconds": {"title": "Duration Seconds", "type": "integer"}, "patient_id": {"title": "Patient Id", "type": "integer"}, "contact_id": {"title": "Contact Id", "type": "integer"}, "uploaded_by_id": {"title": "Uploaded By Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "summary": {"title": "Summary", "type": "string"}, "description": {"title": "Description", "type": "string"}, "patient": {"allOf": [{"$ref": "#/components/schemas/Subject"}], "title": "Patient"}, "contact": {"allOf": [{"$ref": "#/components/schemas/Subject"}], "title": "Contact"}, "uploaded_by": {"allOf": [{"$ref": "#/components/schemas/Subject"}], "title": "Uploaded By"}, "post_recording_processing": {"$ref": "#/components/schemas/PostHocProcessing"}, "has_transcript": {"title": "Has Transcript", "type": "boolean"}}, "required": ["id", "audio_file_url", "duration_seconds", "organization_id", "created_at", "updated_at", "post_recording_processing", "has_transcript"], "title": "RecordingDetailsResponse", "type": "object"}, "SentEmailAttachment": {"description": "Metadata for a file that went out with a sent follow-up email.\n\n`download_url` is a path on this API; it is absent when the provider\nidentifiers are missing and the file can never be streamed back.", "properties": {"id": {"title": "Id", "type": "integer"}, "filename": {"title": "Filename", "type": "string"}, "content_type": {"title": "Content Type", "type": "string"}, "size_bytes": {"title": "Size Bytes", "type": "integer"}, "size_label": {"title": "Size Label", "type": "string"}, "type_label": {"title": "Type Label", "type": "string"}, "icon": {"title": "Icon", "type": "string"}, "unavailable": {"title": "Unavailable", "type": "boolean"}, "download_url": {"title": "Download Url", "type": "string"}}, "required": ["id", "filename", "content_type", "size_bytes", "size_label", "type_label", "icon", "unavailable"], "title": "SentEmailAttachment", "type": "object"}, "SentFollowUpEmail": {"description": "The latest email that Sage sent for a follow-up action.", "properties": {"subject": {"title": "Subject", "type": "string"}, "body": {"title": "Body", "type": "string"}, "body_html": {"title": "Body Html", "type": "string"}, "to": {"type": "string", "nullable": true, "title": "To"}, "cc": {"type": "string", "nullable": true, "title": "Cc"}, "bcc": {"type": "string", "nullable": true, "title": "Bcc"}, "sent_at": {"format": "date-time", "title": "Sent At", "type": "string"}, "provider_label": {"title": "Provider Label", "type": "string"}, "attachments": {"items": {"$ref": "#/components/schemas/SentEmailAttachment"}, "title": "Attachments", "type": "array"}}, "required": ["subject", "body", "sent_at", "provider_label", "attachments"], "title": "SentFollowUpEmail", "type": "object"}, "Subject": {"properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}}, "required": ["id", "name"], "title": "Subject", "type": "object"}, "SummaryResult": {"properties": {"summary": {"title": "Summary", "type": "string"}}, "required": ["summary"], "title": "SummaryResult", "type": "object"}, "UpdateContactProposal": {"description": "Stored UPDATE_CONTACT post hoc action proposal: partial contact changes plus a\nreference to the contact they apply to.", "properties": {"post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "maxItems": 1, "title": "Emails", "type": "array"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "description": {"title": "Description", "type": "string"}, "contact_id": {"title": "Contact Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "integer"}}, "required": ["contact_id"], "title": "UpdateContactProposal", "type": "object"}, "UpdatePatientProposal": {"description": "Stored UPDATE_PATIENT post hoc action proposal: partial patient changes plus a\nreference to the patient they apply to.", "properties": {"post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}, "first_name": {"title": "First Name", "type": "string"}, "last_name": {"title": "Last Name", "type": "string"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "maxItems": 1, "title": "Emails", "type": "array"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "gender": {"allOf": [{"$ref": "#/components/schemas/Gender"}], "title": "Gender"}, "birth_date": {"format": "date", "title": "Birth Date", "type": "string"}, "status": {"allOf": [{"$ref": "#/components/schemas/PatientStatus"}], "title": "Status"}, "description": {"title": "Description", "type": "string"}, "patient_id": {"title": "Patient Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "integer"}}, "required": ["patient_id"], "title": "UpdatePatientProposal", "type": "object"}, "UpdateReferrerProposal": {"description": "Stored UPDATE_REFERRER post hoc action proposal: partial referrer changes plus a\nreference to the referrer they apply to.", "properties": {"first_name": {"type": "string", "nullable": true, "title": "First Name"}, "last_name": {"type": "string", "nullable": true, "title": "Last Name"}, "description": {"type": "string", "nullable": true, "title": "Description"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "type": "array", "nullable": true, "title": "Emails"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "type": "array", "nullable": true, "title": "Phone Numbers"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "type": "array", "nullable": true, "title": "Addresses"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}, "referrer_id": {"title": "Referrer Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "integer"}}, "required": ["referrer_id"], "title": "UpdateReferrerProposal", "type": "object"}, "RecordingTranscriptFragmentSchema": {"description": "Individual transcript fragment with speaker.", "properties": {"id": {"title": "Id", "type": "integer"}, "content": {"title": "Content", "type": "string"}, "speaker_id": {"title": "Speaker Id", "type": "integer"}}, "required": ["id", "content", "speaker_id"], "title": "RecordingTranscriptFragmentSchema", "type": "object"}, "RecordingTranscriptResponse": {"description": "Complete transcript response for a recording.", "properties": {"recording_id": {"title": "Recording Id", "type": "integer"}, "fragments": {"items": {"$ref": "#/components/schemas/RecordingTranscriptFragmentSchema"}, "title": "Fragments", "type": "array"}, "total_count": {"title": "Total Count", "type": "integer"}}, "required": ["recording_id", "fragments", "total_count"], "title": "RecordingTranscriptResponse", "type": "object"}, "ErrorResponse": {"properties": {"message": {"title": "Message", "type": "string"}}, "required": ["message"], "title": "ErrorResponse", "type": "object"}, "AccessTokenResponse": {"properties": {"access_token": {"title": "Access Token", "type": "string"}, "identity": {"title": "Identity", "type": "string"}, "expires_at": {"format": "date-time", "title": "Expires At", "type": "string"}}, "required": ["access_token", "identity", "expires_at"], "title": "AccessTokenResponse", "type": "object"}, "CallDetailsResponse": {"properties": {"twilio_sid": {"title": "Twilio Sid", "type": "string"}, "direction": {"anyOf": [{"$ref": "#/components/schemas/CallDirection"}, {"type": "string"}], "title": "Direction"}, "disposition": {"anyOf": [{"$ref": "#/components/schemas/CallDisposition"}, {"type": "string"}], "title": "Disposition"}, "summary": {"title": "Summary", "type": "string"}, "total_duration": {"title": "Total Duration", "type": "integer"}, "conversation_duration": {"title": "Conversation Duration", "type": "integer"}, "recording_duration": {"title": "Recording Duration", "type": "integer"}, "from_participant": {"$ref": "#/components/schemas/CallParticipant"}, "to_participant": {"$ref": "#/components/schemas/CallParticipant"}, "placed_at": {"format": "date-time", "title": "Placed At", "type": "string"}, "twilio_transcript_sid": {"title": "Twilio Transcript Sid", "type": "string"}, "twilio_recording_sid": {"title": "Twilio Recording Sid", "type": "string"}, "post_call_processing": {"$ref": "#/components/schemas/PostHocProcessing"}, "activity_id": {"title": "Activity Id", "type": "integer"}}, "required": ["twilio_sid", "direction", "from_participant", "to_participant", "placed_at", "post_call_processing", "activity_id"], "title": "CallDetailsResponse", "type": "object"}, "CallDirection": {"enum": ["inbound", "outbound"], "type": "string"}, "CallDisposition": {"enum": ["completed", "busy", "no-answer", "failed", "canceled", "voicemail", "voiceagent"], "title": "CallDisposition", "type": "string"}, "CallParticipant": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "subject_type": {"anyOf": [{"$ref": "#/components/schemas/SubjectType"}, {"type": "string"}], "title": "Subject Type"}, "subject": {"allOf": [{"$ref": "#/components/schemas/Subject"}], "title": "Subject"}}, "required": ["phone_number"], "title": "CallParticipant", "type": "object"}, "SubjectType": {"enum": ["patient", "contact", "user", "referrer", "referrer_institution", "organization"], "title": "SubjectType", "type": "string"}, "CallTranscriptResponse": {"properties": {"call_sid": {"title": "Call Sid", "type": "string"}, "fragments": {"items": {"$ref": "#/components/schemas/TranscriptFragmentSchema"}, "title": "Fragments", "type": "array"}, "total_count": {"title": "Total Count", "type": "integer"}}, "required": ["call_sid", "fragments", "total_count"], "title": "CallTranscriptResponse", "type": "object"}, "TranscriptFragmentSchema": {"properties": {"id": {"title": "Id", "type": "integer"}, "content": {"title": "Content", "type": "string"}, "speaker": {"title": "Speaker", "type": "string"}}, "required": ["id", "content", "speaker"], "title": "TranscriptFragmentSchema", "type": "object"}, "CallHistory": {"properties": {"calls": {"items": {"$ref": "#/components/schemas/CallHistoryItem"}, "title": "Calls", "type": "array"}}, "required": ["calls"], "title": "CallHistory", "type": "object"}, "CallHistoryItem": {"properties": {"twilio_sid": {"title": "Twilio Sid", "type": "string"}, "direction": {"anyOf": [{"$ref": "#/components/schemas/CallDirection"}, {"type": "string"}], "title": "Direction"}, "disposition": {"anyOf": [{"$ref": "#/components/schemas/CallDisposition"}, {"type": "string"}], "title": "Disposition"}, "summary": {"title": "Summary", "type": "string"}, "total_duration": {"title": "Total Duration", "type": "integer"}, "conversation_duration": {"title": "Conversation Duration", "type": "integer"}, "recording_duration": {"title": "Recording Duration", "type": "integer"}, "from_participant": {"$ref": "#/components/schemas/CallParticipant"}, "to_participant": {"$ref": "#/components/schemas/CallParticipant"}, "placed_at": {"format": "date-time", "title": "Placed At", "type": "string"}}, "required": ["twilio_sid", "direction", "from_participant", "to_participant", "placed_at"], "title": "CallHistoryItem", "type": "object"}, "CallAvailability": {"properties": {"is_taking_calls": {"title": "Is Taking Calls", "type": "boolean"}, "availabilities": {"items": {"$ref": "#/components/schemas/CallAvailabilityItem"}, "title": "Availabilities", "type": "array"}, "available_outbound": {"items": {"$ref": "#/components/schemas/OutboundPhoneNumberSchema"}, "title": "Available Outbound", "type": "array"}, "default_outbound": {"allOf": [{"$ref": "#/components/schemas/PhoneNumberSchema"}], "title": "Default Outbound"}}, "required": ["is_taking_calls", "availabilities", "available_outbound"], "title": "CallAvailability", "type": "object"}, "CallAvailabilityItem": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "type": {"anyOf": [{"$ref": "#/components/schemas/PhoneNumberType"}, {"type": "string"}], "title": "Type"}, "line_name": {"title": "Line Name", "type": "string"}, "is_available": {"title": "Is Available", "type": "boolean"}, "phone_number_display": {"description": "Phone number formatted for display (NATIONAL format).", "readOnly": true, "title": "Phone Number Display", "type": "string"}}, "required": ["phone_number", "is_active", "type", "line_name", "is_available", "phone_number_display"], "title": "CallAvailabilityItem", "type": "object"}, "OutboundPhoneNumberSchema": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "type": {"anyOf": [{"$ref": "#/components/schemas/PhoneNumberType"}, {"type": "string"}], "title": "Type"}, "line_name": {"title": "Line Name", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "last_used_at": {"format": "date-time", "title": "Last Used At", "type": "string"}, "phone_number_display": {"description": "Phone number formatted for display (NATIONAL format).", "readOnly": true, "title": "Phone Number Display", "type": "string"}}, "required": ["phone_number", "is_active", "type", "line_name", "created_at", "phone_number_display"], "title": "OutboundPhoneNumberSchema", "type": "object"}, "PhoneNumberSchema": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "type": {"anyOf": [{"$ref": "#/components/schemas/PhoneNumberType"}, {"type": "string"}], "title": "Type"}, "line_name": {"title": "Line Name", "type": "string"}, "phone_number_display": {"description": "Phone number formatted for display (NATIONAL format).", "readOnly": true, "title": "Phone Number Display", "type": "string"}}, "required": ["phone_number", "is_active", "type", "line_name", "phone_number_display"], "title": "PhoneNumberSchema", "type": "object"}, "PhoneNumberType": {"enum": ["HOSTED", "VERIFIED"], "title": "PhoneNumberType", "type": "string"}, "CallAvailabilityUpdate": {"properties": {"availabilities": {"items": {"$ref": "#/components/schemas/CallAvailabilityUpdateItem"}, "title": "Availabilities", "type": "array"}}, "required": ["availabilities"], "title": "CallAvailabilityUpdate", "type": "object"}, "CallAvailabilityUpdateItem": {"properties": {"phone_number": {"title": "Phone Number", "type": "string"}, "is_available": {"title": "Is Available", "type": "boolean"}}, "required": ["phone_number", "is_available"], "title": "CallAvailabilityUpdateItem", "type": "object"}, "GlobalCallAvailabilityUpdate": {"properties": {"is_taking_calls": {"title": "Is Taking Calls", "type": "boolean"}}, "required": ["is_taking_calls"], "title": "GlobalCallAvailabilityUpdate", "type": "object"}, "ActivityType": {"enum": ["call", "recording", "email_referral", "email_thread"], "title": "ActivityType", "type": "string"}, "InboxQueryParams": {"properties": {"limit": {"ge": 1, "le": 200, "title": "Limit", "type": "integer"}, "activity_types": {"default": [], "items": {"enum": ["call", "recording", "email_referral", "email_thread"], "title": "ActivityType", "type": "string"}, "title": "Activity Types", "type": "array"}}, "title": "InboxQueryParams", "type": "object"}, "Inbox": {"properties": {"items": {"items": {"$ref": "#/components/schemas/InboxItem"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "Inbox", "type": "object"}, "InboxCallItem": {"properties": {"item_type": {"const": "call", "title": "Item Type", "type": "string"}, "twilio_sid": {"title": "Twilio Sid", "type": "string"}, "direction": {"anyOf": [{"$ref": "#/components/schemas/CallDirection"}, {"type": "string"}], "title": "Direction"}, "disposition": {"anyOf": [{"$ref": "#/components/schemas/CallDisposition"}, {"type": "string"}], "title": "Disposition"}, "summary": {"title": "Summary", "type": "string"}, "from_participant": {"$ref": "#/components/schemas/CallParticipant"}, "to_participant": {"$ref": "#/components/schemas/CallParticipant"}, "placed_at": {"format": "date-time", "title": "Placed At", "type": "string"}}, "required": ["item_type", "twilio_sid", "direction", "from_participant", "to_participant", "placed_at"], "title": "InboxCallItem", "type": "object"}, "InboxEmailReferralItem": {"properties": {"item_type": {"const": "email_referral", "title": "Item Type", "type": "string"}, "activity_id": {"title": "Activity Id", "type": "integer"}, "source": {"title": "Source", "type": "string"}, "description": {"title": "Description", "type": "string"}, "patient": {"$ref": "#/components/schemas/Subject"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["item_type", "activity_id", "source", "description", "patient", "created_at"], "title": "InboxEmailReferralItem", "type": "object"}, "InboxItem": {"properties": {"content": {"discriminator": {"mapping": {"call": "#/components/schemas/InboxCallItem", "email_referral": "#/components/schemas/InboxEmailReferralItem", "recording": "#/components/schemas/InboxRecordingItem"}, "propertyName": "item_type"}, "oneOf": [{"$ref": "#/components/schemas/InboxCallItem"}, {"$ref": "#/components/schemas/InboxRecordingItem"}, {"$ref": "#/components/schemas/InboxEmailReferralItem"}], "title": "Content"}}, "required": ["content"], "title": "InboxItem", "type": "object"}, "InboxRecordingItem": {"properties": {"item_type": {"const": "recording", "title": "Item Type", "type": "string"}, "id": {"title": "Id", "type": "integer"}, "duration_seconds": {"title": "Duration Seconds", "type": "integer"}, "participants": {"items": {"$ref": "#/components/schemas/RecordingAssociation"}, "title": "Participants", "type": "array"}, "uploaded_by": {"allOf": [{"$ref": "#/components/schemas/Subject"}], "title": "Uploaded By"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "summary": {"title": "Summary", "type": "string"}, "description": {"title": "Description", "type": "string"}}, "required": ["item_type", "id", "duration_seconds", "participants", "created_at"], "title": "InboxRecordingItem", "type": "object"}, "RecordingAssociation": {"description": "Represents a person associated with a recording.", "properties": {"subject_type": {"anyOf": [{"enum": ["patient", "contact", "user"], "type": "string"}, {"type": "string"}], "title": "Subject Type"}, "subject": {"$ref": "#/components/schemas/Subject"}}, "required": ["subject_type", "subject"], "title": "RecordingAssociation", "type": "object"}, "DeviceTokenInput": {"properties": {"token": {"title": "Token", "type": "string"}}, "required": ["token"], "title": "DeviceTokenInput", "type": "object"}, "EmailReferralDetailResponse": {"properties": {"activity_id": {"title": "Activity Id", "type": "integer"}, "source": {"title": "Source", "type": "string"}, "description": {"title": "Description", "type": "string"}, "summary": {"title": "Summary", "type": "string"}, "patient": {"$ref": "#/components/schemas/Subject"}, "contact": {"allOf": [{"$ref": "#/components/schemas/Subject"}], "title": "Contact"}, "caller_phone": {"title": "Caller Phone", "type": "string"}, "post_hoc_processing_status": {"title": "Post Hoc Processing Status", "type": "string"}, "post_hoc_actions": {"items": {"$ref": "#/components/schemas/EmailReferralPostHocAction"}, "title": "Post Hoc Actions", "type": "array"}, "email_html": {"title": "Email Html", "type": "string"}}, "required": ["activity_id", "source", "description", "summary", "patient", "post_hoc_actions"], "title": "EmailReferralDetailResponse", "type": "object"}, "EmailReferralPostHocAction": {"properties": {"id": {"title": "Id", "type": "integer"}, "task_type": {"title": "Task Type", "type": "string"}, "status": {"title": "Status", "type": "string"}, "result": {"title": "Result", "type": "integer"}}, "required": ["id", "task_type", "status"], "title": "EmailReferralPostHocAction", "type": "object"}, "AddressDetail": {"properties": {"address_type": {"anyOf": [{"$ref": "#/components/schemas/AddressType"}, {"type": "string"}], "title": "Address Type"}, "address_type_display": {"title": "Address Type Display", "type": "string"}, "address_line1": {"default": "", "title": "Address Line1", "type": "string"}, "address_line2": {"default": "", "title": "Address Line2", "type": "string"}, "city": {"default": "", "title": "City", "type": "string"}, "state": {"anyOf": [{"$ref": "#/components/schemas/USState", "description": "US state 2-letter abbreviation code", "title": "US state"}, {"type": "string"}], "default": "", "title": "State"}, "state_display": {"type": "string", "nullable": true, "title": "State Display"}, "zip_code": {"anyOf": [{"description": "US Postal Service ZIP code (5 digit format or ZIP+4 format)", "pattern": "^(\\d{5})(\\-\\d{4})?$", "title": "US postal ZIP code", "type": "string"}, {"type": "string"}], "default": "", "title": "Zip Code"}}, "required": ["address_type", "address_type_display"], "title": "AddressDetail", "type": "object"}, "PhoneNumberDetail": {"properties": {"phone_type": {"anyOf": [{"$ref": "#/components/schemas/PhoneType"}, {"type": "string"}], "title": "Phone Type"}, "phone_type_display": {"type": "string", "nullable": true, "title": "Phone Type Display"}, "number": {"title": "Number", "type": "string"}}, "required": ["phone_type", "number"], "title": "PhoneNumberDetail", "type": "object"}, "ReferrerEmailSchema": {"properties": {"id": {"type": "integer", "nullable": true, "title": "ID"}, "address": {"description": "Email address.", "maxLength": 254, "title": "Address", "type": "string"}}, "required": ["address"], "title": "ReferrerEmailSchema", "type": "object"}, "ReferrerInstitutionAssociationSchema": {"properties": {"institution": {"$ref": "#/components/schemas/ReferrerInstitutionListSchema"}, "id": {"type": "integer", "nullable": true, "title": "ID"}, "role": {"maxLength": 200, "type": "string", "nullable": true, "description": "Referrer's role at this institution (e.g. 'Social Worker', 'Discharge Planner').", "title": "Role"}}, "required": ["institution"], "title": "ReferrerInstitutionAssociationSchema", "type": "object"}, "ReferrerInstitutionListSchema": {"properties": {"abbreviation": {"title": "Abbreviation", "type": "string"}, "id": {"type": "integer", "nullable": true, "title": "ID"}, "name": {"description": "Institution name.", "maxLength": 255, "title": "Name", "type": "string"}}, "required": ["abbreviation", "name"], "title": "ReferrerInstitutionListSchema", "type": "object"}, "ReferrerSchema": {"properties": {"abbreviation": {"type": "string", "nullable": true, "title": "Abbreviation"}, "sort_letter": {"type": "string", "nullable": true, "title": "Sort Letter"}, "addresses": {"default": [], "items": {"$ref": "#/components/schemas/AddressDetail"}, "title": "Addresses", "type": "array"}, "phone_numbers": {"default": [], "items": {"$ref": "#/components/schemas/PhoneNumberDetail"}, "title": "Phone Numbers", "type": "array"}, "emails": {"default": [], "items": {"$ref": "#/components/schemas/ReferrerEmailSchema"}, "title": "Emails", "type": "array"}, "source": {"title": "Source", "type": "string"}, "associations": {"default": [], "items": {"$ref": "#/components/schemas/ReferrerInstitutionAssociationSchema"}, "title": "Associations", "type": "array"}, "id": {"type": "integer", "nullable": true, "title": "ID"}, "first_name": {"description": "Referrer's first name.", "maxLength": 100, "title": "First Name", "type": "string"}, "last_name": {"description": "Referrer's last name.", "maxLength": 100, "title": "Last Name", "type": "string"}, "description": {"type": "string", "nullable": true, "default": "", "title": "Description"}, "last_synced_at": {"format": "date-time", "type": "string", "nullable": true, "description": "Last time data was synced from source system", "title": "Last Synced At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["source", "first_name", "last_name", "created_at", "updated_at"], "title": "ReferrerSchema", "type": "object"}, "UpdateReferrer": {"properties": {"first_name": {"type": "string", "nullable": true, "title": "First Name"}, "last_name": {"type": "string", "nullable": true, "title": "Last Name"}, "description": {"type": "string", "nullable": true, "title": "Description"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "type": "array", "nullable": true, "title": "Emails"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "type": "array", "nullable": true, "title": "Phone Numbers"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "type": "array", "nullable": true, "title": "Addresses"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}}, "title": "UpdateReferrer", "type": "object"}, "ReferrerAssociationSchema": {"properties": {"referrer": {"$ref": "#/components/schemas/ReferrerListSchema"}, "id": {"type": "integer", "nullable": true, "title": "ID"}, "role": {"maxLength": 200, "type": "string", "nullable": true, "description": "Referrer's role at this institution (e.g. 'Social Worker', 'Discharge Planner').", "title": "Role"}}, "required": ["referrer"], "title": "ReferrerAssociationSchema", "type": "object"}, "ReferrerInstitutionEmailSchema": {"properties": {"id": {"type": "integer", "nullable": true, "title": "ID"}, "address": {"description": "Email address.", "maxLength": 254, "title": "Address", "type": "string"}}, "required": ["address"], "title": "ReferrerInstitutionEmailSchema", "type": "object"}, "ReferrerInstitutionSchema": {"properties": {"abbreviation": {"type": "string", "nullable": true, "title": "Abbreviation"}, "sort_letter": {"type": "string", "nullable": true, "title": "Sort Letter"}, "addresses": {"default": [], "items": {"$ref": "#/components/schemas/AddressDetail"}, "title": "Addresses", "type": "array"}, "phone_numbers": {"default": [], "items": {"$ref": "#/components/schemas/PhoneNumberDetail"}, "title": "Phone Numbers", "type": "array"}, "emails": {"default": [], "items": {"$ref": "#/components/schemas/ReferrerInstitutionEmailSchema"}, "title": "Emails", "type": "array"}, "source": {"title": "Source", "type": "string"}, "members": {"default": [], "items": {"$ref": "#/components/schemas/ReferrerAssociationSchema"}, "title": "Members", "type": "array"}, "id": {"type": "integer", "nullable": true, "title": "ID"}, "name": {"description": "Institution name.", "maxLength": 255, "title": "Name", "type": "string"}, "url": {"type": "string", "nullable": true, "description": "Institution website URL.", "title": "Url"}, "description": {"type": "string", "nullable": true, "default": "", "title": "Description"}, "last_synced_at": {"format": "date-time", "type": "string", "nullable": true, "description": "Last time data was synced from source system", "title": "Last Synced At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["source", "name", "created_at", "updated_at"], "title": "ReferrerInstitutionSchema", "type": "object"}, "ReferrerListSchema": {"properties": {"abbreviation": {"type": "string", "nullable": true, "title": "Abbreviation"}, "sort_letter": {"type": "string", "nullable": true, "title": "Sort Letter"}, "id": {"type": "integer", "nullable": true, "title": "ID"}, "first_name": {"description": "Referrer's first name.", "maxLength": 100, "title": "First Name", "type": "string"}, "last_name": {"description": "Referrer's last name.", "maxLength": 100, "title": "Last Name", "type": "string"}}, "required": ["first_name", "last_name"], "title": "ReferrerListSchema", "type": "object"}, "UpdateReferrerInstitution": {"properties": {"name": {"type": "string", "nullable": true, "title": "Name"}, "url": {"type": "string", "nullable": true, "title": "Url"}, "description": {"type": "string", "nullable": true, "title": "Description"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "type": "array", "nullable": true, "title": "Emails"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "type": "array", "nullable": true, "title": "Phone Numbers"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "type": "array", "nullable": true, "title": "Addresses"}, "post_hoc_action_id": {"title": "Post Hoc Action Id", "type": "integer"}}, "title": "UpdateReferrerInstitution", "type": "object"}, "HitKind": {"enum": ["client", "contact", "referrer", "institution", "care-plan", "call", "recording", "email-referral"], "type": "string"}, "OmniSearchGroupSchema": {"properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "icon": {"title": "Icon", "type": "string"}, "hits": {"items": {"$ref": "#/components/schemas/OmniSearchHitSchema"}, "title": "Hits", "type": "array"}, "total": {"title": "Total", "type": "integer"}, "has_more": {"title": "Has More", "type": "boolean"}}, "required": ["key", "label", "icon", "hits", "total", "has_more"], "title": "OmniSearchGroupSchema", "type": "object"}, "OmniSearchHitSchema": {"properties": {"kind": {"anyOf": [{"$ref": "#/components/schemas/HitKind"}, {"type": "string"}], "title": "Kind"}, "id": {"title": "Id", "type": "integer"}, "url": {"title": "Url", "type": "string"}, "title_segments": {"items": {"$ref": "#/components/schemas/SegmentSchema"}, "title": "Title Segments", "type": "array"}, "subtitle_segments": {"items": {"$ref": "#/components/schemas/SegmentSchema"}, "title": "Subtitle Segments", "type": "array"}, "evidence_label": {"default": "", "title": "Evidence Label", "type": "string"}, "status": {"default": "", "title": "Status", "type": "string"}, "status_label": {"default": "", "title": "Status Label", "type": "string"}, "meta": {"default": "", "title": "Meta", "type": "string"}, "occurred_at": {"format": "date-time", "type": "string", "nullable": true, "title": "Occurred At"}, "call_sid": {"default": "", "title": "Call Sid", "type": "string"}, "activity_id": {"type": "integer", "nullable": true, "title": "Activity Id"}}, "required": ["kind", "id", "url", "title_segments", "subtitle_segments"], "title": "OmniSearchHitSchema", "type": "object"}, "OmniSearchResultsSchema": {"properties": {"query": {"title": "Query", "type": "string"}, "groups": {"items": {"$ref": "#/components/schemas/OmniSearchGroupSchema"}, "title": "Groups", "type": "array"}, "shown_count": {"title": "Shown Count", "type": "integer"}, "total_count": {"title": "Total Count", "type": "integer"}}, "required": ["query", "groups", "shown_count", "total_count"], "title": "OmniSearchResultsSchema", "type": "object"}, "SegmentSchema": {"properties": {"text": {"title": "Text", "type": "string"}, "is_match": {"title": "Is Match", "type": "boolean"}}, "required": ["text", "is_match"], "title": "SegmentSchema", "type": "object"}, "DuplicateSuggestion": {"properties": {"record": {"$ref": "#/components/schemas/DuplicateSuggestionRecord"}, "strength": {"$ref": "#/components/schemas/DuplicateSuggestionStrength"}, "reasons": {"items": {"$ref": "#/components/schemas/DuplicateSuggestionReason"}, "title": "Reasons", "type": "array"}, "explanation": {"default": "", "title": "Explanation", "type": "string"}}, "required": ["record", "strength", "reasons"], "title": "DuplicateSuggestion", "type": "object"}, "DuplicateSuggestionGenerator": {"enum": ["rules", "ai"], "type": "string"}, "DuplicateSuggestionReason": {"properties": {"label": {"title": "Label", "type": "string"}, "input_value": {"default": "", "title": "Input Value", "type": "string"}, "matched_value": {"default": "", "title": "Matched Value", "type": "string"}}, "required": ["label"], "title": "DuplicateSuggestionReason", "type": "object"}, "DuplicateSuggestionRecord": {"properties": {"kind": {"$ref": "#/components/schemas/EntityKind"}, "id": {"title": "Id", "type": "integer"}, "display_name": {"title": "Display Name", "type": "string"}, "url": {"title": "Url", "type": "string"}, "subtitle": {"default": "", "title": "Subtitle", "type": "string"}}, "required": ["kind", "id", "display_name", "url"], "title": "DuplicateSuggestionRecord", "type": "object"}, "DuplicateSuggestionStrength": {"enum": ["exact", "strong", "possible"], "type": "string"}, "DuplicateSuggestionSubject": {"properties": {"kind": {"$ref": "#/components/schemas/EntityKind"}, "first_name": {"default": "", "title": "First Name", "type": "string"}, "last_name": {"default": "", "title": "Last Name", "type": "string"}, "name": {"default": "", "title": "Name", "type": "string"}, "emails": {"items": {"$ref": "#/components/schemas/Email"}, "title": "Emails", "type": "array"}, "phone_numbers": {"items": {"$ref": "#/components/schemas/PhoneNumber"}, "title": "Phone Numbers", "type": "array"}, "addresses": {"items": {"$ref": "#/components/schemas/Address"}, "title": "Addresses", "type": "array"}, "birth_date": {"format": "date", "type": "string", "nullable": true, "title": "Birth Date"}}, "required": ["kind"], "title": "DuplicateSuggestionSubject", "type": "object"}, "DuplicateSuggestionsResponse": {"properties": {"subject": {"$ref": "#/components/schemas/DuplicateSuggestionSubject"}, "generated_by": {"$ref": "#/components/schemas/DuplicateSuggestionGenerator"}, "suggestions": {"items": {"$ref": "#/components/schemas/DuplicateSuggestion"}, "title": "Suggestions", "type": "array"}, "total": {"title": "Total", "type": "integer"}}, "required": ["subject", "generated_by", "suggestions", "total"], "title": "DuplicateSuggestionsResponse", "type": "object"}, "DuplicateSuggestionsRequest": {"properties": {"subject": {"$ref": "#/components/schemas/DuplicateSuggestionSubject"}, "limit": {"default": 5, "maximum": 10, "minimum": 1, "title": "Limit", "type": "integer"}}, "required": ["subject"], "title": "DuplicateSuggestionsRequest", "type": "object"}, "NylasMessageObject": {"properties": {"id": {"title": "Id", "type": "string"}, "grant_id": {"title": "Grant Id", "type": "string"}}, "required": ["id", "grant_id"], "title": "NylasMessageObject", "type": "object"}, "NylasWebhookData": {"properties": {"object": {"$ref": "#/components/schemas/NylasMessageObject"}}, "required": ["object"], "title": "NylasWebhookData", "type": "object"}, "NylasWebhookPayload": {"properties": {"data": {"$ref": "#/components/schemas/NylasWebhookData"}}, "required": ["data"], "title": "NylasWebhookPayload", "type": "object"}, "TwilioVoiceStatusCallback": {"properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ParentCallSid": {"title": "Parentcallsid", "type": "string"}, "CallDuration": {"title": "Callduration", "type": "integer"}, "DialCallDuration": {"title": "Dialcallduration", "type": "integer"}, "RecordingDuration": {"title": "Recordingduration", "type": "integer"}, "RecordingSid": {"title": "Recordingsid", "type": "string"}, "RecordingUrl": {"title": "Recordingurl", "type": "string"}, "DialCallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Dialcallstatus", "type": "string"}, "DialBridged": {"enum": ["true", "false"], "title": "Dialbridged", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"], "title": "TwilioVoiceStatusCallback", "type": "object"}, "TranscriptionContent": {"properties": {"AccountSid": {"title": "Accountsid", "type": "string"}, "CallSid": {"title": "Callsid", "type": "string"}, "TranscriptionSid": {"title": "Transcriptionsid", "type": "string"}, "Timestamp": {"format": "date-time", "title": "Timestamp", "type": "string"}, "SequenceId": {"title": "Sequenceid", "type": "integer"}, "TranscriptionEvent": {"enum": ["transcription-started", "transcription-content", "transcription-stopped", "transcription-error"], "title": "Transcriptionevent", "type": "string"}, "TranscriptionError": {"title": "Transcriptionerror", "type": "string"}, "TranscriptionErrorCode": {"title": "Transcriptionerrorcode", "type": "string"}, "TranscriptionEngine": {"title": "Transcriptionengine", "type": "string"}, "PartialResults": {"title": "Partialresults", "type": "boolean"}, "Final": {"title": "Final", "type": "boolean"}, "InboundTrackLabel": {"title": "Inboundtracklabel", "type": "string"}, "OutboundTrackLabel": {"title": "Outboundtracklabel", "type": "string"}, "Track": {"enum": ["inbound_track", "outbound_track", "both_tracks"], "title": "Track", "type": "string"}, "TranscriptionData": {"title": "Transcriptiondata", "type": "string"}}, "required": ["AccountSid", "CallSid", "TranscriptionSid", "Timestamp", "SequenceId", "TranscriptionEvent"], "title": "TranscriptionContent", "type": "object"}, "TwilioVoiceRequest": {"properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction"], "title": "TwilioVoiceRequest", "type": "object"}, "TwilioFailureRequest": {"properties": {"CallSid": {"title": "Callsid", "type": "string"}, "AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "CallStatus": {"enum": ["queued", "ringing", "in-progress", "completed", "busy", "failed", "no-answer", "canceled"], "title": "Callstatus", "type": "string"}, "ApiVersion": {"title": "Apiversion", "type": "string"}, "Direction": {"enum": ["inbound", "outbound-api", "outbound-dial"], "title": "Direction", "type": "string"}, "Caller": {"title": "Caller", "type": "string"}, "ErrorCode": {"title": "Errorcode", "type": "string"}, "ErrorUrl": {"title": "Errorurl", "type": "string"}}, "required": ["CallSid", "AccountSid", "From", "To", "CallStatus", "ApiVersion", "Direction", "ErrorCode", "ErrorUrl"], "title": "TwilioFailureRequest", "type": "object"}, "OutgoingCallerIdVerificationStatus": {"properties": {"AccountSid": {"title": "Accountsid", "type": "string"}, "From": {"title": "From", "type": "string"}, "To": {"title": "To", "type": "string"}, "VerificationStatus": {"title": "Verificationstatus", "type": "string"}, "OutgoingCallerIdSid": {"title": "Outgoingcalleridsid", "type": "string"}}, "required": ["AccountSid", "From", "To", "VerificationStatus"], "title": "OutgoingCallerIdVerificationStatus", "type": "object"}, "TwilioDebuggerEvent": {"description": "A single error or warning, POSTed as a form body the moment Twilio records it.\n\nEnabling \"Include errors and warnings from my subaccounts\" on the parent account's debugger\nsettings routes every subaccount's events here, which is why `ParentAccountSid` is populated\nand `AccountSid` names the subaccount that produced the event.\n\nvia https://www.twilio.com/docs/usage/troubleshooting/debugging-event-webhooks", "properties": {"AccountSid": {"title": "Accountsid", "type": "string"}, "Level": {"anyOf": [{"enum": ["error", "warning"], "type": "string"}, {"type": "string"}], "default": "", "title": "Level"}, "ParentAccountSid": {"default": "", "title": "Parentaccountsid", "type": "string"}, "Sid": {"default": "", "title": "Sid", "type": "string"}, "PayloadType": {"default": "", "title": "Payloadtype", "type": "string"}, "Timestamp": {"default": "", "title": "Timestamp", "type": "string"}, "Payload": {"default": "", "title": "Payload", "type": "string"}}, "required": ["AccountSid"], "title": "TwilioDebuggerEvent", "type": "object"}, "CallStatus": {"enum": ["registered", "not_connected", "ongoing", "ended", "error"], "type": "string"}, "EventValue": {"enum": ["call_started", "call_ended", "call_analyzed"], "type": "string"}, "PhoneCall": {"properties": {"call_id": {"title": "Call Id", "type": "string"}, "agent_id": {"title": "Agent Id", "type": "string"}, "agent_version": {"title": "Agent Version", "type": "integer"}, "call_status": {"$ref": "#/components/schemas/CallStatus"}, "agent_name": {"type": "string", "nullable": true, "title": "Agent Name"}, "metadata": {"additionalProperties": true, "type": "object", "nullable": true, "title": "Metadata"}, "retell_llm_dynamic_variables": {"additionalProperties": true, "type": "object", "nullable": true, "title": "Retell Llm Dynamic Variables"}, "collected_dynamic_variables": {"additionalProperties": true, "type": "object", "nullable": true, "title": "Collected Dynamic Variables"}, "duration_ms": {"type": "integer", "nullable": true, "title": "Duration Ms"}, "disconnection_reason": {"type": "string", "nullable": true, "title": "Disconnection Reason"}, "call_type": {"const": "phone_call", "title": "Call Type", "type": "string"}, "from_number": {"title": "From Number", "type": "string"}, "to_number": {"title": "To Number", "type": "string"}, "direction": {"$ref": "#/components/schemas/CallDirection"}, "telephony_identifier": {"allOf": [{"$ref": "#/components/schemas/TelephonyIdentifier"}], "nullable": true}}, "required": ["call_id", "agent_id", "agent_version", "call_status", "call_type", "from_number", "to_number", "direction"], "title": "PhoneCall", "type": "object"}, "RetellEvent": {"properties": {"event": {"$ref": "#/components/schemas/EventValue"}, "call": {"discriminator": {"mapping": {"phone_call": "#/components/schemas/PhoneCall", "web_call": "#/components/schemas/WebCall"}, "propertyName": "call_type"}, "oneOf": [{"$ref": "#/components/schemas/WebCall"}, {"$ref": "#/components/schemas/PhoneCall"}], "title": "Call"}}, "required": ["event", "call"], "title": "RetellEvent", "type": "object"}, "TelephonyIdentifier": {"properties": {"twilio_call_sid": {"type": "string", "nullable": true, "title": "Twilio Call Sid"}}, "title": "TelephonyIdentifier", "type": "object"}, "WebCall": {"properties": {"call_id": {"title": "Call Id", "type": "string"}, "agent_id": {"title": "Agent Id", "type": "string"}, "agent_version": {"title": "Agent Version", "type": "integer"}, "call_status": {"$ref": "#/components/schemas/CallStatus"}, "agent_name": {"type": "string", "nullable": true, "title": "Agent Name"}, "metadata": {"additionalProperties": true, "type": "object", "nullable": true, "title": "Metadata"}, "retell_llm_dynamic_variables": {"additionalProperties": true, "type": "object", "nullable": true, "title": "Retell Llm Dynamic Variables"}, "collected_dynamic_variables": {"additionalProperties": true, "type": "object", "nullable": true, "title": "Collected Dynamic Variables"}, "duration_ms": {"type": "integer", "nullable": true, "title": "Duration Ms"}, "disconnection_reason": {"type": "string", "nullable": true, "title": "Disconnection Reason"}, "call_type": {"const": "web_call", "title": "Call Type", "type": "string"}, "access_token": {"title": "Access Token", "type": "string"}}, "required": ["call_id", "agent_id", "agent_version", "call_status", "call_type", "access_token"], "title": "WebCall", "type": "object"}, "InboundEmailPayload": {"properties": {"to": {"title": "To", "type": "string"}, "envelope": {"default": "", "title": "Envelope", "type": "string"}, "subject": {"default": "", "title": "Subject", "type": "string"}, "text": {"default": "", "title": "Text", "type": "string"}, "html": {"default": "", "title": "Html", "type": "string"}}, "required": ["to"], "title": "InboundEmailPayload", "type": "object"}, "RCParty": {"properties": {"accountId": {"title": "Accountid", "type": "string"}, "extensionId": {"type": "string", "nullable": true, "title": "Extensionid"}, "id": {"title": "Id", "type": "string"}, "direction": {"enum": ["Inbound", "Outbound"], "title": "Direction", "type": "string"}, "to": {"$ref": "#/components/schemas/RCPartyEndpoint"}, "from": {"$ref": "#/components/schemas/RCPartyEndpoint"}, "status": {"$ref": "#/components/schemas/RCPartyStatus"}}, "required": ["accountId", "id", "direction", "to", "from", "status"], "title": "RCParty", "type": "object"}, "RCPartyEndpoint": {"properties": {"phoneNumber": {"title": "Phonenumber", "type": "string"}, "name": {"type": "string", "nullable": true, "title": "Name"}, "extensionId": {"type": "string", "nullable": true, "title": "Extensionid"}}, "required": ["phoneNumber"], "title": "RCPartyEndpoint", "type": "object"}, "RCPartyStatus": {"properties": {"code": {"title": "Code", "type": "string"}, "rcc": {"default": false, "title": "Rcc", "type": "boolean"}, "reason": {"type": "string", "nullable": true, "title": "Reason"}, "peerId": {"allOf": [{"$ref": "#/components/schemas/RCPeerId"}], "nullable": true}}, "required": ["code"], "title": "RCPartyStatus", "type": "object"}, "RCPeerId": {"properties": {"partyId": {"title": "Partyid", "type": "string"}, "sessionId": {"title": "Sessionid", "type": "string"}, "telephonySessionId": {"title": "Telephonysessionid", "type": "string"}}, "required": ["partyId", "sessionId", "telephonySessionId"], "title": "RCPeerId", "type": "object"}, "RCTelephonySessionBody": {"properties": {"sequence": {"title": "Sequence", "type": "integer"}, "sessionId": {"title": "Sessionid", "type": "string"}, "telephonySessionId": {"title": "Telephonysessionid", "type": "string"}, "serverId": {"title": "Serverid", "type": "string"}, "eventTime": {"format": "date-time", "title": "Eventtime", "type": "string"}, "parties": {"items": {"$ref": "#/components/schemas/RCParty"}, "title": "Parties", "type": "array"}}, "required": ["sequence", "sessionId", "telephonySessionId", "serverId", "eventTime", "parties"], "title": "RCTelephonySessionBody", "type": "object"}, "RCWebhookPayload": {"properties": {"uuid": {"title": "Uuid", "type": "string"}, "event": {"title": "Event", "type": "string"}, "timestamp": {"format": "date-time", "title": "Timestamp", "type": "string"}, "subscriptionId": {"title": "Subscriptionid", "type": "string"}, "ownerId": {"type": "string", "nullable": true, "title": "Ownerid"}, "body": {"$ref": "#/components/schemas/RCTelephonySessionBody"}}, "required": ["uuid", "event", "timestamp", "subscriptionId", "body"], "title": "RCWebhookPayload", "type": "object"}}, "securitySchemes": {"SessionTokenAuth": {"type": "apiKey", "in": "header", "name": "X-Session-Token"}}}, "servers": []}