{"openapi":"3.1.0","info":{"title":"Prosper Voice","version":"1.0.0"},"paths":{"/api/v1/health":{"get":{"tags":["Status"],"summary":"Health Check","description":"Health check endpoint for monitoring service status.","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/campaigns/{campaign_id}/calls":{"post":{"tags":["Campaigns"],"summary":"Campaign Calls","operationId":"campaign_calls_api_v1_campaigns__campaign_id__calls_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign.","title":"Campaign Id"},"description":"The ID of the campaign."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchTargetsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{campaign_id}/targets":{"post":{"tags":["Campaigns"],"summary":"Add Targets","description":"Add targets to a campaign","operationId":"add_targets_api_v1_campaigns__campaign_id__targets_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign to add targets to.","title":"Campaign Id"},"description":"The ID of the campaign to add targets to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTargetsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Campaigns"],"summary":"Delete Targets","description":"Delete targets from a campaign","operationId":"delete_targets_api_v1_campaigns__campaign_id__targets_delete","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign to delete targets from.","title":"Campaign Id"},"description":"The ID of the campaign to delete targets from."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTargetsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Campaigns"],"summary":"Get Campaign Targets","operationId":"get_campaign_targets_api_v1_campaigns__campaign_id__targets_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign.","title":"Campaign Id"},"description":"The ID of the campaign."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"The page number to get.","default":0,"title":"Page"},"description":"The page number to get."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of targets per page.","default":10,"title":"Limit"},"description":"The number of targets per page."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignTargetStatus"},{"type":"null"}],"description":"The status of the targets to get.","title":"Status"},"description":"The status of the targets to get."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The start date to get.","examples":["2024-01-01"],"title":"From Date"},"description":"The start date to get."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The end date to get.","examples":["2024-01-01"],"title":"To Date"},"description":"The end date to get."},{"name":"from_last_call_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date to get targets from the last call date.","examples":["2024-01-01"],"title":"From Last Call Date"},"description":"The date to get targets from the last call date."},{"name":"to_last_call_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date to get targets to the last call date.","examples":["2024-01-01"],"title":"To Last Call Date"},"description":"The date to get targets to the last call date."},{"name":"patient_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter to targets whose patient.external_id is in this list. Repeat the param to batch (e.g. ?patient_external_id=A&patient_external_id=B); max 100 per request.","title":"Patient External Id"},"description":"Filter to targets whose patient.external_id is in this list. Repeat the param to batch (e.g. ?patient_external_id=A&patient_external_id=B); max 100 per request."},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter to targets whose external_id is in this list; max 100 per request.","title":"External Id"},"description":"Filter to targets whose external_id is in this list; max 100 per request."},{"name":"phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter to targets that have any of these phone numbers; max 100 per request.","title":"Phone Number"},"description":"Filter to targets that have any of these phone numbers; max 100 per request."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCampaignTargetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{campaign_id}/variables":{"get":{"tags":["Campaigns"],"summary":"Get Required Variables","description":"If successful returns a json with the input variables for the campaign.","operationId":"get_required_variables_api_v1_campaigns__campaign_id__variables_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign to get the variables from.","title":"Campaign Id"},"description":"The ID of the campaign to get the variables from."},{"name":"view","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CampaignVariablesView","description":"`basic` (default) returns a JSON array of the required variable names. `full` returns every input variable (required and optional) as objects with `name`, `required`, `type` and `description`.","default":"basic"},"description":"`basic` (default) returns a JSON array of the required variable names. `full` returns every input variable (required and optional) as objects with `name`, `required`, `type` and `description`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{campaign_id}/targets/{target_id}/step/{friendly_id}":{"post":{"tags":["Campaigns"],"summary":"Receive Webhook Step","operationId":"receive_webhook_step_api_v1_campaigns__campaign_id__targets__target_id__step__friendly_id__post","parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the target.","title":"Target Id"},"description":"The ID of the target."},{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign.","title":"Campaign Id"},"description":"The ID of the campaign."},{"name":"friendly_id","in":"path","required":true,"schema":{"type":"string","description":"The friendly ID of the step.","title":"Friendly Id"},"description":"The friendly ID of the step."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Target Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{campaign_id}/targets/step/{friendly_id}":{"post":{"tags":["Campaigns"],"summary":"Batch Receive Webhook Step","description":"Apply a receive-webhook step update to many targets in one request.","operationId":"batch_receive_webhook_step_api_v1_campaigns__campaign_id__targets_step__friendly_id__post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign.","title":"Campaign Id"},"description":"The ID of the campaign."},{"name":"friendly_id","in":"path","required":true,"schema":{"type":"string","description":"The friendly ID of the step.","title":"Friendly Id"},"description":"The friendly ID of the step."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchReceiveWebhookStepRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{campaign_id}/ehr-event/{friendly_id}":{"post":{"tags":["Campaigns"],"summary":"Receive Ehr Event Step","operationId":"receive_ehr_event_step_api_v1_campaigns__campaign_id__ehr_event__friendly_id__post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign.","title":"Campaign Id"},"description":"The ID of the campaign."},{"name":"friendly_id","in":"path","required":true,"schema":{"type":"string","description":"The friendly ID of the step.","title":"Friendly Id"},"description":"The friendly ID of the step."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_receive_ehr_event_step_api_v1_campaigns__campaign_id__ehr_event__friendly_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{campaign_id}/webhooks/rerun-failed":{"post":{"tags":["Campaigns"],"summary":"Rerun Failed Webhooks","description":"Re-run failed webhook notifications for a campaign within a time window.","operationId":"rerun_failed_webhooks_api_v1_campaigns__campaign_id__webhooks_rerun_failed_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign.","title":"Campaign Id"},"description":"The ID of the campaign."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerunFailedWebhooksBody"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaigns/{campaign_id}/patient/targets":{"get":{"tags":["Campaigns"],"summary":"Get Patient Campaign Targets","operationId":"get_patient_campaign_targets_api_v1_campaigns__campaign_id__patient_targets_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the campaign.","title":"Campaign Id"},"description":"The ID of the campaign."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"The page number to get.","default":0,"title":"Page"},"description":"The page number to get."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of targets per page.","default":10,"title":"Limit"},"description":"The number of targets per page."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignTargetStatus"},{"type":"null"}],"description":"The status of the targets to get.","title":"Status"},"description":"The status of the targets to get."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The start date to get.","examples":["2024-01-01"],"title":"From Date"},"description":"The start date to get."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The end date to get.","examples":["2024-01-01"],"title":"To Date"},"description":"The end date to get."},{"name":"from_last_call_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date to get targets from the last call date.","examples":["2024-01-01"],"title":"From Last Call Date"},"description":"The date to get targets from the last call date."},{"name":"to_last_call_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date to get targets to the last call date.","examples":["2024-01-01"],"title":"To Last Call Date"},"description":"The date to get targets to the last call date."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCampaignTargetsPatientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/call-logs":{"get":{"tags":["Call Logs"],"summary":"List Call Logs","description":"List all call logs for the organization with pagination and date filtering.","operationId":"list_call_logs_api_v1_call_logs_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"The page number to get.","default":0,"title":"Page"},"description":"The page number to get."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"The number of call logs per page.","default":200,"title":"Limit"},"description":"The number of call logs per page."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter logs from this date.","title":"From Date"},"description":"Filter logs from this date."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter logs until this date.","title":"To Date"},"description":"Filter logs until this date."},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter logs by campaign ID.","title":"Campaign Id"},"description":"Filter logs by campaign ID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallLogExportPaginated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/call-logs/{call_log_id}":{"get":{"tags":["Call Logs"],"summary":"Get Call Log","description":"Get detailed information for a specific call log.","operationId":"get_call_log_api_v1_call_logs__call_log_id__get","parameters":[{"name":"call_log_id","in":"path","required":true,"schema":{"type":"integer","ge":0,"le":9223372036854775807,"description":"The ID of the call log to get the information.","title":"Call Log Id"},"description":"The ID of the call log to get the information."},{"name":"include_recordings","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include recordings.","default":false,"title":"Include Recordings"},"description":"Whether to include recordings."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallLogExportInformation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/live-calls":{"get":{"tags":["Live Calls"],"summary":"Get Live Call","description":"Return a flat snapshot of a call by one of:\n\n- `call_log_id`\n- `user_phone_number`\n- `key` + `value` (any variable previously mapped on the flow)\n\nTries `live_calls` first (source=`live_calls`), then falls back to\n`v_call_logs` (source=`call_logs`). Response is a single-level dict with\ndotted keys for any nested values.","operationId":"get_live_call_api_v1_live_calls_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key of the variable to search for","title":"Key"},"description":"The key of the variable to search for"},{"name":"value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value of the variable to search for","title":"Value"},"description":"The value of the variable to search for"},{"name":"call_log_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The ID of the call log to search for","title":"Call Log Id"},"description":"The ID of the call log to search for"},{"name":"user_phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The phone number of the user to search for","title":"User Phone Number"},"description":"The phone number of the user to search for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Live Call Api V1 Live Calls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/targets/{target_id}":{"get":{"tags":["Targets"],"summary":"Retrieve Target","operationId":"retrieve_target_api_v1_targets__target_id__get","parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the target to get the required variables from.","title":"Target Id"},"description":"The ID of the target to get the required variables from."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignTargetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Targets"],"summary":"Update Target Input Data","operationId":"update_target_input_data_api_v1_targets__target_id__patch","parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the target whose input_data to update.","title":"Target Id"},"description":"The ID of the target whose input_data to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTargetInputDataRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignTargetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{api_key_id}":{"delete":{"tags":["API Keys"],"summary":"Delete Api Key","operationId":"delete_api_key_api_v1_api_keys__api_key_id__delete","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Api Key Api V1 Api Keys  Api Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases/tasks/{task_id}/assign":{"post":{"tags":["Cases"],"summary":"Assign Case Task","operationId":"assign_case_task_api_v1_cases_tasks__task_id__assign_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignTaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases/tasks/{task_id}/complete":{"post":{"tags":["Cases"],"summary":"Complete Case Task","operationId":"complete_case_task_api_v1_cases_tasks__task_id__complete_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteTaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases/tasks/{task_id}/cancel":{"post":{"tags":["Cases"],"summary":"Cancel Case Task","operationId":"cancel_case_task_api_v1_cases_tasks__task_id__cancel_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelTaskRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases/tasks/{task_id}/reopen":{"post":{"tags":["Cases"],"summary":"Reopen Case Task","operationId":"reopen_case_task_api_v1_cases_tasks__task_id__reopen_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReopenTaskRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases/tasks/{task_id}/notes":{"post":{"tags":["Cases"],"summary":"Add Case Task Note","operationId":"add_case_task_note_api_v1_cases_tasks__task_id__notes_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTaskNoteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseTaskEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases":{"post":{"tags":["Cases"],"summary":"Create Case","description":"Create a case, resolving or creating its patient. Idempotent on\n``external_id``: a repeat returns the existing case unchanged.","operationId":"create_case_api_v1_cases_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCaseInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases/{case_id}":{"get":{"tags":["Cases"],"summary":"Get Case","operationId":"get_case_api_v1_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Cases"],"summary":"Update Case Status","description":"Move a case. ``closed_at`` is derived from the status, not supplied.","operationId":"update_case_status_api_v1_cases__case_id__patch","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCaseStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cases/{case_id}/tasks":{"post":{"tags":["Cases"],"summary":"Create Case Task","operationId":"create_case_task_api_v1_cases__case_id__tasks_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseTaskInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddTargetsRequest":{"properties":{"targets":{"anyOf":[{"items":{"$ref":"#/components/schemas/TargetInput"},"type":"array"},{"type":"null"}],"title":"Targets","description":"The list of targets as TargetInputs","examples":[[{"fallback_phone_number":"+19876543210","input_data":{"appointment_date":"2026-04-01","appointment_type":"Follow-up"},"patient":{"date_of_birth":"1990-01-15","external_id":"PAT-001","extra_data":{"address":"123 Main St, Anytown, USA"},"first_name":"John","last_name":"Doe"},"phone_number":"+1234567890","pre_call_ehr_ids":{"patient_id":"EHR-PAT-001"}}]]},"launch":{"type":"boolean","title":"Launch","description":"Whether to launch the targets immediately or only add them to the campaign","default":false},"allow_duplicates":{"type":"boolean","title":"Allow Duplicates","description":"When set to True all targets with and external ID already contained in the campaign will be ignored","default":true},"strict":{"type":"boolean","title":"Strict","description":"When set to False, targets that fail validation are still uploaded; targets with an invalid phone number are marked as INVALID_PHONE_NUMBER when the call is about to be executed","default":true}},"type":"object","title":"AddTargetsRequest"},"AddTaskNoteRequest":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"},"actor_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Membership Id"}},"type":"object","required":["text"],"title":"AddTaskNoteRequest"},"AssignTaskRequest":{"properties":{"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Membership Id"},"actor_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Membership Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","title":"AssignTaskRequest"},"BatchReceiveWebhookStepRequest":{"properties":{"updates":{"items":{"$ref":"#/components/schemas/TargetStepUpdate"},"type":"array","maxItems":5000,"minItems":1,"title":"Updates","description":"Per-target updates to apply to the step in a single request."}},"type":"object","required":["updates"],"title":"BatchReceiveWebhookStepRequest"},"BillingResolvedSubCategory":{"type":"string","enum":["PAY_OVER_THE_PHONE","PAYMENT_PLAN","PAYMENT_LINK_SENT","USER_WILL_PAY","INQUIRY_RESOLVED"],"title":"BillingResolvedSubCategory"},"BillingUnresolvedSubCategory":{"type":"string","enum":["BALANCE_DISPUTE","ALREADY_PAID","REFUSE_TO_PAY","CANNOT_PAY","OTHER"],"title":"BillingUnresolvedSubCategory"},"Body_receive_ehr_event_step_api_v1_campaigns__campaign_id__ehr_event__friendly_id__post":{"properties":{"event_type":{"$ref":"#/components/schemas/EHREventType","description":"The type of EHR event."},"event_data":{"additionalProperties":true,"type":"object","title":"Event Data"},"target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id","description":"Optional target ID."},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Optional external ID."}},"type":"object","required":["event_type"],"title":"Body_receive_ehr_event_step_api_v1_campaigns__campaign_id__ehr_event__friendly_id__post"},"CallLogExportInformation":{"properties":{"id":{"type":"string","title":"Id"},"to":{"type":"string","title":"To"},"from_":{"anyOf":[{"type":"string","enum":["DeprecatedLocalTest","Simulation"]},{"type":"string"}],"title":"From"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"call_length":{"type":"string","title":"Call Length"},"call_ended_reason":{"type":"string","title":"Call Ended Reason"},"call_categorization":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Call Categorization"},"recording_urls":{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array","title":"Recording Urls"},"agent_data":{"additionalProperties":true,"type":"object","title":"Agent Data"},"campaign_target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Target Id"},"post_call_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Post Call Data"},"qa":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qa"},"transcripts":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Transcripts"}},"type":"object","required":["id","to","from_","created_at","call_length","call_ended_reason","call_categorization","recording_urls","agent_data","campaign_target_id","post_call_data","qa","transcripts"],"title":"CallLogExportInformation"},"CallLogExportPaginated":{"properties":{"call_logs":{"items":{"$ref":"#/components/schemas/CallLogListExportInformation"},"type":"array","title":"Call Logs"},"page_count":{"type":"integer","title":"Page Count"},"next_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Page"}},"type":"object","required":["call_logs","page_count","next_page"],"title":"CallLogExportPaginated"},"CallLogListExportInformation":{"properties":{"id":{"type":"string","title":"Id"},"to":{"type":"string","title":"To"},"from_":{"anyOf":[{"type":"string","enum":["DeprecatedLocalTest","Simulation"]},{"type":"string"}],"title":"From"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"call_length":{"type":"string","title":"Call Length"},"call_ended_reason":{"type":"string","title":"Call Ended Reason"},"call_categorization":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Call Categorization"},"agent_data":{"additionalProperties":true,"type":"object","title":"Agent Data"},"campaign_target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Target Id"},"post_call_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Post Call Data"},"qa":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qa"},"transcripts":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Transcripts"}},"type":"object","required":["id","to","from_","created_at","call_length","call_ended_reason","call_categorization","agent_data","campaign_target_id","post_call_data","qa","transcripts"],"title":"CallLogListExportInformation","description":"Call log export information for list endpoint - includes full data except recordings"},"CampaignTargetPatientResolution":{"type":"string","enum":["successful","unsuccessful"],"title":"CampaignTargetPatientResolution"},"CampaignTargetPatientResponse":{"properties":{"id":{"type":"string","title":"Id"},"target_url":{"type":"string","title":"Target Url"},"organization_id":{"type":"string","title":"Organization Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"execution_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Minutes"},"input_data":{"additionalProperties":true,"type":"object","title":"Input Data"},"output_data":{"additionalProperties":true,"type":"object","title":"Output Data"},"status":{"$ref":"#/components/schemas/CampaignTargetStatus"},"resolution":{"anyOf":[{"$ref":"#/components/schemas/CampaignTargetPayorResolution"},{"$ref":"#/components/schemas/CampaignTargetPatientResolution"},{"type":"null"}],"title":"Resolution"},"category":{"anyOf":[{"$ref":"#/components/schemas/PayorCallCategory"},{"$ref":"#/components/schemas/PatientCallCategory"},{"$ref":"#/components/schemas/ProviderCallCategory"},{"$ref":"#/components/schemas/PatientIncomingCallCategory"},{"$ref":"#/components/schemas/PatientIncomingSchedulingCallCategory"},{"$ref":"#/components/schemas/PatientBillingCallCategory"},{"type":"null"}],"title":"Category"},"subcategory":{"anyOf":[{"$ref":"#/components/schemas/NotFoundSubCategory"},{"$ref":"#/components/schemas/TransferSubCategory"},{"$ref":"#/components/schemas/BillingResolvedSubCategory"},{"$ref":"#/components/schemas/BillingUnresolvedSubCategory"},{"$ref":"#/components/schemas/IVRLoopSubCategory"},{"$ref":"#/components/schemas/ServiceNotAvailableSubCategory"},{"$ref":"#/components/schemas/UnprocessableByPhoneSubCategory"},{"$ref":"#/components/schemas/InputDataIssueSubCategory"},{"$ref":"#/components/schemas/HumanOnlySubcategory"},{"$ref":"#/components/schemas/VoicemailSubCategory"},{"$ref":"#/components/schemas/PayorCallCategory"},{"type":"string"},{"type":"null"}],"title":"Subcategory"},"call_log_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Call Log Ids"},"last_call_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Call Date"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"fax_links":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fax Links"},"payor_api_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payor Api Data"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"pre_call_ehr_ids":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pre Call Ehr Ids"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"retries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retries"},"scheduled_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Time"},"categorization":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Categorization"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"statistics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Statistics"}},"type":"object","required":["id","target_url","organization_id","campaign_id","created_at","execution_minutes","input_data","output_data","status","resolution","category","subcategory","call_log_ids","last_call_date","phone_number","fax_links","payor_api_data","external_id"],"title":"CampaignTargetPatientResponse","description":"Simplified response for patient campaign targets that uses the optimized\nvw_campaign_targets_export_patient view. This view excludes fax_links and\npayor_api_data for better performance."},"CampaignTargetPayorResolution":{"type":"string","enum":["retrieved","not_retrieved"],"title":"CampaignTargetPayorResolution"},"CampaignTargetResponse":{"properties":{"id":{"type":"string","title":"Id"},"target_url":{"type":"string","title":"Target Url"},"organization_id":{"type":"string","title":"Organization Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"execution_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Minutes"},"input_data":{"additionalProperties":true,"type":"object","title":"Input Data"},"output_data":{"additionalProperties":true,"type":"object","title":"Output Data"},"status":{"$ref":"#/components/schemas/CampaignTargetStatus"},"resolution":{"anyOf":[{"$ref":"#/components/schemas/CampaignTargetPayorResolution"},{"$ref":"#/components/schemas/CampaignTargetPatientResolution"},{"type":"null"}],"title":"Resolution"},"category":{"anyOf":[{"$ref":"#/components/schemas/PayorCallCategory"},{"$ref":"#/components/schemas/PatientCallCategory"},{"$ref":"#/components/schemas/ProviderCallCategory"},{"$ref":"#/components/schemas/PatientIncomingCallCategory"},{"$ref":"#/components/schemas/PatientIncomingSchedulingCallCategory"},{"$ref":"#/components/schemas/PatientBillingCallCategory"},{"type":"null"}],"title":"Category"},"subcategory":{"anyOf":[{"$ref":"#/components/schemas/NotFoundSubCategory"},{"$ref":"#/components/schemas/TransferSubCategory"},{"$ref":"#/components/schemas/BillingResolvedSubCategory"},{"$ref":"#/components/schemas/BillingUnresolvedSubCategory"},{"$ref":"#/components/schemas/IVRLoopSubCategory"},{"$ref":"#/components/schemas/ServiceNotAvailableSubCategory"},{"$ref":"#/components/schemas/UnprocessableByPhoneSubCategory"},{"$ref":"#/components/schemas/InputDataIssueSubCategory"},{"$ref":"#/components/schemas/HumanOnlySubcategory"},{"$ref":"#/components/schemas/VoicemailSubCategory"},{"$ref":"#/components/schemas/PayorCallCategory"},{"type":"string"},{"type":"null"}],"title":"Subcategory"},"call_log_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Call Log Ids"},"last_call_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Call Date"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"fax_links":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fax Links"},"payor_api_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payor Api Data"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"pre_call_ehr_ids":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pre Call Ehr Ids"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"retries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retries"},"scheduled_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Time"},"categorization":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Categorization"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"statistics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Statistics"}},"type":"object","required":["id","target_url","organization_id","campaign_id","created_at","execution_minutes","input_data","output_data","status","resolution","category","subcategory","call_log_ids","last_call_date","phone_number","fax_links","payor_api_data","external_id"],"title":"CampaignTargetResponse"},"CampaignTargetStatus":{"type":"string","enum":["Pending","Scheduled","In Progress","Post-processing","Finished","Failed","Waiting","SMS Scheduled"],"title":"CampaignTargetStatus"},"CampaignVariablesView":{"type":"string","enum":["basic","full"],"title":"CampaignVariablesView"},"CancelTaskRequest":{"properties":{"actor_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Membership Id"}},"type":"object","title":"CancelTaskRequest"},"CaseAppointmentInput":{"properties":{"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"cpt_codes":{"items":{"type":"string"},"type":"array","title":"Cpt Codes"},"location":{"additionalProperties":true,"type":"object","title":"Location"},"provider":{"additionalProperties":true,"type":"object","title":"Provider"}},"type":"object","title":"CaseAppointmentInput"},"CasePatientInput":{"properties":{"external_id":{"type":"string","title":"External Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"date_of_birth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Of Birth"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"extra_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Data"}},"type":"object","required":["external_id"],"title":"CasePatientInput"},"CaseResponse":{"properties":{"id":{"type":"string","title":"Id"},"external_id":{"type":"string","title":"External Id"},"status":{"$ref":"#/components/schemas/CaseStatus"},"patient_id":{"type":"string","title":"Patient Id"},"payor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payor"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"member_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Id"},"appointment_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment External Id"},"appointment_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment At"},"appointment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type"},"cpt_codes":{"items":{"type":"string"},"type":"array","title":"Cpt Codes"},"location":{"additionalProperties":true,"type":"object","title":"Location"},"provider":{"additionalProperties":true,"type":"object","title":"Provider"},"custom_data":{"additionalProperties":true,"type":"object","title":"Custom Data"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"tasks":{"items":{"$ref":"#/components/schemas/CaseTaskResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["id","external_id","status","patient_id","payor","plan","member_id","appointment_external_id","appointment_at","appointment_type","cpt_codes","location","provider","custom_data","source_url","closed_at","created_at"],"title":"CaseResponse"},"CaseStatus":{"type":"string","enum":["IN_PROGRESS","NEEDS_ACTION","READY","CANCELLED"],"title":"CaseStatus"},"CaseTaskEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"task_id":{"type":"string","title":"Task Id"},"event_type":{"type":"string","title":"Event Type"},"actor_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Membership Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"}},"type":"object","required":["id","task_id","event_type","actor_membership_id","text","occurred_at"],"title":"CaseTaskEventResponse"},"CaseTaskInput":{"properties":{"type":{"$ref":"#/components/schemas/CaseTaskType"},"name":{"type":"string","title":"Name"}},"type":"object","required":["type","name"],"title":"CaseTaskInput"},"CaseTaskResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"$ref":"#/components/schemas/CaseTaskType"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/CaseTaskStatus"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"assigned_to_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Membership Id"},"campaign_target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Target Id"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","name","status","outcome","summary","assigned_to_membership_id","campaign_target_id","completed_at","created_at"],"title":"CaseTaskResponse"},"CaseTaskStatus":{"type":"string","enum":["IN_PROGRESS","WAITING","COMPLETED","NEEDS_ACTION","CANCELLED"],"title":"CaseTaskStatus"},"CaseTaskType":{"type":"string","enum":["VOB","PA_INITIATION","PA_STATUS","CUSTOM"],"title":"CaseTaskType"},"CompleteTaskRequest":{"properties":{"outcome":{"type":"string","title":"Outcome"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"actor_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Membership Id"}},"type":"object","required":["outcome"],"title":"CompleteTaskRequest"},"CreateCaseInput":{"properties":{"external_id":{"type":"string","title":"External Id"},"patient":{"$ref":"#/components/schemas/CasePatientInput"},"appointment":{"anyOf":[{"$ref":"#/components/schemas/CaseAppointmentInput"},{"type":"null"}]},"payor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payor"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"member_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Id"},"custom_data":{"additionalProperties":true,"type":"object","title":"Custom Data"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"tasks":{"items":{"$ref":"#/components/schemas/CaseTaskInput"},"type":"array","title":"Tasks"}},"type":"object","required":["external_id","patient"],"title":"CreateCaseInput"},"DeleteTargetsRequest":{"properties":{"target_ids":{"items":{"type":"string"},"type":"array","title":"Target Ids","description":"The IDs of the targets to delete","examples":[["1234-abcd-1234","5678-efgh-5678"]]}},"type":"object","required":["target_ids"],"title":"DeleteTargetsRequest"},"EHREventType":{"type":"string","enum":["appointment_created","appointment_cancelled","patient_registered"],"title":"EHREventType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HumanOnlySubcategory":{"type":"string","enum":["STARTING_CALL","MID_CALL"],"title":"HumanOnlySubcategory"},"IVRLoopSubCategory":{"type":"string","enum":["NOT_RECOGNIZE_DATA","NOT_FOUND","LONG_WAITING_PERIOD","BAD_INTERACTION_WITH_IVR","IVR_ONLY_NUMBER","VOICEMAIL","CALLBACK_OFFERED"],"title":"IVRLoopSubCategory"},"InputDataIssueSubCategory":{"type":"string","enum":["MISSING_INFORMATION","INCORRECT_INFORMATION"],"title":"InputDataIssueSubCategory"},"LaunchTargetsRequest":{"properties":{"target_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Ids","description":"The IDs of the campaign targets to call. If not provided, count must be set."},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"Number of random pending targets to launch. If not provided, target_ids must be set."},"prioritize_oldest":{"type":"boolean","title":"Prioritize Oldest","description":"Whether to prioritize oldest targets when launching.","default":false}},"type":"object","title":"LaunchTargetsRequest"},"NotFoundSubCategory":{"type":"string","enum":["PROVIDER","MEMBER","FACILITY","REQUEST","OTHER"],"title":"NotFoundSubCategory"},"PaginatedCampaignTargetsPatientResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/CampaignTargetPatientResponse"},"type":"array","title":"Targets"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"next_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Page"}},"type":"object","required":["targets"],"title":"PaginatedCampaignTargetsPatientResponse","description":"Paginated response for patient campaign targets using the optimized\nvw_campaign_targets_export_patient view (no fax_links or payor_api_data)."},"PaginatedCampaignTargetsResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/CampaignTargetResponse"},"type":"array","title":"Targets"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"next_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Page"}},"type":"object","required":["targets"],"title":"PaginatedCampaignTargetsResponse"},"PatientBillingCallCategory":{"type":"string","enum":["NO_RESPONSE","VOICEMAIL","WRONG_USER","PATIENT_NOT_FOUND","RESOLVED","CALLBACK_REQUESTED","SWITCHBOARD","TRANSFER_SOP","FAST_USER_HANG_UP","UNRESOLVED"],"title":"PatientBillingCallCategory"},"PatientCallCategory":{"type":"string","enum":["GOOD","NO_RESPONSE","TRANSFER","TRANSFER_FAILED","VOICEMAIL","SERVICE_NOT_AVAILABLE","HUMAN_ONLY","CALLBACK_REQUESTED","MANAGER_REQUESTED","DISCONNECTED","DNC_REQUESTED","WRONG_USER","NOT_INTERESTED_RIGHT_NOW","BLACKLISTED_PHONE","INVALID_PHONE_NUMBER"],"title":"PatientCallCategory"},"PatientIncomingCallCategory":{"type":"string","enum":["TRANSFER_BY_USER","TRANSFER_BY_ASSISTANT","INSTANT_TRANSFER","TRANSFER","TRANSFER_FAILED","CALL_DROPPED","SUCCESSFUL_CALL","UNSUCCESSFUL_CALL","NO_RESPONSE","NOT_CONNECTED"],"title":"PatientIncomingCallCategory"},"PatientIncomingSchedulingCallCategory":{"type":"string","enum":["SWITCHBOARD","DEFLECTED","NO_RESPONSE","USER_EARLY_DISCONNECT","FAST_USER_HANG_UP","TRANSFER_SOP","UNRESOLVED","AUTOMATICALLY_BYPASSED"],"title":"PatientIncomingSchedulingCallCategory"},"PatientInput":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Patient first name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Patient last name"},"date_of_birth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Of Birth","description":"Patient date of birth (YYYY-MM-DD)"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Patient phone number"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Patient external ID (e.g. MRN)"},"extra_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Data","description":"Additional patient metadata"}},"type":"object","title":"PatientInput"},"PayorCallCategory":{"type":"string","enum":["GOOD","NO_RESPONSE","TRANSFER","TRANSFER_FAILED","VOICEMAIL","SERVICE_NOT_AVAILABLE","HUMAN_ONLY","AFTER_HOURS","CLOSED_FOR_HOLIDAYS","IVR_LOOP","INPUT_DATA_ISSUE","WRONG_PHONE_NUMBER","NOT_FOUND","UNPROCESSABLE_BY_PHONE","DISCONNECTED","NOT_ALL_DATA_POINTS_RETRIEVED","MEMBER_CONSENT_REQUIRED","SLA_EXPIRED","PAYOR_NOT_SUPPORTED","NO_OPERATING_HOURS","INVALID_PHONE_NUMBER"],"title":"PayorCallCategory"},"PreCallEhrIds":{"properties":{"patient_id":{"type":"string","minLength":1,"title":"Patient Id"}},"additionalProperties":false,"type":"object","required":["patient_id"],"title":"PreCallEhrIds","description":"EHR identifiers a target carries so the call can load them before it starts.\n\nIdentifiers only, never records: the chart is fetched from the EHR at call\nstart, so anything stored here would be a stale copy of it. Unknown keys are\nrejected, so an id we cannot act on (a misspelling, or an id type with no\nfetch support) fails the upload instead of riding along silently."},"ProviderCallCategory":{"type":"string","enum":["GOOD","WRONG_USER","PROVIDER_NO_LONGER_AT_LOCATION","DISCONNECTED","WRONG_PHONE_NUMBER","HUMAN_ONLY","DATA_ISSUE","CALLBACK_REQUESTED","TRANSFER_HANG_UP","UNPROCESSABLE_BY_PHONE","MEMBER_CONSENT_REQUIRED","IVR_LOOP","CLOSED_FOR_HOLIDAYS","NO_RESPONSE","VOICEMAIL","AFTER_HOURS","TRANSFER","TRANSFER_FAILED","BLACKLISTED_PHONE","INVALID_PHONE_NUMBER"],"title":"ProviderCallCategory"},"ReopenTaskRequest":{"properties":{"actor_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Membership Id"}},"type":"object","title":"ReopenTaskRequest"},"RerunFailedWebhooksBody":{"properties":{"from_date":{"type":"string","format":"date-time","title":"From Date","description":"Start of the window (webhook event created_at), inclusive."},"to_date":{"type":"string","format":"date-time","title":"To Date","description":"End of the window (webhook event created_at), inclusive."}},"type":"object","required":["from_date","to_date"],"title":"RerunFailedWebhooksBody"},"ServiceNotAvailableSubCategory":{"type":"string","enum":["PHONE_NUMBER_NOT_AVAILABLE","CLOGGED_SERVICE","TECHNICAL_ISSUE","OTHER"],"title":"ServiceNotAvailableSubCategory"},"TargetInput":{"properties":{"id":{"type":"string","title":"Id","description":"The ID of the target"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"The external ID of the target"},"phone_number":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/TargetInputPhoneNumber"}],"title":"Phone Number","description":"The phone number of the target"},"fallback_phone_number":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/TargetInputPhoneNumber"},{"type":"null"}],"title":"Fallback Phone Number","description":"The fallback phone number of the target"},"input_data":{"additionalProperties":true,"type":"object","title":"Input Data","description":"The input data of the target"},"patient":{"anyOf":[{"$ref":"#/components/schemas/PatientInput"},{"type":"null"}],"description":"Patient to link to this target."},"pre_call_ehr_ids":{"anyOf":[{"$ref":"#/components/schemas/PreCallEhrIds"},{"type":"null"}],"description":"Known EHR identifiers for this target; the patient's chart is loaded into the call's EHR context at call start."}},"type":"object","required":["phone_number"],"title":"TargetInput"},"TargetInputPhoneNumber":{"properties":{"value":{"type":"string","title":"Value","description":"The phone number of the target"},"operating_hours":{"anyOf":[{"$ref":"#/components/schemas/WeekSchedule"},{"type":"null"}],"description":"The operating hours of the target"}},"type":"object","required":["value"],"title":"TargetInputPhoneNumber"},"TargetStepUpdate":{"properties":{"target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id","description":"Internal target ID. Provide this or external_id."},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"External target ID. Provide this or target_id."},"input_data":{"additionalProperties":true,"type":"object","title":"Input Data","description":"Data merged into the target's call_metadata."}},"type":"object","title":"TargetStepUpdate"},"TimeIntervalNoTz":{"properties":{"start":{"type":"string","title":"Start","description":"Clock time as the source writes it — \"9:00\", \"13:30\" and \"1:30 PM\" are all accepted; 12-hour times are converted on import."},"end":{"type":"string","title":"End","description":"Clock time as the source writes it — \"17:00\", \"12:00\" and \"5:00 PM\" are all accepted; 12-hour times are converted on import."}},"type":"object","required":["start","end"],"title":"TimeIntervalNoTz"},"TransferSubCategory":{"type":"string","enum":["HUMAN_REQUESTED","INTEGRATION_ERROR","INSURANCE_REJECTED","TRANSFER_REQUESTED","NATURAL_TRANSFER"],"title":"TransferSubCategory"},"UnprocessableByPhoneSubCategory":{"type":"string","enum":["FAX","INSURANCE_PORTAL","AUTOMATED_SYSTEM"],"title":"UnprocessableByPhoneSubCategory"},"UpdateCaseStatusRequest":{"properties":{"status":{"$ref":"#/components/schemas/CaseStatus"}},"type":"object","required":["status"],"title":"UpdateCaseStatusRequest"},"UpdateTargetInputDataRequest":{"properties":{"input_data":{"additionalProperties":true,"type":"object","title":"Input Data","description":"Fields to merge into the target's input_data. Only the keys present here are updated; existing keys not included are left unchanged."},"only_if_not_started":{"type":"boolean","title":"Only If Not Started","description":"When true (default), the edit is rejected with 409 if the target has already started executing — i.e. a call has been placed, or it has left the Pending/Scheduled staging states. A Scheduled target with no calls yet is still editable. Set false to edit regardless.","default":true}},"type":"object","required":["input_data"],"title":"UpdateTargetInputDataRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VoicemailSubCategory":{"type":"string","enum":["DELIVERED","NOT_DELIVERED","NO_MAILBOX"],"title":"VoicemailSubCategory"},"WeekSchedule":{"properties":{"monday":{"items":{"$ref":"#/components/schemas/TimeIntervalNoTz"},"type":"array","title":"Monday"},"tuesday":{"items":{"$ref":"#/components/schemas/TimeIntervalNoTz"},"type":"array","title":"Tuesday"},"wednesday":{"items":{"$ref":"#/components/schemas/TimeIntervalNoTz"},"type":"array","title":"Wednesday"},"thursday":{"items":{"$ref":"#/components/schemas/TimeIntervalNoTz"},"type":"array","title":"Thursday"},"friday":{"items":{"$ref":"#/components/schemas/TimeIntervalNoTz"},"type":"array","title":"Friday"},"saturday":{"items":{"$ref":"#/components/schemas/TimeIntervalNoTz"},"type":"array","title":"Saturday"},"sunday":{"items":{"$ref":"#/components/schemas/TimeIntervalNoTz"},"type":"array","title":"Sunday"},"tz":{"type":"string","title":"Tz","default":"US/Eastern"}},"type":"object","title":"WeekSchedule"}}}}