{"openapi":"3.1.0","info":{"title":"StarShield Voice Agents","version":"0.1.0"},"paths":{"/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_login_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["portal"],"summary":"Login Page","operationId":"login_page_login_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logout":{"get":{"tags":["auth"],"summary":"Logout","operationId":"logout_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tools/kb/{category_slug}":{"post":{"tags":["agent-tools"],"summary":"Search Kb","operationId":"search_kb_tools_kb__category_slug__post","parameters":[{"name":"category_slug","in":"path","required":true,"schema":{"type":"string","title":"Category Slug"}},{"name":"x-tool-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Tool-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBQuery"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/elevenlabs/post-call":{"post":{"tags":["webhooks"],"summary":"Elevenlabs Post Call","operationId":"elevenlabs_post_call_webhooks_elevenlabs_post_call_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/calls/outbound":{"post":{"tags":["calls"],"summary":"Outbound","operationId":"outbound_api_calls_outbound_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboundRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns/{category_slug}":{"post":{"tags":["calls"],"summary":"Campaign","description":"One agent. CSV or Excel columns: phone (required), name, company, language, business_type, voice_id\n(plus city, email, notes for the contacts). Every row is also saved as a contact of the uploader's team.","operationId":"campaign_api_campaigns__category_slug__post","parameters":[{"name":"category_slug","in":"path","required":true,"schema":{"type":"string","title":"Category Slug"}},{"name":"gap_secs","in":"query","required":false,"schema":{"type":"number","default":2.0,"title":"Gap Secs"}},{"name":"line_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Id"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},{"name":"voice_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_campaign_api_campaigns__category_slug__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/campaigns":{"post":{"tags":["calls"],"summary":"Mixed Campaign","description":"Mixed list: each row's business_type (or keyword / category) column picks the agent.\nRows whose agent the uploader may not use (a caller's unassigned agents) are not called.","operationId":"mixed_campaign_api_campaigns_post","parameters":[{"name":"gap_secs","in":"query","required":false,"schema":{"type":"number","default":2.0,"title":"Gap Secs"}},{"name":"line_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Id"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},{"name":"voice_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_mixed_campaign_api_campaigns_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/new":{"get":{"tags":["agents"],"summary":"New Agent","operationId":"new_agent_agents_new_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["agents"],"summary":"Create Agent","operationId":"create_agent_agents_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agents/{slug}/edit":{"get":{"tags":["agents"],"summary":"Edit Agent","operationId":"edit_agent_agents__slug__edit_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Save Agent","operationId":"save_agent_agents__slug__edit_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/publish":{"post":{"tags":["agents"],"summary":"Publish Agent","operationId":"publish_agent_agents__slug__publish_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/archive":{"post":{"tags":["agents"],"summary":"Archive Agent","operationId":"archive_agent_agents__slug__archive_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-approvals":{"get":{"tags":["agents"],"summary":"Approvals","operationId":"approvals_agent_approvals_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/agents/{slug}/review":{"get":{"tags":["agents"],"summary":"Review","operationId":"review_agents__slug__review_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/approve":{"post":{"tags":["agents"],"summary":"Approve Agent","operationId":"approve_agent_agents__slug__approve_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_approve_agent_agents__slug__approve_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/reject":{"post":{"tags":["agents"],"summary":"Reject Agent","operationId":"reject_agent_agents__slug__reject_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reject_agent_agents__slug__reject_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/log":{"get":{"tags":["call log"],"summary":"Log Page","operationId":"log_page_calls_log_get","parameters":[{"name":"phone","in":"query","required":false,"schema":{"type":"string","default":"","title":"Phone"}},{"name":"contact_name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Contact Name"}},{"name":"company","in":"query","required":false,"schema":{"type":"string","default":"","title":"Company"}},{"name":"business_type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Business Type"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["call log"],"summary":"Log Call","operationId":"log_call_calls_log_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/calls/{call_id}/edit":{"get":{"tags":["call log"],"summary":"Edit Page","operationId":"edit_page_calls__call_id__edit_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["call log"],"summary":"Edit Call","operationId":"edit_call_calls__call_id__edit_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/delete":{"post":{"tags":["call log"],"summary":"Delete Call","operationId":"delete_call_calls__call_id__delete_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/assign":{"post":{"tags":["call log"],"summary":"Bulk Assign","operationId":"bulk_assign_calls_assign_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/calls/{call_id}/assign":{"post":{"tags":["call log"],"summary":"Assign One","operationId":"assign_one_calls__call_id__assign_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_assign_one_calls__call_id__assign_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["portal"],"summary":"Dashboard","operationId":"dashboard__get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls":{"get":{"tags":["portal"],"summary":"Calls Page","operationId":"calls_page_calls_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"sentiment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"}},{"name":"intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"assigned","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/export.csv":{"get":{"tags":["portal"],"summary":"Calls Export","operationId":"calls_export_calls_export_csv_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"sentiment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"}},{"name":"intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"assigned","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}":{"get":{"tags":["portal"],"summary":"Call Detail","operationId":"call_detail_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/recording":{"get":{"tags":["portal"],"summary":"Call Recording","operationId":"call_recording_calls__call_id__recording_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/fetch-recording":{"post":{"tags":["portal"],"summary":"Refetch Recording","operationId":"refetch_recording_calls__call_id__fetch_recording_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/check":{"post":{"tags":["portal"],"summary":"Check Call","description":"The Check now button: ask ElevenLabs and the phone line how this call ended.","operationId":"check_call_calls__call_id__check_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/reanalyse":{"post":{"tags":["portal"],"summary":"Reanalyse","operationId":"reanalyse_calls__call_id__reanalyse_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents":{"get":{"tags":["portal"],"summary":"Agents Page","operationId":"agents_page_agents_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}":{"get":{"tags":["portal"],"summary":"Agent Detail","operationId":"agent_detail_agents__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/talk-session":{"get":{"tags":["portal"],"summary":"Talk Session","description":"Everything the browser needs to talk to this agent: a short-lived signed URL plus the same\nper-call variables a phone call would get.","operationId":"talk_session_agents__slug__talk_session_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"business_type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Business Type"}},{"name":"language","in":"query","required":false,"schema":{"type":"string","default":"","title":"Language"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Name"}},{"name":"voice_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Voice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/talk-claim":{"post":{"tags":["portal"],"summary":"Talk Claim","description":"The browser reports the conversation id of a \"Talk in browser\" session, so the saved call is\nattributed to the user who held it. The post-call webhook fills in the rest of the row later.","operationId":"talk_claim_agents__slug__talk_claim_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_talk_claim_agents__slug__talk_claim_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/scripts":{"post":{"tags":["portal"],"summary":"Upload Script","description":"Add or replace a call script: for the whole agent (business_type empty) or one business type. A .txt,\n.pdf or .docx file, or pasted text.","operationId":"upload_script_agents__slug__scripts_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/scripts/{script_id}":{"get":{"tags":["portal"],"summary":"View Script","operationId":"view_script_agents__slug__scripts__script_id__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"script_id","in":"path","required":true,"schema":{"type":"integer","title":"Script Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/scripts/{script_id}/delete":{"post":{"tags":["portal"],"summary":"Delete Script","operationId":"delete_script_agents__slug__scripts__script_id__delete_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"script_id","in":"path","required":true,"schema":{"type":"integer","title":"Script Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/main-script.txt":{"get":{"tags":["portal"],"summary":"Download Main Script","description":"The agent's main call script as a text file, to edit offline and upload again.","operationId":"download_main_script_agents__slug__main_script_txt_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"original","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Original"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/main-script":{"post":{"tags":["portal"],"summary":"Save Main Script","description":"Replace the agent's pre-written call script with an edited one (typed in the page or an uploaded file),\nor go back to the original (action=reset). The new prompt is pushed to ElevenLabs straight away.","operationId":"save_main_script_agents__slug__main_script_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/files":{"post":{"tags":["portal"],"summary":"Upload Kb","operationId":"upload_kb_agents__slug__files_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_kb_agents__slug__files_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/call":{"post":{"tags":["portal"],"summary":"Portal Call","operationId":"portal_call_agents__slug__call_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_portal_call_agents__slug__call_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{slug}/campaign":{"post":{"tags":["portal"],"summary":"Portal Campaign","operationId":"portal_campaign_agents__slug__campaign_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_portal_campaign_agents__slug__campaign_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns":{"post":{"tags":["portal"],"summary":"Portal Mixed Campaign","operationId":"portal_mixed_campaign_campaigns_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_portal_mixed_campaign_campaigns_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/campaigns/template.{fmt}":{"get":{"tags":["portal"],"summary":"Campaign Template","description":"A ready-to-fill lead list: CSV, or Excel with dropdowns for business type, language and voice.\nWith ?agent=<slug> the business types are that agent's; otherwise those of every agent this person may use.","operationId":"campaign_template_campaigns_template__fmt__get","parameters":[{"name":"fmt","in":"path","required":true,"schema":{"type":"string","title":"Fmt"}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","default":"","title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts":{"get":{"tags":["contacts"],"summary":"Contacts Page","operationId":"contacts_page_contacts_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/export.csv":{"get":{"tags":["contacts"],"summary":"Contacts Export","operationId":"contacts_export_contacts_export_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/contacts/import":{"post":{"tags":["contacts"],"summary":"Import Contacts","description":"Save a lead list as contacts. With an agent (or \"mixed\": by each row's business type) it also starts a\ncampaign, which needs run_campaigns and credits.","operationId":"import_contacts_contacts_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_contacts_contacts_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/new":{"post":{"tags":["contacts"],"summary":"Add Contact","operationId":"add_contact_contacts_new_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_contact_contacts_new_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/{contact_id}/delete":{"post":{"tags":["contacts"],"summary":"Delete Contact","operationId":"delete_contact_contacts__contact_id__delete_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/bulk":{"post":{"tags":["contacts"],"summary":"Bulk","operationId":"bulk_contacts_bulk_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/contacts/for-call/{call_id}":{"get":{"tags":["contacts"],"summary":"Contact For Call","description":"The contact of a call (made on the fly for calls from before contacts existed).","operationId":"contact_for_call_contacts_for_call__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/{contact_id}":{"get":{"tags":["contacts"],"summary":"Contact Detail","operationId":"contact_detail_contacts__contact_id__get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/{contact_id}/edit":{"post":{"tags":["contacts"],"summary":"Edit Contact","operationId":"edit_contact_contacts__contact_id__edit_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts/{contact_id}/assign":{"post":{"tags":["contacts"],"summary":"Assign Contact","operationId":"assign_contact_contacts__contact_id__assign_post","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_assign_contact_contacts__contact_id__assign_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/user-daily":{"get":{"tags":["reports"],"summary":"User Daily Page","description":"One person's daily report as a printable page (the browser's print saves it as a PDF).","operationId":"user_daily_page_reports_user_daily_get","parameters":[{"name":"user","in":"query","required":false,"schema":{"type":"string","default":"","title":"User"}},{"name":"day","in":"query","required":false,"schema":{"type":"string","default":"","title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/user-daily.csv":{"get":{"tags":["reports"],"summary":"User Daily Csv","operationId":"user_daily_csv_reports_user_daily_csv_get","parameters":[{"name":"user","in":"query","required":false,"schema":{"type":"string","default":"","title":"User"}},{"name":"day","in":"query","required":false,"schema":{"type":"string","default":"","title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/daily-all.csv":{"get":{"tags":["reports"],"summary":"Everyone Csv","description":"One row per person per day: everyone for a super admin, the admin and their callers for an admin.","operationId":"everyone_csv_reports_daily_all_csv_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/daily/send-all":{"post":{"tags":["reports"],"summary":"Send All Now","description":"Send today's report now to everyone (super admin) or the team (admin) who has it on. Nobody gets it twice\non the same channel: people who already got today's report are counted as already sent.","operationId":"send_all_now_reports_daily_send_all_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_send_all_now_reports_daily_send_all_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/daily-report":{"post":{"tags":["reports"],"summary":"Set User Daily","description":"An admin (their callers) or a super admin (anyone) turns someone's daily report on or off.","operationId":"set_user_daily_users__user_id__daily_report_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_user_daily_users__user_id__daily_report_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/daily-report":{"post":{"tags":["reports"],"summary":"Save Daily Wa","operationId":"save_daily_wa_whatsapp_settings_daily_report_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reports":{"get":{"tags":["reports"],"summary":"Reports Page","operationId":"reports_page_reports_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","default":"","title":"Agent"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"","title":"Direction"}},{"name":"team","in":"query","required":false,"schema":{"type":"string","default":"","title":"Team"}},{"name":"line","in":"query","required":false,"schema":{"type":"string","default":"","title":"Line"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/daily":{"get":{"tags":["reports"],"summary":"Daily Preview","description":"The daily report email exactly as it is sent, for any day.","operationId":"daily_preview_reports_daily_get","parameters":[{"name":"day","in":"query","required":false,"schema":{"type":"string","default":"","title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/daily/send":{"post":{"tags":["reports"],"summary":"Daily Send","operationId":"daily_send_reports_daily_send_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_daily_send_reports_daily_send_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/leads.csv":{"get":{"tags":["reports"],"summary":"Leads Csv","operationId":"leads_csv_reports_leads_csv_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","default":"","title":"Agent"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"","title":"Direction"}},{"name":"team","in":"query","required":false,"schema":{"type":"string","default":"","title":"Team"}},{"name":"line","in":"query","required":false,"schema":{"type":"string","default":"","title":"Line"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/number-calls.csv":{"get":{"tags":["reports"],"summary":"Number Calls Csv","description":"Every call from one business number in the period: who placed it, when, to whom, result, intent,\nsentiment, interest and the AI summary.","operationId":"number_calls_csv_reports_number_calls_csv_get","parameters":[{"name":"line","in":"query","required":true,"schema":{"type":"string","title":"Line"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"team","in":"query","required":false,"schema":{"type":"string","default":"","title":"Team"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"get":{"tags":["users"],"summary":"Users Page","operationId":"users_page_users_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["users"],"summary":"Create User","operationId":"create_user_users_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_user_users_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}":{"get":{"tags":["users"],"summary":"Edit User Page","operationId":"edit_user_page_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"saved","in":"query","required":false,"schema":{"type":"string","default":"","title":"Saved"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Update User","operationId":"update_user_users__user_id__post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_user_users__user_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/delete":{"post":{"tags":["users"],"summary":"Delete User","description":"Super admins only: remove a user for good. Their call history stays (see app/services/user_delete.py).","operationId":"delete_user_users__user_id__delete_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_delete_user_users__user_id__delete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/password":{"post":{"tags":["users"],"summary":"Reset Password","operationId":"reset_password_users__user_id__password_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reset_password_users__user_id__password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"get":{"tags":["users"],"summary":"Account Page","operationId":"account_page_account_get","parameters":[{"name":"saved","in":"query","required":false,"schema":{"type":"string","default":"","title":"Saved"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/2fa/enable":{"post":{"tags":["users"],"summary":"Enable 2Fa","operationId":"enable_2fa_account_2fa_enable_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_enable_2fa_account_2fa_enable_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/2fa/disable":{"post":{"tags":["users"],"summary":"Disable 2Fa","operationId":"disable_2fa_account_2fa_disable_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_disable_2fa_account_2fa_disable_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/profile":{"post":{"tags":["users"],"summary":"Update Profile","description":"Name, job title and profile photo. Every role can edit their own.","operationId":"update_profile_account_profile_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_profile_account_profile_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/avatar/{user_id}":{"get":{"tags":["users"],"summary":"Avatar","operationId":"avatar_avatar__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/contact":{"post":{"tags":["users"],"summary":"Update Contact","operationId":"update_contact_account_contact_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_contact_account_contact_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/daily-report":{"post":{"tags":["users"],"summary":"Update Daily Report","description":"My profile: send my daily report automatically, by email and / or WhatsApp, every day at this time.","operationId":"update_daily_report_account_daily_report_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_daily_report_account_daily_report_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/password":{"post":{"tags":["users"],"summary":"Change Own Password","operationId":"change_own_password_account_password_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_change_own_password_account_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/team":{"post":{"tags":["users"],"summary":"Set Team","description":"Move a caller to an admin's team (or out of any team).","operationId":"set_team_users__user_id__team_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_team_users__user_id__team_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/2fa/reset":{"post":{"tags":["users"],"summary":"Reset 2Fa","description":"For someone who lost their phone: turns two-factor authentication off so they can set it up again.","operationId":"reset_2fa_users__user_id__2fa_reset_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit":{"get":{"tags":["users"],"summary":"Audit Page","operationId":"audit_page_audit_get","parameters":[{"name":"action","in":"query","required":false,"schema":{"type":"string","default":"","title":"Action"}},{"name":"user","in":"query","required":false,"schema":{"type":"string","default":"","title":"User"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/roles":{"get":{"tags":["users"],"summary":"Roles Page","operationId":"roles_page_roles_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/credits":{"get":{"tags":["credits"],"summary":"Credits Page","operationId":"credits_page_credits_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"msg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Msg"}},{"name":"err","in":"query","required":false,"schema":{"type":"string","default":"","title":"Err"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/{user_id}/give":{"post":{"tags":["credits"],"summary":"Give","operationId":"give_credits__user_id__give_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_give_credits__user_id__give_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/{user_id}/take-back":{"post":{"tags":["credits"],"summary":"Take Back","operationId":"take_back_credits__user_id__take_back_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_take_back_credits__user_id__take_back_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/{user_id}/deduct":{"post":{"tags":["credits"],"summary":"Deduct","operationId":"deduct_credits__user_id__deduct_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_deduct_credits__user_id__deduct_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/{user_id}/change":{"post":{"tags":["credits"],"summary":"Change","description":"One form for all three changes: give (or grant), take back, deduct.","operationId":"change_credits__user_id__change_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_change_credits__user_id__change_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/credits/usage.csv":{"get":{"tags":["credits"],"summary":"Usage Csv","description":"One row per user: credits used by calls in the period, for billing each admin's team.","operationId":"usage_csv_credits_usage_csv_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voice-credits/resume":{"post":{"tags":["credits"],"summary":"Voice Credits Resume","description":"Super admin: credits were added in ElevenLabs, allow calls again. If the account is still empty, the next\ncall fails within seconds and calls pause again on their own.","operationId":"voice_credits_resume_voice_credits_resume_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/voice-credits/check":{"post":{"tags":["credits"],"summary":"Voice Credits Check","description":"Super admin: read the ElevenLabs balance now instead of waiting for the 5-minute check.","operationId":"voice_credits_check_voice_credits_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tickets":{"get":{"tags":["tickets"],"summary":"Tickets Page","operationId":"tickets_page_tickets_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"open","title":"Status"}},{"name":"box","in":"query","required":false,"schema":{"type":"string","default":"","title":"Box"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tickets"],"summary":"Create Ticket","operationId":"create_ticket_tickets_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_ticket_tickets_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tickets/{ticket_id}":{"get":{"tags":["tickets"],"summary":"Ticket Page","operationId":"ticket_page_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tickets/{ticket_id}/reply":{"post":{"tags":["tickets"],"summary":"Reply","operationId":"reply_tickets__ticket_id__reply_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reply_tickets__ticket_id__reply_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tickets/{ticket_id}/status":{"post":{"tags":["tickets"],"summary":"Set Status","operationId":"set_status_tickets__ticket_id__status_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_status_tickets__ticket_id__status_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tickets/{ticket_id}/approve":{"post":{"tags":["tickets"],"summary":"Approve Credits","operationId":"approve_credits_tickets__ticket_id__approve_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_approve_credits_tickets__ticket_id__approve_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tickets/{ticket_id}/decline":{"post":{"tags":["tickets"],"summary":"Decline Credits","operationId":"decline_credits_tickets__ticket_id__decline_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_decline_credits_tickets__ticket_id__decline_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/company":{"get":{"tags":["company"],"summary":"My Company","operationId":"my_company_company_get","parameters":[{"name":"saved","in":"query","required":false,"schema":{"type":"string","default":"","title":"Saved"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["company"],"summary":"Save My Company","operationId":"save_my_company_company_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/companies":{"get":{"tags":["company"],"summary":"Companies Page","operationId":"companies_page_companies_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/companies/{company_id}":{"get":{"tags":["company"],"summary":"Company Detail","operationId":"company_detail_companies__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"saved","in":"query","required":false,"schema":{"type":"string","default":"","title":"Saved"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["company"],"summary":"Save Company","operationId":"save_company_companies__company_id__post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/verify":{"post":{"tags":["company"],"summary":"Verify Company","operationId":"verify_company_companies__company_id__verify_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_verify_company_companies__company_id__verify_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp":{"get":{"tags":["whatsapp"],"summary":"Inbox","operationId":"inbox_whatsapp_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"unread","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Unread"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/start":{"post":{"tags":["whatsapp"],"summary":"Start","description":"Open (or create) the thread for a lead this person has talked with, on their own account.","operationId":"start_whatsapp_start_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_start_whatsapp_start_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/{conv_id}":{"get":{"tags":["whatsapp"],"summary":"Thread","operationId":"thread_whatsapp__conv_id__get","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"integer","title":"Conv Id"}},{"name":"call","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Call"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/{conv_id}/template":{"post":{"tags":["whatsapp"],"summary":"Send Template","operationId":"send_template_whatsapp__conv_id__template_post","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"integer","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp/{conv_id}/text":{"post":{"tags":["whatsapp"],"summary":"Send Text","operationId":"send_text_whatsapp__conv_id__text_post","parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"integer","title":"Conv Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_send_text_whatsapp__conv_id__text_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-templates":{"get":{"tags":["whatsapp"],"summary":"Old Templates Page","operationId":"old_templates_page_whatsapp_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp-settings":{"get":{"tags":["whatsapp"],"summary":"Settings Page","operationId":"settings_page_whatsapp_settings_get","parameters":[{"name":"edit","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Edit"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/connect":{"post":{"tags":["whatsapp"],"summary":"Connect","description":"Save (or update) the admin's own WhatsApp account, after checking the details with Meta.","operationId":"connect_whatsapp_settings_connect_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_connect_whatsapp_settings_connect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/for-admin":{"post":{"tags":["whatsapp"],"summary":"Connect For Admin","description":"A super admin connects (or updates) the WhatsApp number of an admin, so the admin and their callers use it.","operationId":"connect_for_admin_whatsapp_settings_for_admin_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_connect_for_admin_whatsapp_settings_for_admin_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/accounts/{acct_id}/disconnect":{"post":{"tags":["whatsapp"],"summary":"Disconnect For Admin","operationId":"disconnect_for_admin_whatsapp_settings_accounts__acct_id__disconnect_post","parameters":[{"name":"acct_id","in":"path","required":true,"schema":{"type":"integer","title":"Acct Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/staff-alerts":{"post":{"tags":["whatsapp"],"summary":"Save Staff Alerts","description":"Which approved template (StarShield's own number) staff alerts go out with on WhatsApp.","operationId":"save_staff_alerts_whatsapp_settings_staff_alerts_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_save_staff_alerts_whatsapp_settings_staff_alerts_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/odoo-check":{"post":{"tags":["whatsapp"],"summary":"Odoo Check","operationId":"odoo_check_whatsapp_settings_odoo_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp-settings/disconnect":{"post":{"tags":["whatsapp"],"summary":"Disconnect","operationId":"disconnect_whatsapp_settings_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp-settings/sync":{"post":{"tags":["whatsapp"],"summary":"Sync","operationId":"sync_whatsapp_settings_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp-settings/templates/{tpl_id}/media":{"post":{"tags":["whatsapp"],"summary":"Set Media","description":"The file a media-header template sends. action: upload (a file from the computer), link (a public https\nlink straight to the file), meta (import the sample file uploaded with the template on Meta), clear.","operationId":"set_media_whatsapp_settings_templates__tpl_id__media_post","parameters":[{"name":"tpl_id","in":"path","required":true,"schema":{"type":"integer","title":"Tpl Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wa-media/{token}/{name}":{"get":{"tags":["whatsapp"],"summary":"Wa Media File","description":"A template's header file, for WhatsApp to fetch when a template is sent. Public on purpose (Meta can't sign\nin); the long random token in the link is what keeps it private.","operationId":"wa_media_file_wa_media__token___name__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/templates/{tpl_id}/toggle":{"post":{"tags":["whatsapp"],"summary":"Toggle","operationId":"toggle_whatsapp_settings_templates__tpl_id__toggle_post","parameters":[{"name":"tpl_id","in":"path","required":true,"schema":{"type":"integer","title":"Tpl Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/auto-send":{"post":{"tags":["whatsapp"],"summary":"Save Auto Send","description":"Turn the automatic call-summary WhatsApp on or off for the account this person manages.","operationId":"save_auto_send_whatsapp_settings_auto_send_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp-settings/templates/new":{"get":{"tags":["whatsapp"],"summary":"New Template Page","operationId":"new_template_page_whatsapp_settings_templates_new_get","parameters":[{"name":"start","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["whatsapp"],"summary":"Create Template","description":"Submit a new template to Meta for approval.","operationId":"create_template_whatsapp_settings_templates_new_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/whatsapp-settings/templates/{tpl_id}/delete":{"post":{"tags":["whatsapp"],"summary":"Delete Template","operationId":"delete_template_whatsapp_settings_templates__tpl_id__delete_post","parameters":[{"name":"tpl_id","in":"path","required":true,"schema":{"type":"integer","title":"Tpl Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/whatsapp":{"get":{"tags":["whatsapp"],"summary":"Verify House","description":"StarShield's own number. Only used if its replies should come to the portal instead of Odoo.","operationId":"verify_house_webhooks_whatsapp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["whatsapp"],"summary":"House Webhook","operationId":"house_webhook_webhooks_whatsapp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/whatsapp/{key}":{"get":{"tags":["whatsapp"],"summary":"Verify Account","operationId":"verify_account_webhooks_whatsapp__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["whatsapp"],"summary":"Account Webhook","operationId":"account_webhook_webhooks_whatsapp__key__post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automations":{"get":{"tags":["whatsapp"],"summary":"Automations Page","description":"WhatsApp templates sent automatically after calls that match the conditions.","operationId":"automations_page_automations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/whatsapp-settings/followups":{"post":{"tags":["whatsapp"],"summary":"Save Rule","description":"Add a follow-up rule, or change one (rule_id in the form).","operationId":"save_rule_whatsapp_settings_followups_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp-settings/followups/{rule_id}/toggle":{"post":{"tags":["whatsapp"],"summary":"Toggle Rule","operationId":"toggle_rule_whatsapp_settings_followups__rule_id__toggle_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/followups/{rule_id}/delete":{"post":{"tags":["whatsapp"],"summary":"Delete Rule","operationId":"delete_rule_whatsapp_settings_followups__rule_id__delete_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/whatsapp-settings/followups/queue/{fid}/cancel":{"post":{"tags":["whatsapp"],"summary":"Cancel From Settings","operationId":"cancel_from_settings_whatsapp_settings_followups_queue__fid__cancel_post","parameters":[{"name":"fid","in":"path","required":true,"schema":{"type":"integer","title":"Fid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/followups/{fid}/cancel":{"post":{"tags":["whatsapp"],"summary":"Cancel From Call","description":"Anyone who can see the call may stop its scheduled follow-ups (e.g. the lead already said yes).","operationId":"cancel_from_call_calls__call_id__followups__fid__cancel_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"integer","title":"Call Id"}},{"name":"fid","in":"path","required":true,"schema":{"type":"integer","title":"Fid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/numbers":{"get":{"tags":["numbers"],"summary":"Numbers Page","operationId":"numbers_page_numbers_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/numbers/{line_id}/holders":{"post":{"tags":["numbers"],"summary":"Add Holder","description":"Give a number to one more person: an admin (with or without their team) or a single user.","operationId":"add_holder_numbers__line_id__holders_post","parameters":[{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_holder_numbers__line_id__holders_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/numbers/{line_id}/holders/{user_id}/remove":{"post":{"tags":["numbers"],"summary":"Remove Holder","operationId":"remove_holder_numbers__line_id__holders__user_id__remove_post","parameters":[{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/numbers/sync":{"post":{"tags":["numbers"],"summary":"Sync","operationId":"sync_numbers_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/numbers/add":{"post":{"tags":["numbers"],"summary":"Add","operationId":"add_numbers_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_numbers_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/numbers/twilio":{"post":{"tags":["numbers"],"summary":"Add Twilio","description":"Import a Twilio number (usually an international one) into ElevenLabs, then list it here. The Twilio SID\nand token go to ElevenLabs only; the portal never stores them.","operationId":"add_twilio_numbers_twilio_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_twilio_numbers_twilio_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/numbers/{line_id}":{"post":{"tags":["numbers"],"summary":"Assign","description":"Save a number's label and on/off switch (super admin). The older one-owner form fields (admin_id,\nuser_id) still work: they make that admin (with their team), or that one person, the number's only holder.","operationId":"assign_numbers__line_id__post","parameters":[{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events":{"get":{"tags":["events"],"summary":"Events Page","operationId":"events_page_events_get","parameters":[{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"upcoming","title":"Show"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/agent/publish":{"post":{"tags":["events"],"summary":"Publish Agent","operationId":"publish_agent_events_agent_publish_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/events/new":{"get":{"tags":["events"],"summary":"New Event","operationId":"new_event_events_new_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["events"],"summary":"Create Event","operationId":"create_event_events_new_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_event_events_new_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/edit":{"get":{"tags":["events"],"summary":"Edit Event","operationId":"edit_event_events__event_id__edit_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["events"],"summary":"Update Event","operationId":"update_event_events__event_id__edit_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_event_events__event_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/archive":{"post":{"tags":["events"],"summary":"Archive Event","operationId":"archive_event_events__event_id__archive_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}":{"get":{"tags":["events"],"summary":"Event Page","operationId":"event_page_events__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}},{"name":"response","in":"query","required":false,"schema":{"type":"string","default":"","title":"Response"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/call":{"post":{"tags":["events"],"summary":"Call One","operationId":"call_one_events__event_id__call_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_call_one_events__event_id__call_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/campaign":{"post":{"tags":["events"],"summary":"Campaign","operationId":"campaign_events__event_id__campaign_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_campaign_events__event_id__campaign_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/events/{event_id}/calls.csv":{"get":{"tags":["events"],"summary":"Calls Csv","operationId":"calls_csv_events__event_id__calls_csv_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_add_contact_contacts_new_post":{"properties":{"phone":{"type":"string","title":"Phone"},"name":{"type":"string","title":"Name","default":""},"company":{"type":"string","title":"Company","default":""},"email":{"type":"string","title":"Email","default":""},"city":{"type":"string","title":"City","default":""},"business_type":{"type":"string","title":"Business Type","default":""},"notes":{"type":"string","title":"Notes","default":""},"tags":{"type":"string","title":"Tags","default":""}},"type":"object","required":["phone"],"title":"Body_add_contact_contacts_new_post"},"Body_add_holder_numbers__line_id__holders_post":{"properties":{"user_id":{"type":"string","title":"User Id"},"with_team":{"type":"string","title":"With Team","default":""}},"type":"object","required":["user_id"],"title":"Body_add_holder_numbers__line_id__holders_post"},"Body_add_numbers_add_post":{"properties":{"number":{"type":"string","title":"Number"},"elevenlabs_id":{"type":"string","title":"Elevenlabs Id","default":""},"label":{"type":"string","title":"Label","default":""}},"type":"object","required":["number"],"title":"Body_add_numbers_add_post"},"Body_add_twilio_numbers_twilio_post":{"properties":{"number":{"type":"string","title":"Number"},"label":{"type":"string","title":"Label","default":""},"sid":{"type":"string","title":"Sid"},"token":{"type":"string","title":"Token"}},"type":"object","required":["number","sid","token"],"title":"Body_add_twilio_numbers_twilio_post"},"Body_approve_agent_agents__slug__approve_post":{"properties":{"note":{"type":"string","title":"Note","default":""}},"type":"object","title":"Body_approve_agent_agents__slug__approve_post"},"Body_approve_credits_tickets__ticket_id__approve_post":{"properties":{"amount":{"type":"string","title":"Amount"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["amount"],"title":"Body_approve_credits_tickets__ticket_id__approve_post"},"Body_assign_contact_contacts__contact_id__assign_post":{"properties":{"assignee_id":{"type":"string","title":"Assignee Id","default":""}},"type":"object","title":"Body_assign_contact_contacts__contact_id__assign_post"},"Body_assign_one_calls__call_id__assign_post":{"properties":{"assignee_id":{"type":"string","title":"Assignee Id","default":""}},"type":"object","title":"Body_assign_one_calls__call_id__assign_post"},"Body_call_one_events__event_id__call_post":{"properties":{"to_number":{"type":"string","title":"To Number"},"customer_name":{"type":"string","title":"Customer Name","default":""},"company_name":{"type":"string","title":"Company Name","default":""},"language":{"type":"string","title":"Language","default":""},"voice_id":{"type":"string","title":"Voice Id","default":""},"line_id":{"type":"string","title":"Line Id","default":""}},"type":"object","required":["to_number"],"title":"Body_call_one_events__event_id__call_post"},"Body_campaign_api_campaigns__category_slug__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_campaign_api_campaigns__category_slug__post"},"Body_campaign_events__event_id__campaign_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"line_id":{"type":"string","title":"Line Id","default":""},"language":{"type":"string","title":"Language","default":""},"voice_id":{"type":"string","title":"Voice Id","default":""}},"type":"object","required":["file"],"title":"Body_campaign_events__event_id__campaign_post"},"Body_change_credits__user_id__change_post":{"properties":{"action":{"type":"string","title":"Action"},"amount":{"type":"string","title":"Amount"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["action","amount"],"title":"Body_change_credits__user_id__change_post"},"Body_change_own_password_account_password_post":{"properties":{"current":{"type":"string","title":"Current"},"password":{"type":"string","title":"Password"},"confirm":{"type":"string","title":"Confirm"},"code":{"type":"string","title":"Code","default":""}},"type":"object","required":["current","password","confirm"],"title":"Body_change_own_password_account_password_post"},"Body_connect_for_admin_whatsapp_settings_for_admin_post":{"properties":{"admin_id":{"type":"integer","title":"Admin Id"},"phone_line_id":{"type":"string","title":"Phone Line Id","default":""},"phone_number_id":{"type":"string","title":"Phone Number Id"},"business_account_id":{"type":"string","title":"Business Account Id","default":""},"token":{"type":"string","title":"Token","default":""},"app_secret":{"type":"string","title":"App Secret","default":""},"label":{"type":"string","title":"Label","default":""}},"type":"object","required":["admin_id","phone_number_id"],"title":"Body_connect_for_admin_whatsapp_settings_for_admin_post"},"Body_connect_whatsapp_settings_connect_post":{"properties":{"phone_number_id":{"type":"string","title":"Phone Number Id"},"business_account_id":{"type":"string","title":"Business Account Id","default":""},"token":{"type":"string","title":"Token","default":""},"app_secret":{"type":"string","title":"App Secret","default":""},"label":{"type":"string","title":"Label","default":""}},"type":"object","required":["phone_number_id"],"title":"Body_connect_whatsapp_settings_connect_post"},"Body_create_event_events_new_post":{"properties":{"script_file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Script File"}},"type":"object","title":"Body_create_event_events_new_post"},"Body_create_ticket_tickets_post":{"properties":{"kind":{"type":"string","title":"Kind","default":"support"},"category":{"type":"string","title":"Category","default":"other"},"subject":{"type":"string","title":"Subject","default":""},"body":{"type":"string","title":"Body","default":""},"priority":{"type":"string","title":"Priority","default":"normal"},"credits":{"type":"string","title":"Credits","default":""},"send_to":{"type":"string","title":"Send To","default":"admin"}},"type":"object","title":"Body_create_ticket_tickets_post"},"Body_create_user_users_post":{"properties":{"username":{"type":"string","title":"Username"},"full_name":{"type":"string","title":"Full Name","default":""},"role":{"type":"string","title":"Role","default":"caller"},"password":{"type":"string","title":"Password","default":""},"agent_ids":{"items":{"type":"integer"},"type":"array","title":"Agent Ids","default":[]},"manager_id":{"type":"string","title":"Manager Id","default":""},"email":{"type":"string","title":"Email","default":""},"phone":{"type":"string","title":"Phone","default":""},"send_email":{"type":"string","title":"Send Email","default":""},"send_whatsapp":{"type":"string","title":"Send Whatsapp","default":""},"keep_password":{"type":"string","title":"Keep Password","default":""}},"type":"object","required":["username"],"title":"Body_create_user_users_post"},"Body_daily_send_reports_daily_send_post":{"properties":{"day":{"type":"string","title":"Day","default":""}},"type":"object","title":"Body_daily_send_reports_daily_send_post"},"Body_decline_credits_tickets__ticket_id__decline_post":{"properties":{"note":{"type":"string","title":"Note","default":""}},"type":"object","title":"Body_decline_credits_tickets__ticket_id__decline_post"},"Body_deduct_credits__user_id__deduct_post":{"properties":{"amount":{"type":"string","title":"Amount"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["amount"],"title":"Body_deduct_credits__user_id__deduct_post"},"Body_delete_user_users__user_id__delete_post":{"properties":{"confirm":{"type":"string","title":"Confirm","default":""},"move_callers_to":{"type":"string","title":"Move Callers To","default":""}},"type":"object","title":"Body_delete_user_users__user_id__delete_post"},"Body_disable_2fa_account_2fa_disable_post":{"properties":{"password":{"type":"string","title":"Password"},"code":{"type":"string","title":"Code"}},"type":"object","required":["password","code"],"title":"Body_disable_2fa_account_2fa_disable_post"},"Body_enable_2fa_account_2fa_enable_post":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"Body_enable_2fa_account_2fa_enable_post"},"Body_give_credits__user_id__give_post":{"properties":{"amount":{"type":"string","title":"Amount"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["amount"],"title":"Body_give_credits__user_id__give_post"},"Body_import_contacts_contacts_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"agent":{"type":"string","title":"Agent","default":""}},"type":"object","required":["file"],"title":"Body_import_contacts_contacts_import_post"},"Body_login_login_post":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","password"],"title":"Body_login_login_post"},"Body_mixed_campaign_api_campaigns_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_mixed_campaign_api_campaigns_post"},"Body_portal_call_agents__slug__call_post":{"properties":{"to_number":{"type":"string","title":"To Number"},"customer_name":{"type":"string","title":"Customer Name","default":""},"company_name":{"type":"string","title":"Company Name","default":""},"language":{"type":"string","title":"Language","default":""},"business_type":{"type":"string","title":"Business Type","default":""},"voice_id":{"type":"string","title":"Voice Id","default":""},"line_id":{"type":"string","title":"Line Id","default":""}},"type":"object","required":["to_number"],"title":"Body_portal_call_agents__slug__call_post"},"Body_portal_campaign_agents__slug__campaign_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"line_id":{"type":"string","title":"Line Id","default":""},"language":{"type":"string","title":"Language","default":""},"voice_id":{"type":"string","title":"Voice Id","default":""}},"type":"object","required":["file"],"title":"Body_portal_campaign_agents__slug__campaign_post"},"Body_portal_mixed_campaign_campaigns_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"line_id":{"type":"string","title":"Line Id","default":""},"language":{"type":"string","title":"Language","default":""},"voice_id":{"type":"string","title":"Voice Id","default":""}},"type":"object","required":["file"],"title":"Body_portal_mixed_campaign_campaigns_post"},"Body_reject_agent_agents__slug__reject_post":{"properties":{"note":{"type":"string","title":"Note","default":""}},"type":"object","title":"Body_reject_agent_agents__slug__reject_post"},"Body_reply_tickets__ticket_id__reply_post":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"Body_reply_tickets__ticket_id__reply_post"},"Body_reset_password_users__user_id__password_post":{"properties":{"password":{"type":"string","title":"Password","default":""},"send_email":{"type":"string","title":"Send Email","default":""},"send_whatsapp":{"type":"string","title":"Send Whatsapp","default":""},"keep_password":{"type":"string","title":"Keep Password","default":""}},"type":"object","title":"Body_reset_password_users__user_id__password_post"},"Body_save_staff_alerts_whatsapp_settings_staff_alerts_post":{"properties":{"template_id":{"type":"string","title":"Template Id","default":""}},"type":"object","title":"Body_save_staff_alerts_whatsapp_settings_staff_alerts_post"},"Body_send_all_now_reports_daily_send_all_post":{"properties":{"back":{"type":"string","title":"Back","default":"/reports"}},"type":"object","title":"Body_send_all_now_reports_daily_send_all_post"},"Body_send_text_whatsapp__conv_id__text_post":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"Body_send_text_whatsapp__conv_id__text_post"},"Body_set_status_tickets__ticket_id__status_post":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"Body_set_status_tickets__ticket_id__status_post"},"Body_set_team_users__user_id__team_post":{"properties":{"manager_id":{"type":"string","title":"Manager Id","default":""}},"type":"object","title":"Body_set_team_users__user_id__team_post"},"Body_set_user_daily_users__user_id__daily_report_post":{"properties":{"by_email":{"type":"string","title":"By Email","default":""},"by_whatsapp":{"type":"string","title":"By Whatsapp","default":""},"report_time":{"type":"string","title":"Report Time","default":""}},"type":"object","title":"Body_set_user_daily_users__user_id__daily_report_post"},"Body_start_whatsapp_start_post":{"properties":{"call_id":{"type":"integer","title":"Call Id","default":0},"phone":{"type":"string","title":"Phone","default":""}},"type":"object","title":"Body_start_whatsapp_start_post"},"Body_take_back_credits__user_id__take_back_post":{"properties":{"amount":{"type":"string","title":"Amount"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["amount"],"title":"Body_take_back_credits__user_id__take_back_post"},"Body_talk_claim_agents__slug__talk_claim_post":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"}},"type":"object","required":["conversation_id"],"title":"Body_talk_claim_agents__slug__talk_claim_post"},"Body_update_contact_account_contact_post":{"properties":{"email":{"type":"string","title":"Email","default":""},"phone":{"type":"string","title":"Phone","default":""},"notify":{"type":"string","title":"Notify","default":""}},"type":"object","title":"Body_update_contact_account_contact_post"},"Body_update_daily_report_account_daily_report_post":{"properties":{"daily_report_email":{"type":"string","title":"Daily Report Email","default":""},"daily_report_whatsapp":{"type":"string","title":"Daily Report Whatsapp","default":""},"daily_report_time":{"type":"string","title":"Daily Report Time","default":""}},"type":"object","title":"Body_update_daily_report_account_daily_report_post"},"Body_update_event_events__event_id__edit_post":{"properties":{"script_file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Script File"}},"type":"object","title":"Body_update_event_events__event_id__edit_post"},"Body_update_profile_account_profile_post":{"properties":{"full_name":{"type":"string","title":"Full Name","default":""},"job_title":{"type":"string","title":"Job Title","default":""},"remove_photo":{"type":"string","title":"Remove Photo","default":""},"photo":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Photo"}},"type":"object","title":"Body_update_profile_account_profile_post"},"Body_update_user_users__user_id__post":{"properties":{"full_name":{"type":"string","title":"Full Name","default":""},"role":{"type":"string","title":"Role"},"active":{"type":"string","title":"Active","default":""},"agent_ids":{"items":{"type":"integer"},"type":"array","title":"Agent Ids","default":[]},"manager_id":{"type":"string","title":"Manager Id","default":""},"email":{"type":"string","title":"Email","default":""},"phone":{"type":"string","title":"Phone","default":""}},"type":"object","required":["role"],"title":"Body_update_user_users__user_id__post"},"Body_upload_kb_agents__slug__files_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_kb_agents__slug__files_post"},"Body_verify_company_companies__company_id__verify_post":{"properties":{"verified":{"type":"string","title":"Verified","default":""}},"type":"object","title":"Body_verify_company_companies__company_id__verify_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KBQuery":{"properties":{"query":{"type":"string","title":"Query"}},"type":"object","required":["query"],"title":"KBQuery"},"OutboundRequest":{"properties":{"category_slug":{"type":"string","title":"Category Slug"},"to_number":{"type":"string","title":"To Number"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"business_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Type"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"line_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Id"}},"type":"object","required":["category_slug","to_number"],"title":"OutboundRequest"},"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"}}}}