{"openapi":"3.1.0","info":{"title":"Open Voice Shield API","version":"0.1.0"},"paths":{"/auth/config":{"get":{"tags":["auth"],"summary":"Auth Config","description":"Public: what the login/signup screens need to know.","operationId":"auth_config_auth_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfigOut"}}}}}}},"/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Password login. `429 too_many_attempts` (+ `Retry-After`) after `LOGIN_MAX_FAILURES` failures per\n`LOGIN_FAILURE_WINDOW_SEC` from the source IP, or for the e-mail — the per-e-mail limit only rejects\nwrong passwords, so an attacker cannot lock the real owner out; a successful login clears it.\n\nFor an account with 2FA enabled (FEATURES-V3 §4) the password step returns `{twofa_required, login_token,\npasskey_options}` and NO access token: the client must complete `POST /auth/login/passkey` with a\npasskey assertion. Accounts without 2FA are unchanged (password-only).","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login/passkey":{"post":{"tags":["auth"],"summary":"Login Passkey","description":"Second step of a 2FA login (FEATURES-V3 §4): verify the passkey assertion against the single-use\nchallenge carried by `login_token` (from `POST /auth/login`), bump the credential's `sign_count`\nmonotonically (assertion replay is rejected), and issue the normal access token (+ web refresh cookie\nfor `X-Client: web`). A stale/tampered login token or a failed assertion answers 401.","operationId":"login_passkey_auth_login_passkey_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login/passkey/enroll":{"post":{"tags":["auth"],"summary":"Login Passkey Enroll","description":"Finish a member's first 2FA login: verify the passkey registration against the single-use\n``enroll_token`` from `POST /auth/login` (returned when the account has 2FA on but the member had no\npasskey), store the credential bound to that member, and issue their session. This is what lets a\nmember satisfy account 2FA without an admin having to pre-provision a key — no password-only bypass,\nno lockout.","operationId":"login_passkey_enroll_auth_login_passkey_enroll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyEnrollLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","description":"Rotate the refresh cookie and return a new access token. Requires the `ovs_refresh` cookie and the\n`X-Requested-With: XMLHttpRequest` header (CSRF). A token rotated less than 30 s ago (a second browser\ntab refreshing concurrently) is served from the family's current token; an older replay revokes the\nwhole session family.","operationId":"refresh_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke the session behind the refresh cookie (its whole family) and clear the cookie. The access\ntoken of this browser is stateless and stays valid until it expires (`ACCESS_TOKEN_TTL_SEC`, 15 min);\nthe SPA drops it — use `logout-all` to invalidate outstanding access tokens too.","operationId":"logout_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/auth/logout-all":{"post":{"tags":["auth"],"summary":"Logout All","description":"Sign out everywhere: reject every access token issued before now (`sessions_revoked_at`;\none-second `iat` resolution), revoke the refresh tokens and clear this browser's cookie. API keys are\nunaffected. Rejected (403 `impersonation_forbidden`) inside an admin impersonation.\n\nScope (FEATURES-V4 §2): a MEMBER signs only themselves out — their own `customer_users`\n`sessions_revoked_at` is stamped and the refresh family behind this browser's cookie is revoked; the\nother users of the account keep their sessions. An owner / legacy (account) session keeps the\naccount-wide behaviour: every refresh token of the customer and every access token of every user.","operationId":"logout_all_auth_logout_all_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","description":"Set a new password (policy: >= 12 characters, <= 72 bytes), clear `must_change_password` and revoke\nevery other session: refresh tokens of other browsers are revoked and access tokens issued before\nthe change stop working (the current browser keeps its refresh cookie and gets a new access token from\n`POST /auth/refresh`; API keys are unaffected). Rejected (403 `impersonation_forbidden`) inside an\nadmin impersonation — an admin must not change a customer's password.","operationId":"change_password_auth_change_password_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"Current account. During an admin impersonation (FEATURES-V3 §3) `impersonated_by` carries the\nadmin's e-mail so the portal can show a \"viewing as\" banner; None for a normal session.\n\n`role` reports what this SESSION may do, not what `customers.role` says the ACCOUNT is: a member\ninvited into the platform-admin account, and an impersonation of an admin-role account, are both\nrefused by every admin gate (`app.auth.is_platform_admin`). The portal picks its home route and its\nnavigation from this field alone, so reporting the account's column would drop those sessions into\nan admin console where every request answers 403 and nothing navigates back to the customer portal.","operationId":"me_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/passkeys/register/begin":{"post":{"tags":["auth"],"summary":"Passkey Register Begin","description":"WebAuthn registration options for `navigator.credentials.create` (FEATURES-V3 §4). Owner-only\nself-service; rejected inside an admin impersonation (403 `impersonation_forbidden`). The\nsingle-use challenge is carried by the signed `state` token echoed back to /register/complete.","operationId":"passkey_register_begin_auth_passkeys_register_begin_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegisterBeginOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/passkeys/register/complete":{"post":{"tags":["auth"],"summary":"Passkey Register Complete","description":"Verify the attestation, store the credential, and turn on 2FA for the account (FEATURES-V3 §4).\nOwner-only. A duplicate credential (already registered on this platform) is rejected 409.","operationId":"passkey_register_complete_auth_passkeys_register_complete_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRegisterComplete"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/passkeys":{"get":{"tags":["auth"],"summary":"List Passkeys","description":"The account's own passkeys (owner-only) — the credentials that make up its 2FA state.","operationId":"list_passkeys_auth_passkeys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PasskeyOut"},"title":"Response List Passkeys Auth Passkeys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/passkeys/{passkey_id}":{"patch":{"tags":["auth"],"summary":"Rename Passkey","description":"Rename one of the account's own passkeys (owner-only).","operationId":"rename_passkey_auth_passkeys__passkey_id__patch","parameters":[{"name":"passkey_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passkey Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRename"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["auth"],"summary":"Delete Passkey","description":"Remove one of the account's own passkeys (owner-only). Removing the LAST one clears\n`twofa_enabled` (the account falls back to password-only login) — FEATURES-V3 §4. A member's own\ncredential is not reachable here; DELETE /auth/passkeys/members/{user_id} clears that one.","operationId":"delete_passkey_auth_passkeys__passkey_id__delete","parameters":[{"name":"passkey_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Passkey Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/passkeys/members/{user_id}":{"delete":{"tags":["auth"],"summary":"Delete Member Passkey","description":"Clear a member's passkey enrolment (owner-only) so she can enroll a new one at her next login.\n\nA member's credential is created at login (POST /auth/login/passkey/enroll) and nothing else in the\nproduct could reach it: the routes above are account-level, and a member cannot register a second\ncredential of her own. A lost authenticator was therefore final — the only way back in was the owner\ndeleting every account-level passkey, which turns 2FA off for the whole tenant and locks her out\nagain the moment the owner registers a new one.\n\nKeyed by the MEMBER rather than by a credential id, because that is the identity the owner actually\nhas in front of them (the member list) and removing someone's second factor must name whose it is.\n`twofa_enabled` is deliberately untouched — one lost laptop must not downgrade the whole tenant — so\nthe member's next login takes the enrolment branch again. Idempotent: a member with nothing enrolled\nis already in the state this asks for.","operationId":"delete_member_passkey_auth_passkeys_members__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/api-keys":{"post":{"tags":["auth"],"summary":"Create Api Key","description":"Mint an account API key (owner-only).\n\nMinting a customer API key is credential creation: an admin impersonating the customer must not be\nable to create a long-lived key that outlives the impersonation (FEATURES-V3 §3) -> 403. It is also\nowner-only, and the key is bound to the minting web user (0009_security) — a member's key acts with\nthat member's role and dies with them instead of granting silent owner powers.","operationId":"create_api_key_auth_api_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["auth"],"summary":"List Api Keys","operationId":"list_api_keys_auth_api_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyOut"},"title":"Response List Api Keys Auth Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/api-keys/{key_id}":{"delete":{"tags":["auth"],"summary":"Revoke Api Key","description":"Revoke an account API key (owner-only).\n\nRevoking a customer's key is credential management -> blocked inside an impersonation (FEATURES-V3 §3)\nand refused for a member session (403 `owner_required`), which must not be able to cut off the\naccount's integrations.","operationId":"revoke_api_key_auth_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/network-info":{"get":{"tags":["customer"],"summary":"Network Info","description":"FEATURES-V4 s1: the address the customer points their SIP trunk at (guided Network page).","operationId":"network_info_customer_network_info_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkInfoOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai-modes":{"get":{"tags":["customer"],"summary":"Public Ai Modes","description":"The selectable AI tiers and their per-call analysis fees — public, like /plans, so the\nmarketing site's dated pricing snapshot can carry them with provenance.","operationId":"public_ai_modes_ai_modes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PublicAiModeOut"},"type":"array","title":"Response Public Ai Modes Ai Modes Get"}}}}}}},"/plans":{"get":{"tags":["customer"],"summary":"List Plans","operationId":"list_plans_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanOut"},"type":"array","title":"Response List Plans Plans Get"}}}}}}},"/customer/plan":{"post":{"tags":["customer"],"summary":"Change Plan","operationId":"change_plan_customer_plan_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/ips":{"get":{"tags":["customer"],"summary":"List Ips","operationId":"list_ips_customer_ips_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IpOut"},"title":"Response List Ips Customer Ips Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer"],"summary":"Add Ip","operationId":"add_ip_customer_ips_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/ips/{ip_id}":{"patch":{"tags":["customer"],"summary":"Update Ip","description":"Change an entry's label, dial prefix, destination or enabled flag in place: the entry keeps\nadmitting calls throughout (a delete and re-add would refuse them in between). The range itself is\nfixed; moving it is a delete and an add, so the cross-account overlap check runs on the new one.","operationId":"update_ip_customer_ips__ip_id__patch","parameters":[{"name":"ip_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ip Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer"],"summary":"Delete Ip","operationId":"delete_ip_customer_ips__ip_id__delete","parameters":[{"name":"ip_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ip Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/voice-providers":{"get":{"tags":["customer"],"summary":"Supported voice-agent providers","description":"The voice-agent providers a `voice_ai` destination can use, with how each is reached: default\nhost, port and transport, codecs, what the agent identifier is, and whether the agent challenges\nthe INVITE (then a digest credential is stored on the destination).","operationId":"list_voice_providers_customer_voice_providers_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoiceProviderOut"},"title":"Response List Voice Providers Customer Voice Providers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/destinations":{"get":{"tags":["customer"],"summary":"List Destinations","operationId":"list_destinations_customer_destinations_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DestinationOut"},"title":"Response List Destinations Customer Destinations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer"],"summary":"Add Destination","operationId":"add_destination_customer_destinations_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/destinations/{dest_id}":{"patch":{"tags":["customer"],"summary":"Update Destination","operationId":"update_destination_customer_destinations__dest_id__patch","parameters":[{"name":"dest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dest Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer"],"summary":"Delete Destination","operationId":"delete_destination_customer_destinations__dest_id__delete","parameters":[{"name":"dest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dest Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/destinations/{dest_id}/check":{"post":{"tags":["customer"],"summary":"Check a destination now","description":"Send one SIP OPTIONS to the destination and wait for the answer (a few seconds at most). The\nreply updates the monitor fields returned here: monitor_status, monitor_last_code, monitor_rtt_ms\nor monitor_last_error. A destination that answers for the first time gets monitoring switched on.","operationId":"check_destination_customer_destinations__dest_id__check_post","parameters":[{"name":"dest_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dest Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/routing-rules":{"get":{"tags":["customer"],"summary":"List Routing Rules","operationId":"list_routing_rules_customer_routing_rules_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRuleOut"},"title":"Response List Routing Rules Customer Routing Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer"],"summary":"Add Routing Rule","operationId":"add_routing_rule_customer_routing_rules_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/routing-rules/{rule_id}":{"patch":{"tags":["customer"],"summary":"Update Routing Rule","operationId":"update_routing_rule_customer_routing_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer"],"summary":"Delete Routing Rule","operationId":"delete_routing_rule_customer_routing_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/balance":{"get":{"tags":["customer"],"summary":"Balance","operationId":"balance_customer_balance_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/ledger":{"get":{"tags":["customer"],"summary":"Ledger","operationId":"ledger_customer_ledger_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":2147483647,"minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/ai-modes":{"get":{"tags":["customer"],"summary":"List Ai Modes","description":"The selectable AI tiers with their per-call analysis fees — names and prices only, never the\nprovider or model behind a tier (that mapping is the operator's).","operationId":"list_ai_modes_customer_ai_modes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AiModePublicOut"},"title":"Response List Ai Modes Customer Ai Modes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/ai-mode":{"put":{"tags":["customer"],"summary":"Set Ai Mode","description":"Pick the account's AI tier. Applies to calls analyzed from now on; running calls keep the tier\nthey started with.","operationId":"set_ai_mode_customer_ai_mode_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiModeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiModePublicOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/dialer/session":{"post":{"tags":["customer"],"summary":"Create Dialer Session","description":"Mint the short-lived token the portal's web dialer presents on its INVITE over the WSS leg.\nThe token — not the IP whitelist — admits the call; everything else (balance, ports, billing,\nrecording, analysis) treats it exactly like a production call.","operationId":"create_dialer_session_customer_dialer_session_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DialerSessionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DialerSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/webhook":{"put":{"tags":["customer"],"summary":"Set Webhook","operationId":"set_webhook_customer_webhook_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["customer"],"summary":"Get Webhook","operationId":"get_webhook_customer_webhook_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/webhook/test":{"post":{"tags":["customer"],"summary":"Test Webhook","description":"Send one signed `webhook.test` event to the configured URL right now and report the outcome\n(`delivered`, upstream `status_code`, `error`, `latency_ms`). Always `200`; `error` is\n`webhook_not_configured` when no URL/secret is set.","operationId":"test_webhook_customer_webhook_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/tax-id":{"get":{"tags":["customer"],"summary":"Get Tax Id","operationId":"get_tax_id_customer_tax_id_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxIdOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer"],"summary":"Set Tax Id","description":"Set or clear the account's Tax ID / VAT number (free text; shown on invoices and receipts).","operationId":"set_tax_id_customer_tax_id_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxIdUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxIdOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/data-location":{"get":{"tags":["customer"],"summary":"Get Data Location","operationId":"get_data_location_customer_data_location_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataLocationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer"],"summary":"Set Data Location","description":"Choose where the account's media is stored and which region's relay carries its calls. A partial\nupdate; a region is accepted only when the platform has a bucket (data) or a relay (media) there.\nApplies to calls from now on: recordings already stored stay where they are.","operationId":"set_data_location_customer_data_location_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataLocationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataLocationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/low-balance-alert":{"get":{"tags":["customer"],"summary":"Get Low Balance Alert","operationId":"get_low_balance_alert_customer_low_balance_alert_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LowBalanceAlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer"],"summary":"Set Low Balance Alert","description":"Switch the low balance alert on or off and set the threshold (US$). A partial update: only the\nkeys present are written. Arms at once when the balance is at or above the new threshold.","operationId":"set_low_balance_alert_customer_low_balance_alert_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LowBalanceAlertUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LowBalanceAlertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/billing-address":{"get":{"tags":["customer"],"summary":"Get Billing Address","operationId":"get_billing_address_customer_billing_address_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer"],"summary":"Set Billing Address","description":"The billing profile: street address for the invoice \"Bill to\", plus the tax residency that\ndetermines taxation — outside Canada (or unset) = tax exempt; 'CA' applies GST/HST by province\n(an unset CA province bills federal GST 5%).","operationId":"set_billing_address_customer_billing_address_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAddressOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/invoices":{"get":{"tags":["customer"],"summary":"List Invoices","description":"The account's monthly usage invoices, newest first.","operationId":"list_invoices_customer_invoices_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/invoices/{invoice_id}":{"get":{"tags":["customer"],"summary":"Get Invoice","operationId":"get_invoice_customer_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/stats":{"get":{"tags":["customer"],"summary":"Stats","operationId":"stats_customer_stats_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/dashboard":{"get":{"tags":["customer"],"summary":"Customer Dashboard","description":"KPIs for the customer portal dashboard over the last `days` days (UTC calendar days): calls,\nminutes, spend, risk distribution (probability buckets), calls per day, recent high-risk calls\n(probability >= 70), balance and plan.","operationId":"customer_dashboard_customer_dashboard_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":30,"title":"Days"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDashboardOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/live-calls":{"get":{"tags":["customer"],"summary":"Live Calls","description":"This account's in-progress calls (status ringing/active), newest first, for the Live page (V3 §1).\nEach item carries an `elapsed_sec` (now - answered/started) and, once answered, a `remaining_sec`\ncredit countdown; the header shows `active_count` / `ports` / `ports_in_use`. Tenant-scoped: only the\ncaller's own calls are ever returned.","operationId":"live_calls_customer_live_calls_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCallsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/alert-rules":{"get":{"tags":["customer"],"summary":"List Alert Rules","operationId":"list_alert_rules_customer_alert_rules_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AlertRuleOut"},"title":"Response List Alert Rules Customer Alert Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer"],"summary":"Create Alert Rule","operationId":"create_alert_rule_customer_alert_rules_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/alert-rules/{rule_id}":{"patch":{"tags":["customer"],"summary":"Update Alert Rule","operationId":"update_alert_rule_customer_alert_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer"],"summary":"Delete Alert Rule","operationId":"delete_alert_rule_customer_alert_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/alert-rules/{rule_id}/test":{"post":{"tags":["customer"],"summary":"Test Alert Rule","description":"Send a sample alert the way the rule delivers: an email to its recipients (or the account\nemail) through the global SMTP config, and the connection-test message to each of its channels.\n``409`` only when nothing can be tried (email on but SMTP unconfigured and no channels; or the\nrule has no delivery at all).","operationId":"test_alert_rule_customer_alert_rules__rule_id__test_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/terms/accept":{"post":{"tags":["customer"],"summary":"Accept Terms","description":"The account's owner accepts the Terms of Service in force, from the portal prompt an account\ngets while ``terms_version`` differs from TERMS_VERSION. A person signed into the portal only (not an\nAPI key, an agent or an impersonating admin), and the owner only: the terms bind the business.","operationId":"accept_terms_customer_terms_accept_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAccept"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAccepted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/profile":{"get":{"tags":["customer"],"summary":"Get Profile","description":"FEATURES-V7 §2 — the account's OWN qualification answers (owner or member). A customer never\nsees another account's profile: the row is the one the session authenticated against.","operationId":"get_profile_customer_profile_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer"],"summary":"Update Profile","description":"FEATURES-V7 §2 — partial patch of the account profile, or `skipped: true` to only stamp\n`profile_completed_at` so the onboarding step stops asking (§3).\n\nOwner OR member may call it (this is account context every user has), nothing is ever required,\nevery value is accepted as free text, and the change is audited against the ACTING web user.","operationId":"update_profile_customer_profile_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/events":{"post":{"tags":["customer"],"summary":"Report Events","description":"The portal reports what the account did in the browser: pages viewed (`page_view`, props\n`{path}`) and features used (`feature_used`, props `{name}`). Only those two names are accepted;\nthe API records every other milestone itself. Up to 50 per call; nothing is returned but a count.\n\nThis feeds the operator's Growth page (which pages new accounts visit, which features they use).\nIt stores the portal path, never query strings, form values or anything typed.","operationId":"report_events_customer_events_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerEventsIn"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Report Events Customer Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/channels":{"get":{"tags":["channels"],"summary":"List Channels","operationId":"list_channels_customer_channels_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationChannelOut"},"title":"Response List Channels Customer Channels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/channels/{channel_id}":{"patch":{"tags":["channels"],"summary":"Update Channel","operationId":"update_channel_customer_channels__channel_id__patch","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["channels"],"summary":"Disconnect Channel","description":"Disconnect: revoke the Slack installation when we hold its token (best effort), drop the channel\nfrom every rule that listed it, delete the row. The rule keeps its other deliveries; a rule left\nwith none at all is disabled rather than left firing into nothing (see below).","operationId":"disconnect_channel_customer_channels__channel_id__delete","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/channels/{channel_id}/test":{"post":{"tags":["channels"],"summary":"Test Channel","operationId":"test_channel_customer_channels__channel_id__test_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelDeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/integrations/slack":{"get":{"tags":["channels"],"summary":"Slack Integration","operationId":"slack_integration_customer_integrations_slack_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackIntegrationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/integrations/slack/connect":{"post":{"tags":["channels"],"summary":"Slack Connect","description":"Start \"Add to Slack\": the authorize URL the portal sends the browser to. The state is a signed,\nshort-lived token naming the customer, so the callback (a bare redirect) can be tied back.","operationId":"slack_connect_customer_integrations_slack_connect_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackConnectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/integrations/slack/webhook":{"post":{"tags":["channels"],"summary":"Slack Connect Webhook","description":"Connect Slack with an incoming-webhook URL the customer created in their own Slack app.","operationId":"slack_connect_webhook_customer_integrations_slack_webhook_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackWebhookConnectIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/integrations":{"get":{"tags":["channels"],"summary":"Admin Integrations","operationId":"admin_integrations_admin_integrations_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["channels"],"summary":"Update Admin Integrations","operationId":"update_admin_integrations_admin_integrations_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/test-calls":{"post":{"tags":["test-calls"],"summary":"Create Test Call","description":"Queue a test call. The platform dials ``number`` through ``destination_id`` (or your default\ndestination), opens with the automated-test-call announcement, plays the chosen speech sample\nfor ``seconds``, then hangs up. Billed per second like any call. ``caller_id`` must be one of the\naccount's verified numbers (default: the platform's own number); ``scam_sample`` and ``agent``\nmay only call a verified number. A request made by an AI agent comes back ``awaiting_confirm``\nwith a ``confirm_url``: nothing rings until a person confirms it there. ``202`` with the test\ncall to poll; ``409`` when no destination exists or too many test calls are already queued;\n``422`` for an unknown speech sample or an unverified number.","operationId":"create_test_call_customer_test_calls_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["test-calls"],"summary":"List Test Calls","operationId":"list_test_calls_customer_test_calls_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TestCallOut"},"title":"Response List Test Calls Customer Test Calls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/test-calls/{test_call_id}/confirm":{"post":{"tags":["test-calls"],"summary":"Confirm Test Call","description":"A person authorises a test call an agent asked for: it is queued and rings within seconds.\nOnly a portal session may do this (never an API key, a connector's token or the MCP endpoint),\nand only while the request is fresh. ``409`` when it is no longer awaiting confirmation.","operationId":"confirm_test_call_customer_test_calls__test_call_id__confirm_post","parameters":[{"name":"test_call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/test-calls/{test_call_id}/cancel":{"post":{"tags":["test-calls"],"summary":"Cancel Test Call","description":"Withdraw a test call that is still awaiting confirmation. Anyone on the account may cancel.","operationId":"cancel_test_call_customer_test_calls__test_call_id__cancel_post","parameters":[{"name":"test_call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/test-calls/{test_call_id}":{"get":{"tags":["test-calls"],"summary":"Get Test Call","operationId":"get_test_call_customer_test_calls__test_call_id__get","parameters":[{"name":"test_call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCallOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/verified-numbers":{"get":{"tags":["test-calls"],"summary":"List Verified Numbers","description":"The numbers this account may present as a test call's caller ID and play the scam sample or an\nagent to: numbers verified by a code call, and hosted numbers that passed their pointing test.","operationId":"list_verified_numbers_customer_verified_numbers_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VerifiedNumberOut"},"title":"Response List Verified Numbers Customer Verified Numbers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["test-calls"],"summary":"Start Number Verification","description":"Verify a number: the platform calls it through one of your destinations, opens with the\nautomated-call announcement and speaks a six-digit code; type the code into POST .../verify.\nPortal session only: an agent can neither ring a number to verify it nor read the code.","operationId":"start_number_verification_customer_verified_numbers_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedNumberCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/verified-numbers/{number_id}/verify":{"post":{"tags":["test-calls"],"summary":"Check Number Verification","description":"The code the verification call spoke. Five tries per call; the code lapses after ten minutes.","operationId":"check_number_verification_customer_verified_numbers__number_id__verify_post","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedNumberCode"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/verified-numbers/{number_id}":{"delete":{"tags":["test-calls"],"summary":"Remove Verified Number","description":"Stop using a number as a caller ID. Hosted numbers are removed on the Host a number page.","operationId":"remove_verified_number_customer_verified_numbers__number_id__delete","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"get":{"tags":["mcp"],"summary":"Mcp Info","description":"Streamable HTTP clients open GET for a server-initiated event stream; this server has none and says\nso with 405 as the specification requires. Anyone else (a browser, curl, an agent orienting itself)\ngets a pointer: how to talk to this MCP server.","operationId":"mcp_info_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["mcp"],"summary":"Mcp Rpc","operationId":"mcp_rpc_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["mcp"],"summary":"Mcp End Session","description":"Streamable HTTP session termination: this server keeps no session, so there is nothing to end.","operationId":"mcp_end_session_mcp_delete","responses":{"204":{"description":"Successful Response"}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth"],"summary":"Authorization Server Metadata","description":"RFC 8414 authorization server metadata for the MCP endpoint's OAuth flow.","operationId":"authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["oauth"],"summary":"Protected Resource Metadata","description":"RFC 9728 protected resource metadata: which authorization server guards /api/mcp.","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/register":{"post":{"tags":["oauth"],"summary":"Register","description":"RFC 7591 dynamic client registration. Public clients (token_endpoint_auth_method none) get an\nid; confidential ones get a secret shown once. S256 PKCE is required of every client.","operationId":"register_oauth_register_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"tags":["oauth"],"summary":"Authorize","description":"The consent page: sign in (or create an account) to let the client use the account. Client and\nredirect URI problems are shown here and never redirected; other errors go back to the client.","operationId":"authorize_oauth_authorize_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["oauth"],"summary":"Authorize Decision","description":"The consent form: sign in or create the account, then redirect to the client with a code.","operationId":"authorize_decision_oauth_authorize_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/token":{"post":{"tags":["oauth"],"summary":"Token","description":"authorization_code (S256 PKCE required, single use) and refresh_token (rotated) grants.\napplication/x-www-form-urlencoded per RFC 6749; errors use its codes (invalid_grant, invalid_client).","operationId":"token_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/revoke":{"post":{"tags":["oauth"],"summary":"Revoke","description":"RFC 7009: revoke a refresh token (its whole family). Always 200 for a well-formed request.","operationId":"revoke_oauth_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/calls/keywords":{"get":{"tags":["calls"],"summary":"Popular Keywords","description":"The keywords the analyses of your recent calls carry most often (lower-cased, with how many calls\ncarry each), newest 5,000 analysed calls in the window. The calls page offers them as one-click filters.","operationId":"popular_keywords_calls_keywords_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":12,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeywordCount"},"title":"Response Popular Keywords Calls Keywords Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/entities":{"get":{"tags":["calls"],"summary":"Popular Entities","description":"The entities callers claimed most often on your recent calls (a bank, a retailer, an agency), with\nhow many calls named each. Unknown or empty entities are left out.","operationId":"popular_entities_calls_entities_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":12,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityCount"},"title":"Response Popular Entities Calls Entities Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls":{"get":{"tags":["calls"],"summary":"List Calls","operationId":"list_calls_calls_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"analysis_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Status"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"min_probability","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Min Probability"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Id"}},{"name":"origin","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"\"sip\" (your switch), \"dialer\" (the web dialer) or \"test\" (an API test call)","title":"Origin"},"description":"\"sip\" (your switch), \"dialer\" (the web dialer) or \"test\" (an API test call)"},{"name":"sip_call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"exact SIP Call-ID","title":"Sip Call Id"},"description":"exact SIP Call-ID"},{"name":"sampled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"false = calls the destination's sampling policy left out (recorded, not analysed)","title":"Sampled"},"description":"false = calls the destination's sampling policy left out (recorded, not analysed)"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"search: dialed / ANI / customer ref, and the analysis title, entity, category and keywords","title":"Q"},"description":"search: dialed / ANI / customer ref, and the analysis title, entity, category and keywords"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":48},{"type":"null"}],"description":"the analysis category, exactly","title":"Category"},"description":"the analysis category, exactly"},{"name":"recommendation","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(allow|review|block)$"},{"type":"null"}],"title":"Recommendation"}},{"name":"destination_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"calls routed to this destination","title":"Destination Id"},"description":"calls routed to this destination"},{"name":"route_alert","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true = only calls whose analysis raised a route alert","title":"Route Alert"},"description":"true = only calls whose analysis raised a route alert"},{"name":"entity","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"the entity the caller claimed, exactly","title":"Entity"},"description":"the entity the caller claimed, exactly"},{"name":"sub_customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"the sub-customer a whitelist dial prefix attributed the call to","title":"Sub Customer"},"description":"the sub-customer a whitelist dial prefix attributed the call to"},{"name":"keyword","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"an exact keyword of the analysis, case-insensitive; repeat for calls carrying all of them","title":"Keyword"},"description":"an exact keyword of the analysis, case-insensitive; repeat for calls carrying all of them"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(started_at|duration_sec|probability|dialed|ani|charged_amount):(asc|desc)$"},{"type":"null"}],"description":"key:asc|desc, applied over every matching call","title":"Sort"},"description":"key:asc|desc, applied over every matching call"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":2147483647,"minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}":{"get":{"tags":["calls"],"summary":"Get Call","operationId":"get_call_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/analyze":{"post":{"tags":["calls"],"summary":"Analyze Call","description":"Analyse a recorded call on demand (GitHub #2): a call the destination's sampling policy left\nout, or a record-only call, gets the full treatment now (transcription + analysis, the analysis fee\napplies). Runs the pipeline with `force`, so the record-only / not-sampled gate is bypassed.","operationId":"analyze_call_calls__call_id__analyze_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeQueued"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/transfer":{"post":{"tags":["calls"],"summary":"Transfer Call","description":"Transfer a live call that is on a voice agent to a number (GitHub #9). The platform asks the\nagent's provider to transfer the call; the provider sends the transfer request on the agent leg\nand the platform carries it out the way the destination says: it places the new call itself and\nbridges the caller (`transfer_mode` platform, the default) or hands the SIP REFER to the caller's\nswitch. The outcome appears on the call as `transfer_status` within seconds. Only a call that is\nup on a Voice AI destination with a stored provider API key can be transferred; the target must\nbe a number.","operationId":"transfer_call_calls__call_id__transfer_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferQueued"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/analysis":{"get":{"tags":["calls"],"summary":"Get Analysis","operationId":"get_analysis_calls__call_id__analysis_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/transcript":{"get":{"tags":["calls"],"summary":"Get Transcript","operationId":"get_transcript_calls__call_id__transcript_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/recording":{"get":{"tags":["calls"],"summary":"Get Recording","description":"The stereo WAV of the call. Local file -> the file; remote storage (`s3://`, docs/SCALING.md) ->\n`307` to a presigned URL when `STORAGE_PRESIGN` is on, except for browser fetches from the web portal\n(`X-Client: web` / `Sec-Fetch-Mode`), which are always streamed through the API because the portal's\nCSP (`connect-src 'self'`) and the bucket's CORS policy would block a cross-origin redirect. `404`\nwhen no recording exists (any more). A platform admin may fetch any call's recording (the admin\ncall detail plays it back like the customer portal does); that access is written to the audit log.\n\nHonours `Range`, and says so with `Accept-Ranges`. The player depends on it: a media element cannot\nsend an Authorization header, so it authenticates with a `t` media token (see the sibling\n`/recording-token` route) and then streams, which is why the portal no longer waits for a whole\n19 MB download before the first second of audio.","operationId":"get_recording_calls__call_id__recording_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"T"}},{"name":"X-Client","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"X-Client"}},{"name":"Range","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/recording-token":{"get":{"tags":["calls"],"summary":"Get Recording Token","description":"A short-lived URL the portal's audio player can load directly.\n\nA media element cannot carry an Authorization header, which is why the player used to download the\nwhole recording with fetch() and play it from a blob: no sound until the last byte, no seeking, and\na fresh download on every replay. This hands it a URL instead, scoped to this one call and this one\naccount and good for half an hour, so the browser streams and seeks by range like any other audio.","operationId":"get_recording_token_calls__call_id__recording_token_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaTokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/sip-log":{"get":{"tags":["calls"],"summary":"Get Sip Log","description":"The SIP message flow of the call (kamailio siptrace rows correlated by the SIP Call-ID):\nstructured rows plus a preformatted text log for the copy/download button. A call from before\ntracing was enabled (or whose rows retention pruned) yields an empty flow, not a 404.","operationId":"get_sip_log_calls__call_id__sip_log_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipLogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/inspect":{"get":{"tags":["calls"],"summary":"Get Inspect","description":"The live line inspector's payload (the panel a lit port opens on the Live page): the call,\nthe SIP ladder so far, signalling timings derived live from the trace, the media relay's\nper-leg statistics while the call is up, and after hang-up the pipeline state, the measured\nquality and the verdict. Polled every couple of seconds while the panel is open; tenant-scoped,\nwith a platform admin admitted like the SIP log.","operationId":"get_inspect_calls__call_id__inspect_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInspectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/pcap":{"get":{"tags":["calls"],"summary":"Get Pcap","description":"The rtpengine media pcap(s) of the call: the single file directly, a zip when the call has\nseveral (one per media leg), `404` once decode/offload/retention removed them.","operationId":"get_pcap_calls__call_id__pcap_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/export":{"get":{"tags":["calls"],"summary":"Export Call","description":"Stream the offline evidence bundle for this call (FEATURES-V5 §5): a single self-contained zip\n(branded printable `report.html`, `analysis.json`, `transcript.txt`, `recording.wav`,\n`sip-log.txt`, `media/*.pcap`, `README.txt`) that opens days later with no account and no network.\n\nAn ADMIN bundle carries the STT/AI provider + model names and the commercial block; a CUSTOMER\nbundle carries neither (only where each stage ran). A missing artefact is noted in the report and\nthe README — never a 500.","operationId":"export_call_calls__call_id__export_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/report.pdf":{"get":{"tags":["calls"],"summary":"Export Call Pdf","description":"The call as a PDF report with the brand mark: the route alert first when there is one, the\ncall facts, the verdict, red flags, TCPA comment and transcript. What you attach to a vendor\ndispute or hand a client. Same audience rules as the bundle: a customer report never names a\nprovider or a model. Shares the export rate limit.","operationId":"export_call_pdf_calls__call_id__report_pdf_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/share":{"post":{"tags":["calls"],"summary":"Create Share","description":"Create a password-protected public link to this call (FEATURES-V5 §1). The server GENERATES the\npassword and returns it EXACTLY ONCE — only its bcrypt hash is stored, so it can never be shown\nagain (rotate to get a new one).","operationId":"create_share_calls__call_id__share_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallShareCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/{call_id}/shares":{"get":{"tags":["calls"],"summary":"List Shares","description":"Existing links for the call. Never carries the password (it exists only as a bcrypt hash).","operationId":"list_shares_calls__call_id__shares_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallShareList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/shares/{share_id}":{"delete":{"tags":["calls"],"summary":"Revoke Share","description":"Revoke a link — it dies immediately (unlock 401s, the content endpoints 404).","operationId":"revoke_share_calls_shares__share_id__delete","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallShareOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calls/shares/{share_id}/rotate":{"post":{"tags":["calls"],"summary":"Rotate Share Password","description":"New password for the SAME link, returned once. Outstanding view tokens keep working until they\nexpire (30 min); revoke instead when the link itself must die.","operationId":"rotate_share_password_calls_shares__share_id__rotate_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallShareCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/dashboard":{"get":{"tags":["admin"],"summary":"Admin Dashboard","description":"Platform KPIs over the last `days` days: active calls, calls/minutes, revenue vs provider cost and\nmargin, risk distribution, calls per day, job queue counts, top customers by spend, customer counts\nand the getting-started checklist. Revenue (and hence margin) includes the per-call analysis\nfee (FEATURES-V4 §6) on top of call/overage/plan charges.","operationId":"admin_dashboard_admin_dashboard_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":30,"title":"Days"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDashboardOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/settings":{"get":{"tags":["admin"],"summary":"Get Settings ","description":"Current settings plus `providers.<name>.key_present` (env keys configured, values never returned)\nand `stt_local_available` (faster-whisper importable in this image).","operationId":"get_settings__admin_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Put Settings","operationId":"put_settings_admin_settings_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/system/stats":{"get":{"tags":["admin"],"summary":"Server utilization","description":"CPU, memory, disk and load per worker node over the window: one sample a minute from every\nworker (averaged into coarser buckets when the window holds more than 600 samples per node)\nplus each node's latest sample. Samples are kept NODE_STATS_RETENTION_DAYS.","operationId":"system_stats_admin_system_stats_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":720,"minimum":1,"description":"window ending now, in hours","default":24,"title":"Hours"},"description":"window ending now, in hours"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/growth":{"get":{"tags":["admin"],"summary":"Growth Report","description":"Where signups come from and how far they get. Over the accounts that signed up in the last\n`days`: signups per day, the onboarding funnel (with the median time to each step), signups by\nsource (utm_source, else the referrer host, else direct) and by channel (web, agent, api, admin),\nweekly cohorts, the newest signups with how far each got, and the most viewed pages and used\nfeatures. The funnel is computed from the milestone tables (profile, destinations, IPs, calls,\nledger), so it covers every account, not only those that signed up after events were recorded.","operationId":"growth_report_admin_growth_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":30,"title":"Days"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowthOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/infra/costs":{"get":{"tags":["admin"],"summary":"Infra Costs","description":"What the AWS infrastructure behind this deployment costs: month to date, last month, AWS's\nforecast for the month, the run rate from the last settled days, by service and by day. From\nCost Explorer, which lags up to a day; cached for an hour.","operationId":"infra_costs_admin_infra_costs_get","parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"bypass the hourly cache (each fetch is a billed Cost Explorer request)","default":false,"title":"Refresh"},"description":"bypass the hourly cache (each fetch is a billed Cost Explorer request)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfraCostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/infra/costs/activate-tag":{"post":{"tags":["admin"],"summary":"Infra Costs Activate Tag","description":"Make the deployment's tag (AWS_COST_TAG_KEY) a cost allocation tag, so the cost page can be\nscoped to this deployment's resources on an account that hosts other things. Idempotent;\ntakes effect on cost data from now on (AWS: up to 24 hours).","operationId":"infra_costs_activate_tag_admin_infra_costs_activate_tag_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/settings/stt/models/{model}/download":{"post":{"tags":["admin"],"summary":"Download Local Stt Model","description":"Fetch a faster-whisper size onto this node (the shared /models volume) in the background.\nPoll GET /admin/settings for `stt_local_models` while it runs.","operationId":"download_local_stt_model_admin_settings_stt_models__model__download_post","parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalSttModelsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/settings/stt/models/{model}":{"delete":{"tags":["admin"],"summary":"Remove Local Stt Model","description":"Delete a faster-whisper size from this node's models volume. The configured local model and a\nmodel still downloading are refused (409); download it again at any time.","operationId":"remove_local_stt_model_admin_settings_stt_models__model__delete","parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalSttModelsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/billing":{"get":{"tags":["admin"],"summary":"Get Billing Settings","description":"The `billing` settings group (FEATURES-V4 §6): the per-call analysis fee (0 disables it).","operationId":"get_billing_settings_admin_billing_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Put Billing Settings","operationId":"put_billing_settings_admin_billing_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/invoices/run":{"post":{"tags":["admin"],"summary":"Run Invoices","description":"Generate (and email) the given month's usage invoices for every active customer that lacks one:\nthe manual/backfill counterpart of the worker's monthly run. Idempotent per (customer, month).","operationId":"run_invoices_admin_invoices_run_post","parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","maximum":2100,"minimum":2020,"title":"Year"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","maximum":12,"minimum":1,"title":"Month"}},{"name":"send_email","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Send Email"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/ai-modes":{"get":{"tags":["admin"],"summary":"Get Ai Modes","description":"The customer-selectable AI tier map: per mode, the STT/analysis models and the per-call fee.","operationId":"get_ai_modes_admin_ai_modes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiModesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Put Ai Modes","operationId":"put_ai_modes_admin_ai_modes_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiModesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiModesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/ai-modes/economics":{"get":{"tags":["admin"],"summary":"Ai Modes Economics","description":"Cost against selling price per tier, for one reference call: our cost (the STT model on both\nlegs, the analysis model at the prices in force, compute) against the pay-as-you-go minutes plus\nthe tier's fee; and the same measured on the calls processed under each tier in the last 30 days.","operationId":"ai_modes_economics_admin_ai_modes_economics_get","parameters":[{"name":"minutes","in":"query","required":false,"schema":{"type":"number","maximum":120,"exclusiveMinimum":0,"description":"the reference call length","default":3.0,"title":"Minutes"},"description":"the reference call length"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiModesEconomicsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/settings/test-analysis":{"post":{"tags":["admin"],"summary":"Test Analysis","description":"Run the fraud analysis once on a transcript (CALLER:/CALLEE: labelled lines; default: the built-in\nscam sample) with the currently selected `ai_provider`/`ai_model`, without touching any call. `422`\nwhen the selected provider has no API key (`missing_api_key:<provider>`), `502` when it fails. The\nrun (provider, model, tokens, cost) is written to the audit log as `settings.test_analysis`.","operationId":"test_analysis_admin_settings_test_analysis_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TestAnalysisRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestAnalysisOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/smtp":{"get":{"tags":["admin"],"summary":"Get Smtp","description":"Current global SMTP configuration. The password is never returned — ``password_set`` says whether\none is stored (FEATURES-V2 §1a).","operationId":"get_smtp_admin_smtp_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Put Smtp","description":"Update the SMTP configuration. ``password`` keeps the stored value unless a NON-EMPTY string is\nsent (omitted, null OR an empty string all keep it) — so a normal settings save from the UI, which\nsends no password (or an empty one), never wipes the stored credential. Only a non-empty value replaces\nit. The password is never written to the audit log.","operationId":"put_smtp_admin_smtp_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/smtp/test":{"post":{"tags":["admin"],"summary":"Test Smtp","description":"Send a test email now to ``to`` using the stored SMTP config. Returns ``{sent, error, latency_ms}``;\n``409`` when SMTP is not configured (enabled with host + from address).","operationId":"test_smtp_admin_smtp_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmtpTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/models":{"get":{"tags":["admin"],"summary":"Get Models","description":"Every STT and analysis model with the price in force (the operator's, else the list price).","operationId":"get_models_admin_models_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRegistryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/models/prices":{"put":{"tags":["admin"],"summary":"Put Model Prices","description":"Set what WE pay per model: USD a minute of audio for an STT model, USD per million input and\noutput tokens for an analysis model. Null removes a model's override. The price applies to the\nnext call processed and to the tier economics; a provider that reports its own charge (OpenRouter)\nkeeps recording that.","operationId":"put_model_prices_admin_models_prices_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderPricesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRegistryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers":{"get":{"tags":["admin"],"summary":"List Customers","operationId":"list_customers_admin_customers_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Customer","operationId":"create_customer_admin_customers_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}":{"get":{"tags":["admin"],"summary":"Get Customer","operationId":"get_customer_admin_customers__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin"],"summary":"Patch Customer","operationId":"patch_customer_admin_customers__customer_id__patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/journey":{"get":{"tags":["admin"],"summary":"Customer Journey","description":"One account's path through the product: how it arrived (channel and first-touch attribution),\nwhen it reached each onboarding milestone, and its recorded events (logins, pages viewed,\nfeatures used, things created), newest first.","operationId":"customer_journey_admin_customers__customer_id__journey_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/leads/{lead_id}":{"patch":{"tags":["admin"],"summary":"Update a lead","description":"Move a request from the website's setup-call form along: new, contacted, qualified, won or lost.","operationId":"update_lead_admin_leads__lead_id__patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/onboarding-emails/stop":{"post":{"tags":["admin"],"summary":"Stop onboarding e-mails","description":"The account replied \"stop\" to an onboarding e-mail: send it no more of them\n(services/onboarding_email.py). Recorded on its journey and in the audit log.","operationId":"stop_onboarding_emails_admin_customers__customer_id__onboarding_emails_stop_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/topup":{"post":{"tags":["admin"],"summary":"Topup Customer","operationId":"topup_customer_admin_customers__customer_id__topup_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/pilot":{"post":{"tags":["admin"],"summary":"Start Pilot","description":"Start — or REPLACE — a pilot: a fresh window and a fresh minute counter (V6 §3).","operationId":"start_pilot_admin_customers__customer_id__pilot_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PilotStart"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin"],"summary":"Extend Pilot","description":"Extend the window and/or adjust the cap of an existing pilot; the minute counter is untouched.\nOnly the fields actually sent are applied — `minutes_limit: null` means \"unlimited\" (V6 §3).","operationId":"extend_pilot_admin_customers__customer_id__pilot_patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PilotExtend"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"End Pilot","description":"End the pilot now (`pilot_ends_at = now`). History is kept and nothing is charged retroactively:\nbilling simply resumes with the NEXT call (V6 §2).","operationId":"end_pilot_admin_customers__customer_id__pilot_delete","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/password-reset":{"post":{"tags":["admin"],"summary":"Reset Customer Password","description":"Reset a customer login's password without knowing the current one. Targets the account (owner)\nlogin, or one member when ``user_id`` is given. A strong temporary password is generated unless the\nadmin supplies one; it is returned once and, when ``send_email`` is on, mailed to the login with the\nbranded reset email (delivery never fails the reset). Every session of that login is signed out and,\nby default, a new password is required at the next sign-in. Audited as ``customer.password_reset``;\nthe password itself is never logged.","operationId":"reset_customer_password_admin_customers__customer_id__password_reset_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPasswordReset"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPasswordResetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/login-lock":{"delete":{"tags":["admin"],"summary":"Clear Login Lock","description":"Forget the failed-login counter of the account's e-mail (`LOGIN_MAX_FAILURES` wrong passwords per\n`LOGIN_FAILURE_WINDOW_SEC` answer `429 too_many_attempts` to further wrong passwords). The per-IP\ncounter is not touched: it expires with its window. Audited as `customer.login_unlock`.","operationId":"clear_login_lock_admin_customers__customer_id__login_lock_delete","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/impersonate":{"post":{"tags":["admin"],"summary":"Impersonate Customer","description":"Mint a short-lived customer-scoped access token so the admin can operate the customer portal AS this\ncustomer, without their password (FEATURES-V3 §3). The token carries the admin's id as actor (`act`)\nand `imp=true`: it acts as the customer but is rejected on the admin surface and on the\nchange-password / logout-all / passkey-management routes (403 `impersonation_forbidden`), and never\ngrants admin. No refresh cookie is issued (re-impersonate to extend). Audited as\n`customer.impersonate`.","operationId":"impersonate_customer_admin_customers__customer_id__impersonate_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/ips":{"get":{"tags":["admin"],"summary":"List Ips","description":"Whitelist entries across all customers (a CIDR can only be registered by one account).","operationId":"list_ips_admin_ips_get","parameters":[{"name":"cidr","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"return entries overlapping this CIDR","title":"Cidr"},"description":"return entries overlapping this CIDR"},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminIpOut"},"title":"Response List Ips Admin Ips Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/ips/{ip_id}":{"delete":{"tags":["admin"],"summary":"Delete Ip","description":"Release a whitelist entry of any customer (e.g. an IP that moved to another account).","operationId":"delete_ip_admin_ips__ip_id__delete","parameters":[{"name":"ip_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ip Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans":{"get":{"tags":["admin"],"summary":"Admin List Plans","operationId":"admin_list_plans_admin_plans_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlanOut"},"title":"Response Admin List Plans Admin Plans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Plan","operationId":"create_plan_admin_plans_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans/{code}":{"patch":{"tags":["admin"],"summary":"Update Plan","operationId":"update_plan_admin_plans__code__patch","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/calls/keywords":{"get":{"tags":["admin"],"summary":"Admin Popular Keywords","description":"The keywords recent analyses carry most often, across every customer or for one.","operationId":"admin_popular_keywords_admin_calls_keywords_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":12,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeywordCount"},"title":"Response Admin Popular Keywords Admin Calls Keywords Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/calls/entities":{"get":{"tags":["admin"],"summary":"Admin Popular Entities","description":"The entities callers claimed most often recently, across every customer or for one.","operationId":"admin_popular_entities_admin_calls_entities_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":12,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityCount"},"title":"Response Admin Popular Entities Admin Calls Entities Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/calls":{"get":{"tags":["admin"],"summary":"Admin List Calls","operationId":"admin_list_calls_admin_calls_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"analysis_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Status"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"min_probability","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":0},{"type":"null"}],"title":"Min Probability"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Id"}},{"name":"sampled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"false = calls a sampling policy left out","title":"Sampled"},"description":"false = calls a sampling policy left out"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"search: dialed / ANI / customer ref, and the analysis title, entity, category and keywords","title":"Q"},"description":"search: dialed / ANI / customer ref, and the analysis title, entity, category and keywords"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Category"}},{"name":"recommendation","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(allow|review|block)$"},{"type":"null"}],"title":"Recommendation"}},{"name":"destination_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"calls routed to this destination","title":"Destination Id"},"description":"calls routed to this destination"},{"name":"route_alert","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true = only calls whose analysis raised a route alert","title":"Route Alert"},"description":"true = only calls whose analysis raised a route alert"},{"name":"entity","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"the entity the caller claimed, exactly","title":"Entity"},"description":"the entity the caller claimed, exactly"},{"name":"sub_customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"the sub-customer a whitelist dial prefix attributed the call to","title":"Sub Customer"},"description":"the sub-customer a whitelist dial prefix attributed the call to"},{"name":"keyword","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"an exact keyword, case-insensitive; repeat for calls carrying every one (up to 5)","title":"Keyword"},"description":"an exact keyword, case-insensitive; repeat for calls carrying every one (up to 5)"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(started_at|duration_sec|probability|dialed|ani|charged_amount):(asc|desc)$"},{"type":"null"}],"description":"key:asc|desc over every matching call","title":"Sort"},"description":"key:asc|desc over every matching call"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCallList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-calls":{"get":{"tags":["admin"],"summary":"Admin Live Calls","description":"Every tenant's in-progress calls (status ringing/active), newest first, for the platform Live page\n(V3 §1). Each item adds the owning customer (id, company, email); a `summary` gives the platform\ntotals (active_total, ringing = unanswered, answered) and a per-customer active breakdown. `customer_id`\nfilters to one tenant (the summary is computed over the same filtered set).","operationId":"admin_live_calls_admin_live_calls_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLiveCallsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/calls/{call_id}":{"get":{"tags":["admin"],"summary":"Admin Get Call","operationId":"admin_get_call_admin_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCallDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/calls/{call_id}/reanalyze":{"post":{"tags":["admin"],"summary":"Reanalyze","description":"Force a re-analysis of an answered, finished call. With no body the run uses the current global\nsettings (legacy behaviour). An optional body `{stt_provider?, stt_model?, ai_provider?, ai_model?,\nredo_stt?}` overrides the STT/AI provider+model for THIS run only (never the settings table): an\nunknown pair or a missing API key answers `422` before enqueuing. An AI-only override reuses the\nstored transcript and re-runs just the LLM; an STT override (or `redo_stt`) re-transcribes first.\n`keep_done` semantics are preserved so a failed re-run never downgrades an existing analysis.","operationId":"reanalyze_admin_calls__call_id__reanalyze_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReanalyzeRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reports/usage":{"get":{"tags":["admin"],"summary":"Usage Report","description":"Per-customer usage for `[from, to)`; `format=csv` returns a `text/csv` download instead of JSON.\n\nA date-only `to` is inclusive of that whole day (see `_parse_range_bound`).","operationId":"usage_report_admin_reports_usage_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|csv)$"},{"type":"null"}],"title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/jobs":{"get":{"tags":["admin"],"summary":"List Jobs","operationId":"list_jobs_admin_jobs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/jobs/{job_id}/retry":{"post":{"tags":["admin"],"summary":"Retry Job","operationId":"retry_job_admin_jobs__job_id__retry_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/audit-log":{"get":{"tags":["admin"],"summary":"Audit Log","description":"Who changed what (newest first): settings (incl. `settings.test_analysis` runs), plans, customers,\ntop-ups, login unlocks, whitelist releases, job retries (`job.retry` / `job.retry_skipped`),\nre-analyses. Filters: `action` (e.g. `settings.update`), `actor` (e-mail), `target_type`, `target_id`.","operationId":"audit_log_admin_audit_log_get","parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Action"}},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"actor e-mail","title":"Actor"},"description":"actor e-mail"},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Target Type"}},{"name":"target_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Target Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/health":{"get":{"tags":["internal"],"summary":"Internal Health","operationId":"internal_health_internal_health_get","parameters":[{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/sip/authorize":{"get":{"tags":["internal"],"summary":"Sip Authorize","description":"Always 200; body says allowed/denied so Kamailio can branch without HTTP error handling.","operationId":"sip_authorize_internal_sip_authorize_get","parameters":[{"name":"src_ip","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Src Ip"}},{"name":"call_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"title":"Call Id"}},{"name":"from_user","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"From User"}},{"name":"to_user","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"To User"}},{"name":"from_tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"From Tag"}},{"name":"h_external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"H External Id"}},{"name":"h_external_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"H External Name"}},{"name":"strip","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":0,"default":0,"title":"Strip"}},{"name":"X-OVS-Dialer","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"X-Ovs-Dialer"}},{"name":"X-Node-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"X-Node-Id"}},{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/sip/call-answered":{"post":{"tags":["internal"],"summary":"Sip Call Answered","operationId":"sip_call_answered_internal_sip_call_answered_post","parameters":[{"name":"X-Node-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"X-Node-Id"}},{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAnsweredIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/sip/call-ended":{"post":{"tags":["internal"],"summary":"Sip Call Ended","operationId":"sip_call_ended_internal_sip_call_ended_post","parameters":[{"name":"X-Node-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"X-Node-Id"}},{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallEndedIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/sip/transfer":{"post":{"tags":["internal"],"summary":"Sip Transfer Check","description":"The proxy holds a REFER from the agent leg (GitHub #9): may the agent transfer this call to\n``target``? The Refer-To handed back points at the platform's own ingress, so the transferred\ncall is routed, relayed and recorded like any other.","operationId":"sip_transfer_check_internal_sip_transfer_post","parameters":[{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferCheckIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferCheckOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/sip/call-transfer":{"post":{"tags":["internal"],"summary":"Sip Call Transfer","description":"How far the transfer got: the caller's answer to the REFER (accepted / refused) and the\nNOTIFY it sends when the new call connects or fails (completed / failed).","operationId":"sip_call_transfer_internal_sip_call_transfer_post","parameters":[{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallTransferIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/sip/call-failed":{"post":{"tags":["internal"],"summary":"Sip Call Failed","operationId":"sip_call_failed_internal_sip_call_failed_post","parameters":[{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallFailedIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/sip/ping":{"get":{"tags":["internal"],"summary":"Ping","operationId":"ping_internal_sip_ping_get","parameters":[{"name":"X-Internal-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/users":{"get":{"tags":["customer-users"],"summary":"List Users","description":"All web logins of the account (owner first). Members may look; only owners mutate.","operationId":"list_users_customer_users_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer-users"],"summary":"Invite User","description":"Invite a member (owner-only): generated temporary password + branded welcome email +\n``must_change_password`` (V3 forced-change flow). Max 10 users per customer; the temporary password\nis never returned to the portal — a failed email is fixed with resend-invite.","operationId":"invite_user_customer_users_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserInvite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserInvited"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/users/{user_id}":{"patch":{"tags":["customer-users"],"summary":"Update User","description":"Rename / deactivate / reactivate a user (owner-only). The owner row cannot be deactivated —\nsuspending the whole account is the admin's job.","operationId":"update_user_customer_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/users/{user_id}/resend-invite":{"post":{"tags":["customer-users"],"summary":"Resend Invite","description":"Re-invite a member (owner-only): a NEW temporary password replaces the old one (which stops\nworking immediately), ``must_change_password`` is set again and the welcome email is re-sent.","operationId":"resend_invite_customer_users__user_id__resend_invite_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserInvited"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/users":{"get":{"tags":["customer-users"],"summary":"Admin List Users","description":"Admin view of a customer's web logins (read-only; V4 §2).","operationId":"admin_list_users_admin_customers__customer_id__users_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/users/{user_id}/deactivate":{"post":{"tags":["customer-users"],"summary":"Admin Deactivate User","description":"Deactivate one of a customer's users (idempotent). The owner row cannot be deactivated here —\nsuspend the customer instead.","operationId":"admin_deactivate_user_admin_customers__customer_id__users__user_id__deactivate_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases":{"get":{"tags":["cases"],"summary":"List Cases","operationId":"list_cases_cases_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"}},{"name":"call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["cases"],"summary":"Create Case","operationId":"create_case_cases_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/prefill":{"get":{"tags":["cases"],"summary":"Prefill Case","description":"Suggested fields for the call detail \"Open case\" action (§9): title pre-filled from the\nanalysis (entity + probability), severity from the probability, description from the summary.\n``existing_case_id`` is set when the call already links to a case (the UI shows the link instead).","operationId":"prefill_case_cases_prefill_get","parameters":[{"name":"call_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}":{"get":{"tags":["cases"],"summary":"Get Case","operationId":"get_case_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["cases"],"summary":"Update Case","description":"Status transitions, severity, title/description edits and (un)assignment. Assignment must\nreference an ACTIVE user of the same customer; the new assignee is notified by email.","operationId":"update_case_cases__case_id__patch","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cases/{case_id}/comments":{"post":{"tags":["cases"],"summary":"Add Comment","operationId":"add_comment_cases__case_id__comments_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseCommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseCommentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cases":{"get":{"tags":["cases","admin"],"summary":"Admin List Cases","description":"Global recent cases across all customers (read-only).","operationId":"admin_list_cases_admin_cases_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCaseList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cases/{case_id}":{"get":{"tags":["cases","admin"],"summary":"Admin Get Case","description":"One case in full whoever owns it (read-only): the comment thread, the linked call and the\naccount it belongs to. Cases are still worked in the customer portal — an admin reads.","operationId":"admin_get_case_admin_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCaseDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/customers/{customer_id}/cases":{"get":{"tags":["cases","admin"],"summary":"Admin Customer Cases","description":"One customer's cases (the customer-detail \"Cases\" tab; read-only).","operationId":"admin_customer_cases_admin_customers__customer_id__cases_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCaseList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/support/tickets":{"get":{"tags":["support"],"summary":"List Tickets","operationId":"list_tickets_support_tickets_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["support"],"summary":"Create Ticket","description":"Open a ticket. ``call_id`` must be one of the account's own calls (an analysis dispute).","operationId":"create_ticket_support_tickets_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/support/tickets/{ticket_id}":{"get":{"tags":["support"],"summary":"Get Ticket","operationId":"get_ticket_support_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["support"],"summary":"Customer Status","description":"A customer closes a ticket, or reopens one (reopening puts it back with us).","operationId":"customer_status_support_tickets__ticket_id__patch","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/support/tickets/{ticket_id}/messages":{"post":{"tags":["support"],"summary":"Customer Message","operationId":"customer_message_support_tickets__ticket_id__messages_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support/tickets":{"get":{"tags":["support","admin"],"summary":"Admin List Tickets","operationId":"admin_list_tickets_admin_support_tickets_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTicketList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support/tickets/{ticket_id}":{"get":{"tags":["support","admin"],"summary":"Admin Get Ticket","operationId":"admin_get_ticket_admin_support_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTicketDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["support","admin"],"summary":"Admin Status","operationId":"admin_status_admin_support_tickets__ticket_id__patch","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTicketOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support/tickets/{ticket_id}/messages":{"post":{"tags":["support","admin"],"summary":"Admin Reply","description":"Reply as support: the ticket becomes \"answered\" and the customer is e-mailed.","operationId":"admin_reply_admin_support_tickets__ticket_id__messages_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automation/rules":{"get":{"tags":["automation"],"summary":"List Rules","operationId":"list_rules_automation_rules_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationRuleOut"},"title":"Response List Rules Automation Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["automation"],"summary":"Create Rule","operationId":"create_rule_automation_rules_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automation/rules/{rule_id}":{"patch":{"tags":["automation"],"summary":"Update Rule","operationId":"update_rule_automation_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["automation"],"summary":"Delete Rule","operationId":"delete_rule_automation_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automation/controls":{"get":{"tags":["automation"],"summary":"List Controls","description":"The \"Controlled numbers\" table: by default only rows that authorize would enforce right now\n(in force and not past expiry — lazy expiry, matching services/routing.find_active_control);\n``include_released=true`` adds the released/expired history.","operationId":"list_controls_automation_controls_get","parameters":[{"name":"include_released","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Released"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":2147483647,"minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AniControlList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automation/controls/{control_id}/release":{"post":{"tags":["automation"],"summary":"Release Control","operationId":"release_control_automation_controls__control_id__release_post","parameters":[{"name":"control_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Control Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AniControlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/payments/config":{"get":{"tags":["payments"],"summary":"Payments Config","description":"What the Billing page may know: enabled flag, publishable key, currency, presets.","operationId":"payments_config_customer_payments_config_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsPublicConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/payments/checkout":{"post":{"tags":["payments"],"summary":"Create Checkout","description":"One-time top-up: create a Stripe Checkout Session and hand the browser its redirect URL.","operationId":"create_checkout_customer_payments_checkout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/payments/subscribe":{"post":{"tags":["payments"],"summary":"Create Subscription Checkout","description":"Pay a monthly plan bundle by card: subscription-mode Checkout (invoice.paid renews).","operationId":"create_subscription_checkout_customer_payments_subscribe_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/stripe":{"post":{"tags":["payments"],"summary":"Stripe Webhook","description":"Signature-verified Stripe webhook (no auth: the signature IS the authentication).\n\nCredits the balance on `checkout.session.completed` (ledger `topup`, note \"Stripe\") and renews\nthe plan cycle on `invoice.paid` — both idempotent on the Stripe object id, so redeliveries are\nreported as duplicates and never credit twice.\n\nCrediting is **fail-closed on payment state**: a completed session credits only when\n`payment_status == \"paid\"`. A session that is unpaid, `no_payment_required`, or carries no\n`payment_status` at all is reported `pending` and is NOT marked processed, so a later\nsettlement can still credit it. Delayed payment methods are therefore settled by\n`checkout.session.async_payment_succeeded` (credits, exactly once across both events), while\n`checkout.session.async_payment_failed` never credits.","operationId":"stripe_webhook_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook Webhooks Stripe Post"}}}}}}},"/admin/payments":{"get":{"tags":["payments"],"summary":"Admin Payments Settings","description":"FEATURES-V4 s7: Stripe configuration (secrets redacted to *_set booleans).","operationId":"admin_payments_settings_admin_payments_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["payments"],"summary":"Update Admin Payments Settings","description":"Update Stripe settings; secret keys keep their stored value when null/empty (never wiped).","operationId":"update_admin_payments_settings_admin_payments_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentsSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/storage/status":{"get":{"tags":["ops"],"summary":"Storage Status","description":"Current recording storage backend, disk usage of the recordings volume, the offload/retention\nknobs and the summary of the last maintenance run (from the audit log).","operationId":"storage_status_admin_storage_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/storage/settings":{"put":{"tags":["ops"],"summary":"Put Storage Settings","description":"Update the `storage` settings group (partial, SMTP-pattern: omitted/None keeps the stored\nvalue). 0 retention days = keep forever.","operationId":"put_storage_settings_admin_storage_settings_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/storage/run":{"post":{"tags":["ops"],"summary":"Run Storage Maintenance","description":"Run the offload + retention maintenance now (same task the worker runs periodically).\nAudited as ``storage.run`` with the summary; the summary is also returned.","operationId":"run_storage_maintenance_admin_storage_run_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/backups/settings":{"get":{"tags":["ops"],"summary":"Get Backup Settings","description":"The `backup` settings group. No secrets live here — S3 credentials come from the\nenvironment/instance profile (the storage backend's credentials are reused).","operationId":"get_backup_settings_admin_backups_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["ops"],"summary":"Put Backup Settings","description":"Update the `backup` settings group (partial). Empty ``s3_bucket`` = local fallback under\nthe recordings volume (``<RECORDINGS_DIR>/backups/``).","operationId":"put_backup_settings_admin_backups_settings_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/backups":{"get":{"tags":["ops"],"summary":"List Backups","description":"Existing dumps (name / size / date), newest first, and where they live.","operationId":"list_backups_admin_backups_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/backups/run":{"post":{"tags":["ops"],"summary":"Run Backup","description":"Back up now: mysqldump + gzip + store (S3 or the local fallback), then prune to\n``keep_last``. The outcome is audited (``backup.run``) and returned — ``ok=false`` with the\nerror instead of a 5xx, so the admin UI can show what failed.","operationId":"run_backup_admin_backups_run_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupRunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/backups/{name}/download":{"get":{"tags":["ops"],"summary":"Download Backup","description":"Download one dump: a presigned redirect when the store supports it (and STORAGE_PRESIGN is\non), else the file / a stream through the API. Audited (``backup.download``).","operationId":"download_backup_admin_backups__name__download_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/backups/restore":{"post":{"tags":["ops"],"summary":"Restore Backup","description":"Restore a dump into the live database. DESTRUCTIVE: every table is dropped and re-created\nfrom the dump and queries pause briefly while it loads — the request body must carry the\nliteral confirmation string ``RESTORE`` (enforced by the schema AND re-checked by the\nservice). Audited before and after (``backup.restore``).","operationId":"restore_backup_admin_backups_restore_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupRestoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/shares/{token}/meta":{"get":{"tags":["public"],"summary":"Share Meta","description":"What the unlock page may show BEFORE the password: whether the link is real, whether it is dead,\nand the name of the company that shared it. Nothing about the call.","operationId":"share_meta_public_shares__token__meta_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareMetaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/shares/{token}/unlock":{"post":{"tags":["public"],"summary":"Unlock Share","description":"Exchange the link password for a 30-minute view token. Wrong password, unknown link and a dead\nlink with a wrong password are indistinguishable (same 401 body, same bcrypt cost).","operationId":"unlock_share_public_shares__token__unlock_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareUnlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareUnlockOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/shares/{token}":{"get":{"tags":["public"],"summary":"Share Payload","operationId":"share_payload_public_shares__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"T"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Share-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"X-Share-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSharePayload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/shares/{token}/recording":{"get":{"tags":["public"],"summary":"Share Recording","description":"The call's WAV, resolved exactly like the private endpoint (app.storage.open_wav, so the S3\nbackend works): a browser fetch is streamed through the API (the page's CSP and the bucket's CORS\nwould block a cross-origin redirect), other clients may follow a presigned redirect.","operationId":"share_recording_public_shares__token__recording_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"T"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Share-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"X-Share-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/leads":{"post":{"tags":["public"],"summary":"Ask for a setup call","description":"Store a request to talk and tell the operator. Always answers the same way on success.","operationId":"create_lead_public_leads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Create Lead Public Leads Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/cli-verification/coverage":{"get":{"tags":["cli-verification"],"summary":"Coverage","description":"The countries a caller-ID check can be placed to (the platform's verification numbers, never\nlisted themselves), the fee per check, and the countries this account has asked for.","operationId":"coverage_customer_cli_verification_coverage_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCoverageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/cli-verification/requests":{"post":{"tags":["cli-verification"],"summary":"Request Coverage","description":"Ask for a country the pool does not cover: opens a support ticket and counts the demand. One\nrequest per country per account.","operationId":"request_coverage_customer_cli_verification_requests_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCoverageRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCoverageRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/cli-checks":{"post":{"tags":["cli-verification"],"summary":"Create Check","description":"Verify that a destination delivers the caller ID: the platform places a call through it, with\nthe caller ID you choose (default: the account's phone), to one of its verification numbers in\nthe country, reads what arrived, and reports match / modified / withheld / missing /\nnot_received with the call's answer time and quality. Poll the check until ``status`` is done.","operationId":"create_check_customer_cli_checks_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCheckCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCheckOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cli-verification"],"summary":"List Checks","operationId":"list_checks_customer_cli_checks_get","parameters":[{"name":"destination_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CliCheckOut"},"title":"Response List Checks Customer Cli Checks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/cli-checks/{check_id}":{"get":{"tags":["cli-verification"],"summary":"Get Check","operationId":"get_check_customer_cli_checks__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Check Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliCheckOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/cli-schedules":{"get":{"tags":["cli-verification"],"summary":"List Schedules","operationId":"list_schedules_customer_cli_schedules_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CliScheduleOut"},"title":"Response List Schedules Customer Cli Schedules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["cli-verification"],"summary":"Create Schedule","description":"Repeat a caller-ID check every ``interval_hours`` (1 to 168); a failed result raises the\n``cli`` alert trigger. The first run is placed within a minute.","operationId":"create_schedule_customer_cli_schedules_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliScheduleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliScheduleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/cli-schedules/{schedule_id}":{"patch":{"tags":["cli-verification"],"summary":"Update Schedule","operationId":"update_schedule_customer_cli_schedules__schedule_id__patch","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliScheduleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliScheduleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["cli-verification"],"summary":"Delete Schedule","operationId":"delete_schedule_customer_cli_schedules__schedule_id__delete","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Schedule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/hosted-numbers":{"get":{"tags":["cli-verification"],"summary":"List Hosted Numbers","description":"The numbers this account hosts for caller-ID checks, what to point them at, what a use pays,\nand the countries other customers are asking for.","operationId":"list_hosted_numbers_customer_hosted_numbers_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumbersOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["cli-verification"],"summary":"Create Hosted Number","description":"Enrol a number you own. It starts as ``pointing``: point it at the SIP address in the reply,\nthen POST .../test and call it once from any phone.","operationId":"create_hosted_number_customer_hosted_numbers_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/hosted-numbers/{number_id}":{"get":{"tags":["cli-verification"],"summary":"Get Hosted Number","operationId":"get_hosted_number_customer_hosted_numbers__number_id__get","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["cli-verification"],"summary":"Update Hosted Number","operationId":"update_hosted_number_customer_hosted_numbers__number_id__patch","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["cli-verification"],"summary":"Delete Hosted Number","operationId":"delete_hosted_number_customer_hosted_numbers__number_id__delete","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/customer/hosted-numbers/{number_id}/test":{"post":{"tags":["cli-verification"],"summary":"Test Hosted Number","description":"You have pointed the number at us: listen for one call. Call the number from any phone\nwithin the window; the first call that arrives makes the number live.","operationId":"test_hosted_number_customer_hosted_numbers__number_id__test_post","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/hosted":{"get":{"tags":["cli-verification"],"summary":"Admin Hosted Numbers","operationId":"admin_hosted_numbers_admin_cli_verification_hosted_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HostedNumberAdminOut"},"title":"Response Admin Hosted Numbers Admin Cli Verification Hosted Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/hosted/{number_id}":{"patch":{"tags":["cli-verification"],"summary":"Admin Update Hosted Number","operationId":"admin_update_hosted_number_admin_cli_verification_hosted__number_id__patch","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberAdminUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedNumberAdminOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification":{"get":{"tags":["cli-verification"],"summary":"Admin Settings","operationId":"admin_settings_admin_cli_verification_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["cli-verification"],"summary":"Admin Update Settings","operationId":"admin_update_settings_admin_cli_verification_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/test":{"post":{"tags":["cli-verification"],"summary":"Admin Test Provider","operationId":"admin_test_provider_admin_cli_verification_test_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliProviderTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/countries/refresh":{"post":{"tags":["cli-verification"],"summary":"Admin Refresh Countries","description":"Cache the provider's country list (name, kinds) for the purchase form and the demand view.","operationId":"admin_refresh_countries_admin_cli_verification_countries_refresh_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/search":{"get":{"tags":["cli-verification"],"summary":"Admin Search","description":"Numbers available to buy, each with its paperwork picture: what it needs (an address, a\nregulatory bundle) and whether the provider account already holds it, so the operator sees\nwhat to add on the provider side when a number cannot be bought yet.","operationId":"admin_search_admin_cli_verification_search_get","parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":2,"title":"Country"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^(local|mobile|toll_free|national)$","default":"local","title":"Kind"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CliAvailableNumber"},"title":"Response Admin Search Admin Cli Verification Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/numbers":{"post":{"tags":["cli-verification"],"summary":"Admin Purchase","description":"Buy a number and configure it for verification in one step: the provider's voice webhook is\npointed at the platform, and the number joins the pool active.","operationId":"admin_purchase_admin_cli_verification_numbers_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliPurchase"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliProbeNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cli-verification"],"summary":"Admin Numbers","operationId":"admin_numbers_admin_cli_verification_numbers_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CliProbeNumberOut"},"title":"Response Admin Numbers Admin Cli Verification Numbers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/numbers/{number_id}":{"patch":{"tags":["cli-verification"],"summary":"Admin Update Number","operationId":"admin_update_number_admin_cli_verification_numbers__number_id__patch","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliProbeNumberUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliProbeNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["cli-verification"],"summary":"Admin Release Number","description":"Release the number at the provider (its monthly charge stops) and drop it from the pool.","operationId":"admin_release_number_admin_cli_verification_numbers__number_id__delete","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/demand":{"get":{"tags":["cli-verification"],"summary":"Admin Demand","description":"Countries customers asked for, most open requests first, each saying whether its numbers are\nlive (then the operator can mark it fulfilled) and how many requests were already fulfilled.","operationId":"admin_demand_admin_cli_verification_demand_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CliDemandOut"},"title":"Response Admin Demand Admin Cli Verification Demand Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cli-verification/demand/{country}/fulfil":{"post":{"tags":["cli-verification"],"summary":"Admin Fulfil Demand","description":"Mark every open request for ``country`` fulfilled once its verification numbers are live:\neach requestor is e-mailed that the country is available and their ticket is answered and\nclosed. Refused (409) while the country has no active number.","operationId":"admin_fulfil_demand_admin_cli_verification_demand__country__fulfil_post","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliDemandFulfilOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics":{"get":{"tags":["metrics"],"summary":"Metrics Endpoint","description":"Prometheus text format. Internal only: not authenticated, must not be exposed by the reverse\nproxy.","operationId":"metrics_endpoint_metrics_get","responses":{"200":{"description":"Successful Response"}}}},"/health":{"get":{"tags":["health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthOut"}}}}}}}},"components":{"schemas":{"AdminCallDetail":{"properties":{"selling_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Selling Price"},"stt_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Cost"},"ai_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ai Cost"},"provider_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Provider Cost"},"profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit"},"margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Pct"},"id":{"type":"string","format":"uuid","title":"Id"},"sip_call_id":{"type":"string","title":"Sip Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"origin":{"type":"string","title":"Origin","default":"sip"},"src_ip":{"type":"string","title":"Src Ip"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"dest_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Country"},"dest_host":{"type":"string","title":"Dest Host"},"dest_port":{"type":"integer","title":"Dest Port"},"dest_transport":{"type":"string","title":"Dest Transport"},"media_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Ip"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"sub_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Customer"},"dial_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dial Prefix"},"routed_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Routed Destination Id"},"routed_destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed Destination Label"},"route_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Prefix"},"dest_kind":{"type":"string","title":"Dest Kind","default":"sip"},"dest_tech_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Tech Prefix"},"dest_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Provider"},"agent_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Seconds"},"agent_rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Rate Applied"},"ai_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Mode"},"mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mos"},"jitter_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Jitter Ms"},"packet_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packet Loss Pct"},"qos":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qos"},"codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codec"},"pdd_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdd Ms"},"answer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answer Delay Ms"},"early_media":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Media"},"hangup_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hangup By"},"q850_cause":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Q850 Cause"},"q850_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q850 Text"},"direction":{"type":"string","title":"Direction"},"status":{"type":"string","title":"Status"},"sip_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Code"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"billsec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billsec"},"charged_amount":{"type":"number","title":"Charged Amount"},"rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Applied"},"recording_wav_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Wav Path"},"recording_available":{"type":"boolean","title":"Recording Available","default":false},"transcript_status":{"type":"string","title":"Transcript Status"},"analysis_status":{"type":"string","title":"Analysis Status"},"processing":{"type":"string","title":"Processing","default":"full"},"sampled":{"type":"boolean","title":"Sampled","default":true},"transfer_target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Target"},"transfer_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Status"},"transfer_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Code"},"transfer_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transfer At"},"transfer_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Mode"},"transfer_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Call Id"},"dtmf":{"anyOf":[{"items":{"$ref":"#/components/schemas/DtmfEventOut"},"type":"array"},{"type":"null"}],"title":"Dtmf"},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"analysis":{"anyOf":[{"$ref":"#/components/schemas/AnalysisOut"},{"type":"null"}]},"has_route_alert":{"type":"boolean","title":"Has Route Alert","default":false},"recording_pcap_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recording Pcap Paths"},"captured_headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Captured Headers"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"routed_to_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed To Label"},"transcript":{"anyOf":[{"$ref":"#/components/schemas/TranscriptMeta"},{"type":"null"}]},"transcript_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Summary"}},"type":"object","required":["id","sip_call_id","customer_id","src_ip","ani","dialed","dest_host","dest_port","dest_transport","media_ip","direction","status","sip_code","end_reason","started_at","answered_at","ended_at","duration_sec","billsec","charged_amount","rate_applied","recording_wav_path","transcript_status","analysis_status","processing_error","created_at","recording_pcap_paths"],"title":"AdminCallDetail","description":"The admin call detail with the profitability line for the Model-run panel (FEATURES-V3 §6)."},"AdminCallList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/AdminCallOut"},"type":"array","title":"Items"},"totals":{"$ref":"#/components/schemas/AdminCallTotals"}},"type":"object","required":["total","limit","offset","items","totals"],"title":"AdminCallList"},"AdminCallOut":{"properties":{"selling_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Selling Price"},"stt_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stt Cost"},"ai_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ai Cost"},"provider_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Provider Cost"},"profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit"},"margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Pct"},"id":{"type":"string","format":"uuid","title":"Id"},"sip_call_id":{"type":"string","title":"Sip Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"origin":{"type":"string","title":"Origin","default":"sip"},"src_ip":{"type":"string","title":"Src Ip"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"dest_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Country"},"dest_host":{"type":"string","title":"Dest Host"},"dest_port":{"type":"integer","title":"Dest Port"},"dest_transport":{"type":"string","title":"Dest Transport"},"media_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Ip"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"sub_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Customer"},"dial_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dial Prefix"},"routed_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Routed Destination Id"},"routed_destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed Destination Label"},"route_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Prefix"},"dest_kind":{"type":"string","title":"Dest Kind","default":"sip"},"dest_tech_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Tech Prefix"},"dest_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Provider"},"agent_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Seconds"},"agent_rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Rate Applied"},"ai_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Mode"},"mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mos"},"jitter_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Jitter Ms"},"packet_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packet Loss Pct"},"qos":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qos"},"codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codec"},"pdd_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdd Ms"},"answer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answer Delay Ms"},"early_media":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Media"},"hangup_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hangup By"},"q850_cause":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Q850 Cause"},"q850_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q850 Text"},"direction":{"type":"string","title":"Direction"},"status":{"type":"string","title":"Status"},"sip_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Code"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"billsec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billsec"},"charged_amount":{"type":"number","title":"Charged Amount"},"rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Applied"},"recording_wav_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Wav Path"},"recording_available":{"type":"boolean","title":"Recording Available","default":false},"transcript_status":{"type":"string","title":"Transcript Status"},"analysis_status":{"type":"string","title":"Analysis Status"},"processing":{"type":"string","title":"Processing","default":"full"},"sampled":{"type":"boolean","title":"Sampled","default":true},"transfer_target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Target"},"transfer_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Status"},"transfer_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Code"},"transfer_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transfer At"},"transfer_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Mode"},"transfer_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Call Id"},"dtmf":{"anyOf":[{"items":{"$ref":"#/components/schemas/DtmfEventOut"},"type":"array"},{"type":"null"}],"title":"Dtmf"},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"analysis":{"anyOf":[{"$ref":"#/components/schemas/AnalysisSummary"},{"type":"null"}]},"has_route_alert":{"type":"boolean","title":"Has Route Alert","default":false}},"type":"object","required":["id","sip_call_id","customer_id","src_ip","ani","dialed","dest_host","dest_port","dest_transport","media_ip","direction","status","sip_code","end_reason","started_at","answered_at","ended_at","duration_sec","billsec","charged_amount","rate_applied","recording_wav_path","transcript_status","analysis_status","processing_error","created_at"],"title":"AdminCallOut","description":"A CDR row with the admin-only profitability columns (FEATURES-V3 §6)."},"AdminCallTotals":{"properties":{"selling_price":{"type":"number","title":"Selling Price"},"provider_cost":{"type":"number","title":"Provider Cost"},"profit":{"type":"number","title":"Profit"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["selling_price","provider_cost","profit","calls"],"title":"AdminCallTotals","description":"Running totals over the current admin CDR filter (FEATURES-V3 §6)."},"AdminCaseDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"case_no":{"type":"integer","title":"Case No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"severity":{"type":"string","title":"Severity"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"assigned_to_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Label"},"comment_count":{"type":"integer","title":"Comment Count","default":0},"comments":{"items":{"$ref":"#/components/schemas/CaseCommentOut"},"type":"array","title":"Comments","default":[]},"call":{"anyOf":[{"$ref":"#/components/schemas/CallOut"},{"type":"null"}]},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Company"}},"type":"object","required":["id","case_no","customer_id","call_id","title","description","status","severity","created_by","assigned_to","created_at","updated_at"],"title":"AdminCaseDetail","description":"A case as an admin reads it: the same detail the owning customer sees (thread + linked call)\nplus who owns it, so support can answer \"what happened on case #12\" without impersonating."},"AdminCaseList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/AdminCaseOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"AdminCaseList"},"AdminCaseOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"case_no":{"type":"integer","title":"Case No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"severity":{"type":"string","title":"Severity"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"assigned_to_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Label"},"comment_count":{"type":"integer","title":"Comment Count","default":0},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Company"}},"type":"object","required":["id","case_no","customer_id","call_id","title","description","status","severity","created_by","assigned_to","created_at","updated_at"],"title":"AdminCaseOut","description":"A case as seen by an admin (read-only lists: per-customer tab + global recent)."},"AdminCustomerCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"anyOf":[{"type":"string","maxLength":72,"minLength":12},{"type":"null"}],"title":"Password"},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company"},"role":{"type":"string","enum":["customer","admin"],"title":"Role","default":"customer"},"plan_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Code"},"ports":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Ports"},"send_welcome_email":{"type":"boolean","title":"Send Welcome Email","default":true},"must_change_password":{"type":"boolean","title":"Must Change Password","default":true},"pilot_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Pilot Days"},"pilot_minutes_limit":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":1.0},{"type":"null"}],"title":"Pilot Minutes Limit"},"pilot_label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Pilot Label"}},"type":"object","required":["email"],"title":"AdminCustomerCreate"},"AdminCustomerList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/AdminCustomerOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"AdminCustomerList"},"AdminCustomerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"province":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Province"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"must_change_password":{"type":"boolean","title":"Must Change Password","default":false},"balance":{"type":"number","title":"Balance"},"plan_code":{"type":"string","title":"Plan Code"},"ports":{"type":"integer","title":"Ports"},"plan_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Started At"},"plan_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Renews At"},"cycle_minutes_used":{"type":"number","title":"Cycle Minutes Used"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"twofa_enabled":{"type":"boolean","title":"Twofa Enabled","default":false},"dialer_enabled":{"type":"boolean","title":"Dialer Enabled"},"ai_mode":{"type":"string","title":"Ai Mode","default":"power"},"data_region":{"type":"string","title":"Data Region","default":"ca"},"media_region":{"type":"string","title":"Media Region","default":"ca"},"impersonated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impersonated By"},"pilot":{"anyOf":[{"$ref":"#/components/schemas/AdminPilotStatus"},{"type":"null"}]},"profile":{"anyOf":[{"$ref":"#/components/schemas/CustomerProfileOut"},{"type":"null"}]},"terms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Version"},"terms_current_version":{"type":"string","title":"Terms Current Version"},"signup_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Ip"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"},"terms_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terms Accepted At"},"terms_accepted_via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Accepted Via"},"marketing_opt_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Marketing Opt Out At"},"webhook_secret_set":{"type":"boolean","title":"Webhook Secret Set","default":false},"active_calls":{"type":"integer","title":"Active Calls","default":0},"welcome_email":{"anyOf":[{"$ref":"#/components/schemas/WelcomeEmailStatus"},{"type":"null"}]},"temporary_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporary Password"}},"type":"object","required":["id","email","company","role","status","balance","plan_code","ports","plan_started_at","plan_renews_at","cycle_minutes_used","webhook_url","created_at"],"title":"AdminCustomerOut"},"AdminCustomerUpdate":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"status":{"anyOf":[{"type":"string","enum":["active","suspended"]},{"type":"null"}],"title":"Status"},"ports":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Ports"},"plan_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Code"},"role":{"anyOf":[{"type":"string","enum":["customer","admin"]},{"type":"null"}],"title":"Role"},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company"},"marketing_opt_out":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Opt Out"}},"type":"object","title":"AdminCustomerUpdate"},"AdminDashboardOut":{"properties":{"days":{"type":"integer","title":"Days"},"from":{"type":"string","format":"date-time","title":"From"},"to":{"type":"string","format":"date-time","title":"To"},"active_calls":{"type":"integer","title":"Active Calls"},"calls_today":{"type":"integer","title":"Calls Today"},"calls_period":{"type":"integer","title":"Calls Period"},"minutes_period":{"type":"number","title":"Minutes Period"},"revenue_period":{"type":"number","title":"Revenue Period"},"provider_cost_period":{"type":"number","title":"Provider Cost Period"},"margin_pct":{"type":"number","title":"Margin Pct"},"risk_distribution":{"items":{"$ref":"#/components/schemas/RiskBucket"},"type":"array","title":"Risk Distribution"},"high_risk_pct":{"type":"number","title":"High Risk Pct"},"calls_per_day":{"items":{"$ref":"#/components/schemas/CallsPerDay"},"type":"array","title":"Calls Per Day"},"recent_high_risk":{"items":{"$ref":"#/components/schemas/CallOut"},"type":"array","title":"Recent High Risk"},"jobs":{"$ref":"#/components/schemas/JobCounts"},"top_customers":{"items":{"$ref":"#/components/schemas/TopCustomer"},"type":"array","title":"Top Customers"},"customers_total":{"type":"integer","title":"Customers Total"},"customers_active":{"type":"integer","title":"Customers Active"},"getting_started":{"$ref":"#/components/schemas/GettingStarted"}},"type":"object","required":["days","from","to","active_calls","calls_today","calls_period","minutes_period","revenue_period","provider_cost_period","margin_pct","risk_distribution","high_risk_pct","calls_per_day","recent_high_risk","jobs","top_customers","customers_total","customers_active","getting_started"],"title":"AdminDashboardOut"},"AdminIpOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cidr":{"type":"string","title":"Cidr"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"dial_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dial Prefix"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"customer_email":{"type":"string","title":"Customer Email"}},"type":"object","required":["id","cidr","label","destination_id","enabled","created_at","customer_id","customer_email"],"title":"AdminIpOut","description":"Whitelist entry as seen by an admin (any customer)."},"AdminLiveCall":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"sub_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Customer"},"dest_host":{"type":"string","title":"Dest Host"},"dest_port":{"type":"integer","title":"Dest Port"},"dest_transport":{"type":"string","title":"Dest Transport"},"dest_kind":{"type":"string","title":"Dest Kind"},"dest_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Provider"},"routed_destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed Destination Label"},"route_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Prefix"},"media_node":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Node"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"elapsed_sec":{"type":"integer","title":"Elapsed Sec"},"max_call_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Call Seconds"},"remaining_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining Sec"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"customer_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Company"},"customer_email":{"type":"string","title":"Customer Email"}},"type":"object","required":["id","status","ani","dialed","external_id","external_name","dest_host","dest_port","dest_transport","dest_kind","route_prefix","media_node","started_at","answered_at","elapsed_sec","max_call_seconds","remaining_sec","customer_id","customer_company","customer_email"],"title":"AdminLiveCall"},"AdminLiveCallsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminLiveCall"},"type":"array","title":"Items"},"summary":{"$ref":"#/components/schemas/LiveSummary"},"ports":{"type":"integer","title":"Ports"},"ports_in_use":{"type":"integer","title":"Ports In Use"}},"type":"object","required":["items","summary","ports","ports_in_use"],"title":"AdminLiveCallsOut"},"AdminPasswordReset":{"properties":{"password":{"anyOf":[{"type":"string","maxLength":72,"minLength":12},{"type":"null"}],"title":"Password"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"send_email":{"type":"boolean","title":"Send Email","default":true},"must_change_password":{"type":"boolean","title":"Must Change Password","default":true}},"type":"object","title":"AdminPasswordReset","description":"Admin password reset for a customer login (no current password needed). ``password`` omitted =\ngenerate a strong temporary one, shown once in the response. ``user_id`` targets a member; omitted =\nthe account (owner) login. ``send_email`` mails the temporary password (never fails the reset);\n``must_change_password`` forces a new password at the next sign-in."},"AdminPasswordResetOut":{"properties":{"login_email":{"type":"string","title":"Login Email"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"temporary_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporary Password"},"must_change_password":{"type":"boolean","title":"Must Change Password"},"sessions_revoked":{"type":"integer","title":"Sessions Revoked"},"email":{"$ref":"#/components/schemas/WelcomeEmailStatus"}},"type":"object","required":["login_email","must_change_password","sessions_revoked","email"],"title":"AdminPasswordResetOut"},"AdminPilotStatus":{"properties":{"active":{"type":"boolean","title":"Active","default":false},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"days_left":{"type":"integer","title":"Days Left","default":0},"minutes_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minutes Limit"},"minutes_used":{"type":"number","title":"Minutes Used","default":0.0},"exhausted":{"type":"boolean","title":"Exhausted","default":false},"waived_total":{"type":"number","title":"Waived Total","default":0.0},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","title":"AdminPilotStatus","description":"Admin view: adds the internal label."},"AdminSettingsOut":{"properties":{"ai_provider":{"type":"string","title":"Ai Provider"},"ai_model":{"type":"string","title":"Ai Model"},"stt_provider":{"type":"string","title":"Stt Provider"},"stt_model":{"type":"string","title":"Stt Model"},"min_analysis_seconds":{"type":"integer","title":"Min Analysis Seconds"},"recording_retention_days":{"type":"integer","title":"Recording Retention Days"},"prompt_version":{"type":"string","title":"Prompt Version"},"payg_default_ports":{"type":"integer","title":"Payg Default Ports"},"capture_headers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Capture Headers"},"providers":{"$ref":"#/components/schemas/ProvidersOut"},"stt_local_available":{"type":"boolean","title":"Stt Local Available"},"stt_local_models":{"$ref":"#/components/schemas/LocalSttModelsOut"}},"type":"object","required":["ai_provider","ai_model","stt_provider","stt_model","min_analysis_seconds","recording_retention_days","prompt_version","payg_default_ports","providers","stt_local_available","stt_local_models"],"title":"AdminSettingsOut","description":"GET/PUT /admin/settings: settings + provider key presence (never the keys) + local STT availability\n+ which local speech models are on this node."},"AdminTicketDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ticket_no":{"type":"integer","title":"Ticket No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"kind":{"type":"string","title":"Kind"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"status":{"type":"string","title":"Status"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"message_count":{"type":"integer","title":"Message Count","default":0},"messages":{"items":{"$ref":"#/components/schemas/TicketMessageOut"},"type":"array","title":"Messages","default":[]},"call":{"anyOf":[{"$ref":"#/components/schemas/CallOut"},{"type":"null"}]},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Company"}},"type":"object","required":["id","ticket_no","customer_id","kind","subject","body","call_id","status","created_by","closed_at","created_at","updated_at"],"title":"AdminTicketDetail"},"AdminTicketList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/AdminTicketOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"AdminTicketList"},"AdminTicketOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ticket_no":{"type":"integer","title":"Ticket No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"kind":{"type":"string","title":"Kind"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"status":{"type":"string","title":"Status"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"message_count":{"type":"integer","title":"Message Count","default":0},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"customer_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Company"}},"type":"object","required":["id","ticket_no","customer_id","kind","subject","body","call_id","status","created_by","closed_at","created_at","updated_at"],"title":"AdminTicketOut"},"AiModeEconomics":{"properties":{"minutes":{"type":"number","title":"Minutes"},"stt_cost":{"type":"number","title":"Stt Cost"},"ai_cost":{"type":"number","title":"Ai Cost"},"infra_cost":{"type":"number","title":"Infra Cost"},"cost_per_call":{"type":"number","title":"Cost Per Call"},"fee":{"type":"number","title":"Fee"},"minutes_revenue":{"type":"number","title":"Minutes Revenue"},"revenue_per_call":{"type":"number","title":"Revenue Per Call"},"margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Pct"},"measured_days":{"type":"integer","title":"Measured Days"},"measured":{"anyOf":[{"$ref":"#/components/schemas/AiModeMeasured"},{"type":"null"}]}},"type":"object","required":["minutes","stt_cost","ai_cost","infra_cost","cost_per_call","fee","minutes_revenue","revenue_per_call","margin_pct","measured_days","measured"],"title":"AiModeEconomics","description":"One tier's unit economics for a reference call: our cost (STT on both legs, analysis, compute)\nagainst the revenue (pay-as-you-go minutes plus the tier's fee), and the same measured on the\ncalls processed under the tier recently."},"AiModeMeasured":{"properties":{"calls":{"type":"integer","title":"Calls"},"avg_billsec":{"type":"number","title":"Avg Billsec"},"cost_per_call":{"type":"number","title":"Cost Per Call"},"revenue_per_call":{"type":"number","title":"Revenue Per Call"},"margin_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Pct"}},"type":"object","required":["calls","avg_billsec","cost_per_call","revenue_per_call","margin_pct"],"title":"AiModeMeasured"},"AiModePublicOut":{"properties":{"mode":{"type":"string","title":"Mode"},"analysis_fee_per_call":{"type":"number","title":"Analysis Fee Per Call"},"current":{"type":"boolean","title":"Current","default":false}},"type":"object","required":["mode","analysis_fee_per_call"],"title":"AiModePublicOut","description":"One tier as the CUSTOMER sees it: name + fee only — never provider or model names."},"AiModeSpec":{"properties":{"stt_provider":{"type":"string","title":"Stt Provider"},"stt_model":{"type":"string","title":"Stt Model"},"ai_provider":{"type":"string","title":"Ai Provider"},"ai_model":{"type":"string","title":"Ai Model"},"analysis_fee_per_call":{"type":"number","title":"Analysis Fee Per Call"}},"type":"object","required":["stt_provider","stt_model","ai_provider","ai_model","analysis_fee_per_call"],"title":"AiModeSpec","description":"One AI tier as the ADMIN edits it: the STT/analysis pair and the per-call fee."},"AiModeSpecUpdate":{"properties":{"stt_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stt Provider"},"stt_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stt Model"},"ai_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Provider"},"ai_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Model"},"analysis_fee_per_call":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Analysis Fee Per Call"}},"type":"object","title":"AiModeSpecUpdate"},"AiModeUpdate":{"properties":{"mode":{"type":"string","title":"Mode"}},"type":"object","required":["mode"],"title":"AiModeUpdate"},"AiModesEconomicsOut":{"properties":{"payg_rate":{"type":"number","title":"Payg Rate"},"economy":{"$ref":"#/components/schemas/AiModeEconomics"},"power":{"$ref":"#/components/schemas/AiModeEconomics"},"max":{"$ref":"#/components/schemas/AiModeEconomics"}},"type":"object","required":["payg_rate","economy","power","max"],"title":"AiModesEconomicsOut"},"AiModesOut":{"properties":{"economy":{"$ref":"#/components/schemas/AiModeSpec"},"power":{"$ref":"#/components/schemas/AiModeSpec"},"max":{"$ref":"#/components/schemas/AiModeSpec"}},"type":"object","required":["economy","power","max"],"title":"AiModesOut","description":"GET /admin/ai-modes — the full customer-selectable tier map."},"AiModesUpdate":{"properties":{"economy":{"anyOf":[{"$ref":"#/components/schemas/AiModeSpecUpdate"},{"type":"null"}]},"power":{"anyOf":[{"$ref":"#/components/schemas/AiModeSpecUpdate"},{"type":"null"}]},"max":{"anyOf":[{"$ref":"#/components/schemas/AiModeSpecUpdate"},{"type":"null"}]}},"type":"object","title":"AiModesUpdate"},"AiPriceIn":{"properties":{"input_per_mtok":{"type":"number","maximum":1000.0,"minimum":0.0,"title":"Input Per Mtok"},"output_per_mtok":{"type":"number","maximum":1000.0,"minimum":0.0,"title":"Output Per Mtok"}},"type":"object","required":["input_per_mtok","output_per_mtok"],"title":"AiPriceIn"},"AlertRuleCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"min_probability":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Min Probability","default":70},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"recommendations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommendations"},"recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recipients"},"throttle_minutes":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Throttle Minutes","default":0},"include_transcript":{"type":"boolean","title":"Include Transcript","default":false},"include_sip_log":{"type":"boolean","title":"Include Sip Log","default":false},"include_pcap":{"type":"boolean","title":"Include Pcap","default":false},"include_recording":{"type":"boolean","title":"Include Recording","default":false},"trigger":{"type":"string","pattern":"^(fraud|quality|either|destination|cli)$","title":"Trigger","default":"fraud"},"max_mos":{"anyOf":[{"type":"number","maximum":5.0,"minimum":1.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Mos"},"channel_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10},{"type":"null"}],"title":"Channel Ids"},"email_enabled":{"type":"boolean","title":"Email Enabled","default":true}},"type":"object","required":["name"],"title":"AlertRuleCreate"},"AlertRuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"enabled":{"type":"boolean","title":"Enabled"},"min_probability":{"type":"integer","title":"Min Probability"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"recommendations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommendations"},"recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recipients"},"throttle_minutes":{"type":"integer","title":"Throttle Minutes"},"include_transcript":{"type":"boolean","title":"Include Transcript"},"include_sip_log":{"type":"boolean","title":"Include Sip Log"},"include_pcap":{"type":"boolean","title":"Include Pcap"},"include_recording":{"type":"boolean","title":"Include Recording"},"trigger":{"type":"string","title":"Trigger","default":"fraud"},"max_mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Mos"},"channel_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Channel Ids"},"email_enabled":{"type":"boolean","title":"Email Enabled","default":true},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","enabled","min_probability","categories","recommendations","recipients","throttle_minutes","include_transcript","include_sip_log","include_pcap","include_recording","created_at","updated_at"],"title":"AlertRuleOut"},"AlertRuleTestOut":{"properties":{"sent":{"type":"boolean","title":"Sent"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latency_ms":{"type":"integer","title":"Latency Ms"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"channels":{"items":{"$ref":"#/components/schemas/ChannelDeliveryOut"},"type":"array","title":"Channels","default":[]}},"type":"object","required":["sent","latency_ms","recipients"],"title":"AlertRuleTestOut"},"AlertRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"min_probability":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Min Probability"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"recommendations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommendations"},"recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recipients"},"throttle_minutes":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Throttle Minutes"},"include_transcript":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Transcript"},"include_sip_log":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Sip Log"},"include_pcap":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Pcap"},"include_recording":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Recording"},"trigger":{"anyOf":[{"type":"string","pattern":"^(fraud|quality|either|destination|cli)$"},{"type":"null"}],"title":"Trigger"},"max_mos":{"anyOf":[{"type":"number","maximum":5.0,"minimum":1.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Mos"},"channel_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10},{"type":"null"}],"title":"Channel Ids"},"email_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Enabled"}},"type":"object","title":"AlertRuleUpdate"},"AnalysisOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"prompt_version":{"type":"string","title":"Prompt Version"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"probability":{"type":"integer","title":"Probability"},"category":{"type":"string","title":"Category"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"caller_identity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Identity"},"red_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Red Flags"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"tcpa_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tcpa Comment"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"recommendation":{"type":"string","title":"Recommendation"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"route_alert":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Route Alert"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"cost":{"type":"number","title":"Cost"},"latency_ms":{"type":"integer","title":"Latency Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","prompt_version","title","probability","category","entity","caller_identity","red_flags","language","tcpa_comment","summary","recommendation","keywords","input_tokens","output_tokens","cost","latency_ms","created_at"],"title":"AnalysisOut"},"AnalysisSummary":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"probability":{"type":"integer","title":"Probability"},"category":{"type":"string","title":"Category"},"recommendation":{"type":"string","title":"Recommendation"},"red_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Red Flags"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"}},"type":"object","required":["title","probability","category","recommendation","red_flags"],"title":"AnalysisSummary"},"AnalyzeQueued":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"analysis_status":{"type":"string","title":"Analysis Status"}},"type":"object","required":["job_id","analysis_status"],"title":"AnalyzeQueued","description":"POST /calls/{id}/analyze: the queued job and the call's analysis status now."},"AniControlList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/AniControlOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"AniControlList"},"AniControlOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ani":{"type":"string","title":"Ani"},"action":{"type":"string","title":"Action"},"divert_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Divert Destination Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Released At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","ani","action","divert_destination_id","reason","expires_at","released_at","created_at"],"title":"AniControlOut","description":"One controlled number (\"Controlled numbers\" table + admin views). Released rows keep their\nhistory (released_at set); only rows with released_at null and expires_at in the future are\nenforced by authorize."},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","prefix","last_used_at","revoked_at","created_at","key"],"title":"ApiKeyCreated"},"ApiKeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","prefix","last_used_at","revoked_at","created_at"],"title":"ApiKeyOut"},"AuditLogList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditLogOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"AuditLogList"},"AuditLogOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"actor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Email"},"action":{"type":"string","title":"Action"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"target_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","actor_email","action","target_type","target_id","data","created_at"],"title":"AuditLogOut"},"AuthConfigOut":{"properties":{"signup_enabled":{"type":"boolean","title":"Signup Enabled"},"password_min_length":{"type":"integer","title":"Password Min Length","default":12},"access_token_ttl_sec":{"type":"integer","title":"Access Token Ttl Sec"},"session_idle_timeout_min":{"type":"integer","title":"Session Idle Timeout Min","default":0}},"type":"object","required":["signup_enabled","access_token_ttl_sec"],"title":"AuthConfigOut"},"AutomationRuleCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"min_probability":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Min Probability","default":90},"recommendations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommendations","default":["block"]},"action":{"type":"string","enum":["block","divert"],"title":"Action","default":"block"},"divert_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Divert Destination Id"},"duration_hours":{"anyOf":[{"type":"integer","maximum":87600.0,"minimum":1.0},{"type":"null"}],"title":"Duration Hours"}},"type":"object","required":["name"],"title":"AutomationRuleCreate","description":"POST /automation/rules — \"When probability >= N and recommendation is X -> block/divert the\ncaller for H hours (null = forever)\"."},"AutomationRuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"enabled":{"type":"boolean","title":"Enabled"},"min_probability":{"type":"integer","title":"Min Probability"},"recommendations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommendations"},"action":{"type":"string","title":"Action"},"divert_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Divert Destination Id"},"duration_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Hours"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","enabled","min_probability","recommendations","action","divert_destination_id","duration_hours","created_at","updated_at"],"title":"AutomationRuleOut"},"AutomationRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"min_probability":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Min Probability"},"recommendations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommendations"},"action":{"anyOf":[{"type":"string","enum":["block","divert"]},{"type":"null"}],"title":"Action"},"divert_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Divert Destination Id"},"duration_hours":{"anyOf":[{"type":"integer","maximum":87600.0,"minimum":1.0},{"type":"null"}],"title":"Duration Hours"},"clear_duration":{"type":"boolean","title":"Clear Duration","default":false}},"type":"object","title":"AutomationRuleUpdate"},"BackupItem":{"properties":{"name":{"type":"string","title":"Name"},"size_bytes":{"type":"integer","title":"Size Bytes"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["name","size_bytes"],"title":"BackupItem","description":"One stored dump (name/size/date) in the backup listing."},"BackupList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BackupItem"},"type":"array","title":"Items"},"location":{"type":"string","title":"Location"}},"type":"object","required":["items","location"],"title":"BackupList"},"BackupRestoreRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"confirm":{"type":"string","const":"RESTORE","title":"Confirm"}},"type":"object","required":["name","confirm"],"title":"BackupRestoreRequest","description":"POST /admin/backups/restore — destructive; requires the literal confirmation string RESTORE."},"BackupRunOut":{"properties":{"ok":{"type":"boolean","title":"Ok"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"BackupRunOut","description":"POST /admin/backups/run — outcome of an on-demand backup."},"BackupSettingsOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"s3_bucket":{"type":"string","title":"S3 Bucket"},"prefix":{"type":"string","title":"Prefix"},"daily_at":{"type":"string","title":"Daily At"},"keep_last":{"type":"integer","title":"Keep Last"}},"type":"object","required":["enabled","s3_bucket","prefix","daily_at","keep_last"],"title":"BackupSettingsOut","description":"The `backup` settings group (V4 §4). No secrets here (S3 creds come from the instance/env)."},"BackupSettingsUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"s3_bucket":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"S3 Bucket"},"prefix":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Prefix"},"daily_at":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Daily At"},"keep_last":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Keep Last"}},"type":"object","title":"BackupSettingsUpdate"},"BalanceOut":{"properties":{"balance":{"type":"number","title":"Balance"},"plan":{"type":"string","title":"Plan"},"plan_name":{"type":"string","title":"Plan Name"},"ports":{"type":"integer","title":"Ports"},"active_calls":{"type":"integer","title":"Active Calls"},"cycle_minutes_used":{"type":"number","title":"Cycle Minutes Used"},"included_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Included Minutes"},"per_minute_rate":{"type":"number","title":"Per Minute Rate"},"plan_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Renews At"}},"type":"object","required":["balance","plan","plan_name","ports","active_calls","cycle_minutes_used","included_minutes","per_minute_rate","plan_renews_at"],"title":"BalanceOut"},"BillingAddressOut":{"properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"province":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Province"}},"type":"object","title":"BillingAddressOut","description":"The billing profile: the street address for the invoice \"Bill to\", plus the tax residency that\ndetermines taxation — outside Canada (or unset country) = tax exempt; CA = GST/HST by province."},"BillingAddressUpdate":{"properties":{"line1":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Line2"},"city":{"anyOf":[{"type":"string","maxLength":96},{"type":"null"}],"title":"City"},"postal_code":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"},"province":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Province"}},"type":"object","title":"BillingAddressUpdate"},"BillingSettingsOut":{"properties":{"analysis_fee_per_call":{"type":"number","title":"Analysis Fee Per Call"},"voice_agent_rates":{"additionalProperties":{"type":"number"},"type":"object","title":"Voice Agent Rates"},"default_pilot_days":{"type":"integer","title":"Default Pilot Days","default":0},"signup_credit_usd":{"type":"number","title":"Signup Credit Usd","default":5.0},"signup_notify_email":{"type":"string","title":"Signup Notify Email","default":""},"invoice_seller_name":{"type":"string","title":"Invoice Seller Name","default":""},"invoice_seller_address":{"type":"string","title":"Invoice Seller Address","default":""},"invoice_gst_number":{"type":"string","title":"Invoice Gst Number","default":""}},"type":"object","required":["analysis_fee_per_call"],"title":"BillingSettingsOut","description":"The `billing` group: the per-call analysis fee charged on a call's first analysis (V4 §6), the\npilot length new accounts get automatically (V6 §3, 0 = off), and the retail per-minute rate of the\nvoice-agent leg per provider (GitHub #7, billed per second; 0 = not charged)."},"BillingSettingsUpdate":{"properties":{"analysis_fee_per_call":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Analysis Fee Per Call"},"voice_agent_rates":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Voice Agent Rates"},"default_pilot_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Default Pilot Days"},"signup_credit_usd":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Signup Credit Usd"},"signup_notify_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Signup Notify Email"},"invoice_seller_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Invoice Seller Name"},"invoice_seller_address":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Invoice Seller Address"},"invoice_gst_number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Invoice Gst Number"}},"type":"object","title":"BillingSettingsUpdate"},"CallAnsweredIn":{"properties":{"call_id":{"type":"string","maxLength":255,"minLength":1,"title":"Call Id"},"call_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Uuid"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"media_ip":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Media Ip"}},"type":"object","required":["call_id"],"title":"CallAnsweredIn"},"CallDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sip_call_id":{"type":"string","title":"Sip Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"origin":{"type":"string","title":"Origin","default":"sip"},"src_ip":{"type":"string","title":"Src Ip"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"dest_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Country"},"dest_host":{"type":"string","title":"Dest Host"},"dest_port":{"type":"integer","title":"Dest Port"},"dest_transport":{"type":"string","title":"Dest Transport"},"media_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Ip"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"sub_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Customer"},"dial_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dial Prefix"},"routed_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Routed Destination Id"},"routed_destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed Destination Label"},"route_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Prefix"},"dest_kind":{"type":"string","title":"Dest Kind","default":"sip"},"dest_tech_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Tech Prefix"},"dest_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Provider"},"agent_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Seconds"},"agent_rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Rate Applied"},"ai_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Mode"},"mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mos"},"jitter_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Jitter Ms"},"packet_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packet Loss Pct"},"qos":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qos"},"codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codec"},"pdd_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdd Ms"},"answer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answer Delay Ms"},"early_media":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Media"},"hangup_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hangup By"},"q850_cause":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Q850 Cause"},"q850_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q850 Text"},"direction":{"type":"string","title":"Direction"},"status":{"type":"string","title":"Status"},"sip_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Code"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"billsec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billsec"},"charged_amount":{"type":"number","title":"Charged Amount"},"rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Applied"},"recording_wav_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Wav Path"},"recording_available":{"type":"boolean","title":"Recording Available","default":false},"transcript_status":{"type":"string","title":"Transcript Status"},"analysis_status":{"type":"string","title":"Analysis Status"},"processing":{"type":"string","title":"Processing","default":"full"},"sampled":{"type":"boolean","title":"Sampled","default":true},"transfer_target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Target"},"transfer_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Status"},"transfer_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Code"},"transfer_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transfer At"},"transfer_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Mode"},"transfer_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Call Id"},"dtmf":{"anyOf":[{"items":{"$ref":"#/components/schemas/DtmfEventOut"},"type":"array"},{"type":"null"}],"title":"Dtmf"},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"analysis":{"anyOf":[{"$ref":"#/components/schemas/AnalysisOut"},{"type":"null"}]},"has_route_alert":{"type":"boolean","title":"Has Route Alert","default":false},"recording_pcap_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recording Pcap Paths"},"captured_headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Captured Headers"},"case_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Case Id"},"routed_to_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed To Label"},"transcript":{"anyOf":[{"$ref":"#/components/schemas/TranscriptMeta"},{"type":"null"}]},"transcript_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Summary"}},"type":"object","required":["id","sip_call_id","customer_id","src_ip","ani","dialed","dest_host","dest_port","dest_transport","media_ip","direction","status","sip_code","end_reason","started_at","answered_at","ended_at","duration_sec","billsec","charged_amount","rate_applied","recording_wav_path","transcript_status","analysis_status","processing_error","created_at","recording_pcap_paths"],"title":"CallDetail"},"CallEndedIn":{"properties":{"call_id":{"type":"string","maxLength":255,"minLength":1,"title":"Call Id"},"call_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Uuid"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"duration_sec":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Duration Sec"},"sip_code":{"anyOf":[{"type":"integer","maximum":699.0,"minimum":100.0},{"type":"null"}],"title":"Sip Code"},"reason":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Reason"},"hangup_by":{"anyOf":[{"type":"string","pattern":"^(caller|callee|system)$"},{"type":"null"}],"title":"Hangup By"},"reason_hdr":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Reason Hdr"},"recording_hint":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Recording Hint"}},"type":"object","required":["call_id"],"title":"CallEndedIn"},"CallFailedIn":{"properties":{"call_id":{"type":"string","maxLength":255,"minLength":1,"title":"Call Id"},"call_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Uuid"},"sip_code":{"anyOf":[{"type":"integer","maximum":699.0,"minimum":100.0},{"type":"null"}],"title":"Sip Code"},"reason":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Reason"},"hangup_by":{"anyOf":[{"type":"string","pattern":"^(caller|callee|system)$"},{"type":"null"}],"title":"Hangup By"},"reason_hdr":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Reason Hdr"}},"type":"object","required":["call_id"],"title":"CallFailedIn"},"CallInspectOut":{"properties":{"call":{"$ref":"#/components/schemas/InspectCall"},"live":{"type":"boolean","title":"Live"},"ladder":{"items":{"$ref":"#/components/schemas/SipLogMessage"},"type":"array","title":"Ladder"},"signalling":{"$ref":"#/components/schemas/InspectSignalling"},"media":{"anyOf":[{"$ref":"#/components/schemas/InspectMedia"},{"type":"null"}]},"quality":{"anyOf":[{"$ref":"#/components/schemas/InspectQuality"},{"type":"null"}]},"pipeline":{"$ref":"#/components/schemas/InspectPipeline"},"verdict":{"anyOf":[{"$ref":"#/components/schemas/InspectVerdict"},{"type":"null"}]},"sampled_at":{"type":"string","format":"date-time","title":"Sampled At"}},"type":"object","required":["call","live","ladder","signalling","pipeline","sampled_at"],"title":"CallInspectOut","description":"Everything the line inspector shows for one call, live or just ended: the call, the SIP\nladder so far, signalling timings, live media stats (while the relay still has the call),\nthe post-call quality, the pipeline state and the verdict once there is one."},"CallList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/CallOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"CallList"},"CallOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sip_call_id":{"type":"string","title":"Sip Call Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"origin":{"type":"string","title":"Origin","default":"sip"},"src_ip":{"type":"string","title":"Src Ip"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"dest_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Country"},"dest_host":{"type":"string","title":"Dest Host"},"dest_port":{"type":"integer","title":"Dest Port"},"dest_transport":{"type":"string","title":"Dest Transport"},"media_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Ip"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"sub_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Customer"},"dial_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dial Prefix"},"routed_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Routed Destination Id"},"routed_destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed Destination Label"},"route_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Prefix"},"dest_kind":{"type":"string","title":"Dest Kind","default":"sip"},"dest_tech_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Tech Prefix"},"dest_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Provider"},"agent_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Seconds"},"agent_rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Agent Rate Applied"},"ai_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Mode"},"mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mos"},"jitter_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Jitter Ms"},"packet_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packet Loss Pct"},"qos":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qos"},"codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codec"},"pdd_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdd Ms"},"answer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answer Delay Ms"},"early_media":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Media"},"hangup_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hangup By"},"q850_cause":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Q850 Cause"},"q850_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q850 Text"},"direction":{"type":"string","title":"Direction"},"status":{"type":"string","title":"Status"},"sip_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Code"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"billsec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billsec"},"charged_amount":{"type":"number","title":"Charged Amount"},"rate_applied":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Applied"},"recording_wav_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Wav Path"},"recording_available":{"type":"boolean","title":"Recording Available","default":false},"transcript_status":{"type":"string","title":"Transcript Status"},"analysis_status":{"type":"string","title":"Analysis Status"},"processing":{"type":"string","title":"Processing","default":"full"},"sampled":{"type":"boolean","title":"Sampled","default":true},"transfer_target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Target"},"transfer_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Status"},"transfer_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Code"},"transfer_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transfer At"},"transfer_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Mode"},"transfer_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transfer Call Id"},"dtmf":{"anyOf":[{"items":{"$ref":"#/components/schemas/DtmfEventOut"},"type":"array"},{"type":"null"}],"title":"Dtmf"},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"analysis":{"anyOf":[{"$ref":"#/components/schemas/AnalysisSummary"},{"type":"null"}]},"has_route_alert":{"type":"boolean","title":"Has Route Alert","default":false}},"type":"object","required":["id","sip_call_id","customer_id","src_ip","ani","dialed","dest_host","dest_port","dest_transport","media_ip","direction","status","sip_code","end_reason","started_at","answered_at","ended_at","duration_sec","billsec","charged_amount","rate_applied","recording_wav_path","transcript_status","analysis_status","processing_error","created_at"],"title":"CallOut"},"CallShareCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"url":{"type":"string","title":"Url"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"view_count":{"type":"integer","title":"View Count"},"last_viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Viewed At"},"active":{"type":"boolean","title":"Active"},"password":{"type":"string","title":"Password"}},"type":"object","required":["id","call_id","url","label","created_by","created_at","expires_at","revoked_at","view_count","last_viewed_at","active","password"],"title":"CallShareCreated","description":"The ONE response that carries the plaintext password (creation and rotate); it is stored only\nas a bcrypt hash, so it can never be shown again."},"CallShareList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallShareOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CallShareList"},"CallShareOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"url":{"type":"string","title":"Url"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"view_count":{"type":"integer","title":"View Count"},"last_viewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Viewed At"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["id","call_id","url","label","created_by","created_at","expires_at","revoked_at","view_count","last_viewed_at","active"],"title":"CallShareOut","description":"A share as its owner sees it — never the password, not even hashed."},"CallStateOut":{"properties":{"call_uuid":{"type":"string","format":"uuid","title":"Call Uuid"},"status":{"type":"string","title":"Status"},"billsec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billsec"},"charged_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charged Amount"},"changed":{"type":"boolean","title":"Changed"}},"type":"object","required":["call_uuid","status","changed"],"title":"CallStateOut"},"CallTransferIn":{"properties":{"call_id":{"type":"string","maxLength":255,"minLength":1,"title":"Call Id"},"call_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Uuid"},"status":{"type":"string","pattern":"^(accepted|refused|completed|failed)$","title":"Status"},"code":{"anyOf":[{"type":"integer","maximum":699.0,"minimum":100.0},{"type":"null"}],"title":"Code"}},"type":"object","required":["call_id","status"],"title":"CallTransferIn","description":"POST /internal/sip/call-transfer: how far the transfer got (accepted | refused | completed |\nfailed) and the SIP code that decided it."},"CallsPerDay":{"properties":{"date":{"type":"string","title":"Date"},"calls":{"type":"integer","title":"Calls"},"high_risk":{"type":"integer","title":"High Risk"}},"type":"object","required":["date","calls","high_risk"],"title":"CallsPerDay"},"CaseCommentCreate":{"properties":{"body":{"type":"string","maxLength":20000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"CaseCommentCreate"},"CaseCommentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"author_kind":{"type":"string","title":"Author Kind"},"author_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Label"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","author_kind","author_label","body","created_at"],"title":"CaseCommentOut"},"CaseCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Description"},"severity":{"type":"string","enum":["low","medium","high","critical"],"title":"Severity","default":"medium"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"}},"type":"object","required":["title"],"title":"CaseCreate","description":"POST /cases — optionally linked to a call (\"Open case\" on the call detail pre-fills the title\nfrom the analysis: entity + probability)."},"CaseDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"case_no":{"type":"integer","title":"Case No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"severity":{"type":"string","title":"Severity"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"assigned_to_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Label"},"comment_count":{"type":"integer","title":"Comment Count","default":0},"comments":{"items":{"$ref":"#/components/schemas/CaseCommentOut"},"type":"array","title":"Comments","default":[]},"call":{"anyOf":[{"$ref":"#/components/schemas/CallOut"},{"type":"null"}]}},"type":"object","required":["id","case_no","customer_id","call_id","title","description","status","severity","created_by","assigned_to","created_at","updated_at"],"title":"CaseDetail","description":"Case detail: the comment thread + the linked call's summary/analysis (customer-safe fields)."},"CaseList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/CaseOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"CaseList"},"CaseOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"case_no":{"type":"integer","title":"Case No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","title":"Status"},"severity":{"type":"string","title":"Severity"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"assigned_to_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To Label"},"comment_count":{"type":"integer","title":"Comment Count","default":0}},"type":"object","required":["id","case_no","customer_id","call_id","title","description","status","severity","created_by","assigned_to","created_at","updated_at"],"title":"CaseOut"},"CaseUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","enum":["open","in_review","resolved","dismissed"]},{"type":"null"}],"title":"Status"},"severity":{"anyOf":[{"type":"string","enum":["low","medium","high","critical"]},{"type":"null"}],"title":"Severity"},"assigned_to":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To"},"clear_assigned_to":{"type":"boolean","title":"Clear Assigned To","default":false}},"type":"object","title":"CaseUpdate","description":"PATCH /cases/{id} — status transitions, severity, assignment (assigned_to must be an active\ncustomer_user of the same customer; null unassigns), title/description edits."},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":72,"minLength":12,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChannelDeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"sent":{"type":"boolean","title":"Sent"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latency_ms":{"type":"integer","title":"Latency Ms","default":0}},"type":"object","required":["id","kind","label","sent"],"title":"ChannelDeliveryOut","description":"One channel's outcome of a test delivery."},"CheckoutRequest":{"properties":{"amount":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":10.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"}},"type":"object","required":["amount"],"title":"CheckoutRequest","description":"POST /customer/payments/checkout — one-time top-up via Stripe Checkout ($25/$50/$100/$250 or a\ncustom amount >= $10)."},"CheckoutSessionOut":{"properties":{"session_id":{"type":"string","title":"Session Id"},"url":{"type":"string","title":"Url"}},"type":"object","required":["session_id","url"],"title":"CheckoutSessionOut","description":"The created Checkout Session: the browser redirects to `url`."},"CliAvailableNumber":{"properties":{"e164":{"type":"string","title":"E164"},"friendly_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friendly Name"},"locality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locality"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"country":{"type":"string","title":"Country"},"address_requirements":{"type":"string","title":"Address Requirements","default":"none"},"beta":{"type":"boolean","title":"Beta","default":false},"monthly_price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Price Usd"},"address_required":{"type":"boolean","title":"Address Required","default":false},"address_on_file":{"type":"boolean","title":"Address On File","default":false},"bundle_required":{"type":"boolean","title":"Bundle Required","default":false},"bundle_on_file":{"type":"boolean","title":"Bundle On File","default":false},"regulation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regulation"},"can_buy":{"type":"boolean","title":"Can Buy","default":true}},"type":"object","required":["e164","country"],"title":"CliAvailableNumber"},"CliCheckCreate":{"properties":{"destination_id":{"type":"string","format":"uuid","title":"Destination Id"},"country":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[A-Za-z]{2}$","title":"Country"},"caller_id":{"anyOf":[{"type":"string","maxLength":32,"pattern":"^\\+?[0-9 ().-]{3,30}$"},{"type":"null"}],"title":"Caller Id"}},"type":"object","required":["destination_id","country"],"title":"CliCheckCreate"},"CliCheckOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"schedule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Schedule Id"},"test_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Test Call Id"},"country":{"type":"string","title":"Country"},"caller_id_sent":{"type":"string","title":"Caller Id Sent"},"cli_delivered":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cli Delivered"},"cli_status":{"type":"string","title":"Cli Status"},"cli_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cli Reason"},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"fee_charged":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fee Charged"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"answered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Answered"},"sip_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Code"},"answer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answer Delay Ms"},"pdd_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdd Ms"},"mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mos"},"jitter_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Jitter Ms"},"packet_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packet Loss Pct"}},"type":"object","required":["id","country","caller_id_sent","cli_status","status","created_at","updated_at"],"title":"CliCheckOut","description":"One verification. ``cli_status``: pending | match | modified | withheld | missing |\nnot_received | failed; ``cli_reason`` (for modified): format | prefix | digits. The test call\nand the call it produced carry the answer time, SIP ladder and per-leg quality."},"CliCoverageCountry":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"kinds":{"items":{"type":"string"},"type":"array","title":"Kinds","default":[]},"numbers":{"type":"integer","title":"Numbers","default":0}},"type":"object","required":["code","name"],"title":"CliCoverageCountry"},"CliCoverageOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"check_fee_usd":{"type":"number","title":"Check Fee Usd"},"countries":{"items":{"$ref":"#/components/schemas/CliCoverageCountry"},"type":"array","title":"Countries"},"requested":{"items":{"type":"string"},"type":"array","title":"Requested","default":[]}},"type":"object","required":["enabled","check_fee_usd","countries"],"title":"CliCoverageOut","description":"What a customer can verify against: the countries the platform holds numbers in, and the\ncountries this account has asked for."},"CliCoverageRequestCreate":{"properties":{"country":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[A-Za-z]{2}$","title":"Country"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["country"],"title":"CliCoverageRequestCreate"},"CliCoverageRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"country":{"type":"string","title":"Country"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ticket Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","country","created_at"],"title":"CliCoverageRequestOut"},"CliDemandFulfilOut":{"properties":{"country":{"type":"string","title":"Country"},"fulfilled":{"type":"integer","title":"Fulfilled"},"emailed":{"type":"integer","title":"Emailed"},"skipped":{"type":"integer","title":"Skipped"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["country","fulfilled","emailed","skipped","failed"],"title":"CliDemandFulfilOut"},"CliDemandOut":{"properties":{"country":{"type":"string","title":"Country"},"requests":{"type":"integer","title":"Requests"},"customers":{"items":{"type":"string"},"type":"array","title":"Customers","default":[]},"open":{"type":"integer","title":"Open","default":0},"fulfilled":{"type":"integer","title":"Fulfilled","default":0},"live":{"type":"boolean","title":"Live","default":false},"last_fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Fulfilled At"}},"type":"object","required":["country","requests"],"title":"CliDemandOut"},"CliProbeNumberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"e164":{"type":"string","title":"E164"},"country":{"type":"string","title":"Country"},"country_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Name"},"kind":{"type":"string","title":"Kind"},"mode":{"type":"string","title":"Mode"},"provider":{"type":"string","title":"Provider"},"provider_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Sid"},"owner_customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Customer Id"},"status":{"type":"string","title":"Status"},"monthly_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"leased_check_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leased Check Id"},"lease_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lease Expires At"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Inbound At"},"inbound_calls":{"type":"integer","title":"Inbound Calls"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","e164","country","kind","mode","provider","status","inbound_calls","created_at"],"title":"CliProbeNumberOut"},"CliProbeNumberUpdate":{"properties":{"status":{"anyOf":[{"type":"string","pattern":"^(active|disabled)$"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Notes"}},"type":"object","title":"CliProbeNumberUpdate"},"CliProviderTestOut":{"properties":{"ok":{"type":"boolean","title":"Ok"},"friendly_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friendly Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"CliProviderTestOut"},"CliPurchase":{"properties":{"e164":{"type":"string","maxLength":24,"minLength":4,"pattern":"^\\+[0-9]{4,20}$","title":"E164"},"country":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[A-Za-z]{2}$","title":"Country"},"kind":{"type":"string","pattern":"^(local|mobile|toll_free|national)$","title":"Kind","default":"local"},"notes":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Notes"}},"type":"object","required":["e164","country"],"title":"CliPurchase"},"CliScheduleCreate":{"properties":{"destination_id":{"type":"string","format":"uuid","title":"Destination Id"},"country":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[A-Za-z]{2}$","title":"Country"},"caller_id":{"anyOf":[{"type":"string","maxLength":32,"pattern":"^\\+?[0-9 ().-]{3,30}$"},{"type":"null"}],"title":"Caller Id"},"interval_hours":{"type":"integer","maximum":168.0,"minimum":1.0,"title":"Interval Hours","default":24},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["destination_id","country"],"title":"CliScheduleCreate"},"CliScheduleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"destination_id":{"type":"string","format":"uuid","title":"Destination Id"},"country":{"type":"string","title":"Country"},"caller_id":{"type":"string","title":"Caller Id"},"interval_hours":{"type":"integer","title":"Interval Hours"},"enabled":{"type":"boolean","title":"Enabled"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","destination_id","country","caller_id","interval_hours","enabled","created_at"],"title":"CliScheduleOut"},"CliScheduleUpdate":{"properties":{"interval_hours":{"anyOf":[{"type":"integer","maximum":168.0,"minimum":1.0},{"type":"null"}],"title":"Interval Hours"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"caller_id":{"anyOf":[{"type":"string","maxLength":32,"pattern":"^\\+?[0-9 ().-]{3,30}$"},{"type":"null"}],"title":"Caller Id"}},"type":"object","title":"CliScheduleUpdate"},"CliSettingsOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"provider":{"type":"string","title":"Provider"},"twilio_account_sid":{"type":"string","title":"Twilio Account Sid"},"twilio_auth_token_set":{"type":"boolean","title":"Twilio Auth Token Set"},"webhook_url":{"type":"string","title":"Webhook Url"},"check_fee_usd":{"type":"number","title":"Check Fee Usd"},"daily_checks_per_account":{"type":"integer","title":"Daily Checks Per Account"},"check_seconds":{"type":"integer","title":"Check Seconds"},"countries_cache":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Countries Cache","default":[]},"effective_webhook_url":{"type":"string","title":"Effective Webhook Url"},"host_credit_usd":{"type":"number","title":"Host Credit Usd","default":0.15},"host_max_numbers_per_account":{"type":"integer","title":"Host Max Numbers Per Account","default":10},"host_test_window_minutes":{"type":"integer","title":"Host Test Window Minutes","default":15},"host_bench_after_misses":{"type":"integer","title":"Host Bench After Misses","default":3}},"type":"object","required":["enabled","provider","twilio_account_sid","twilio_auth_token_set","webhook_url","check_fee_usd","daily_checks_per_account","check_seconds","effective_webhook_url"],"title":"CliSettingsOut"},"CliSettingsUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"twilio_account_sid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Twilio Account Sid"},"twilio_auth_token":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Twilio Auth Token"},"webhook_url":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Webhook Url"},"check_fee_usd":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Check Fee Usd"},"daily_checks_per_account":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Daily Checks Per Account"},"check_seconds":{"anyOf":[{"type":"integer","maximum":60.0,"minimum":5.0},{"type":"null"}],"title":"Check Seconds"},"host_credit_usd":{"anyOf":[{"type":"number","maximum":10.0,"minimum":0.0},{"type":"null"}],"title":"Host Credit Usd"},"host_max_numbers_per_account":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":0.0},{"type":"null"}],"title":"Host Max Numbers Per Account"},"host_test_window_minutes":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":1.0},{"type":"null"}],"title":"Host Test Window Minutes"},"host_bench_after_misses":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Host Bench After Misses"}},"type":"object","title":"CliSettingsUpdate"},"CountryCount":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"type":"string","title":"Name"},"iso":{"type":"boolean","title":"Iso"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["code","name","iso","count"],"title":"CountryCount","description":"Calls in the period by the destination country of the dialed number (services/dial_codes.py),\nlargest first. `code` is ISO 3166-1 alpha-2 (or a private code such as XK / XS); null with name\n\"Unknown\" for numbers that carry no country code. `iso` is false when no flag can be drawn."},"CustomerDashboardOut":{"properties":{"days":{"type":"integer","title":"Days"},"from":{"type":"string","format":"date-time","title":"From"},"to":{"type":"string","format":"date-time","title":"To"},"calls_today":{"type":"integer","title":"Calls Today"},"calls_period":{"type":"integer","title":"Calls Period"},"minutes_period":{"type":"number","title":"Minutes Period"},"spend_period":{"type":"number","title":"Spend Period"},"high_risk_pct":{"type":"number","title":"High Risk Pct"},"risk_distribution":{"items":{"$ref":"#/components/schemas/RiskBucket"},"type":"array","title":"Risk Distribution"},"calls_per_day":{"items":{"$ref":"#/components/schemas/CallsPerDay"},"type":"array","title":"Calls Per Day"},"spend_per_day":{"items":{"$ref":"#/components/schemas/SpendPerDay"},"type":"array","title":"Spend Per Day"},"calls_by_country":{"items":{"$ref":"#/components/schemas/CountryCount"},"type":"array","title":"Calls By Country"},"recent_high_risk":{"items":{"$ref":"#/components/schemas/CallOut"},"type":"array","title":"Recent High Risk"},"balance":{"type":"number","title":"Balance"},"plan":{"$ref":"#/components/schemas/DashboardPlan"},"cycle_minutes_used":{"type":"number","title":"Cycle Minutes Used"},"active_calls":{"type":"integer","title":"Active Calls"}},"type":"object","required":["days","from","to","calls_today","calls_period","minutes_period","spend_period","high_risk_pct","risk_distribution","calls_per_day","spend_per_day","calls_by_country","recent_high_risk","balance","plan","cycle_minutes_used","active_calls"],"title":"CustomerDashboardOut"},"CustomerEventIn":{"properties":{"name":{"type":"string","maxLength":48,"title":"Name"},"props":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Props"},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"}},"type":"object","required":["name"],"title":"CustomerEventIn","description":"One event the portal reports (POST /customer/events): a page view or a feature use."},"CustomerEventOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"props":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Props"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","props","user_id","created_at"],"title":"CustomerEventOut"},"CustomerEventsIn":{"properties":{"events":{"items":{"$ref":"#/components/schemas/CustomerEventIn"},"type":"array","maxItems":50,"title":"Events"}},"type":"object","required":["events"],"title":"CustomerEventsIn"},"CustomerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"province":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Province"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"must_change_password":{"type":"boolean","title":"Must Change Password","default":false},"balance":{"type":"number","title":"Balance"},"plan_code":{"type":"string","title":"Plan Code"},"ports":{"type":"integer","title":"Ports"},"plan_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Started At"},"plan_renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Renews At"},"cycle_minutes_used":{"type":"number","title":"Cycle Minutes Used"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"twofa_enabled":{"type":"boolean","title":"Twofa Enabled","default":false},"dialer_enabled":{"type":"boolean","title":"Dialer Enabled"},"ai_mode":{"type":"string","title":"Ai Mode","default":"power"},"data_region":{"type":"string","title":"Data Region","default":"ca"},"media_region":{"type":"string","title":"Media Region","default":"ca"},"impersonated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impersonated By"},"pilot":{"anyOf":[{"$ref":"#/components/schemas/PilotStatus"},{"type":"null"}]},"profile":{"anyOf":[{"$ref":"#/components/schemas/CustomerProfileOut"},{"type":"null"}]},"terms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Version"},"terms_current_version":{"type":"string","title":"Terms Current Version"}},"type":"object","required":["id","email","company","role","status","balance","plan_code","ports","plan_started_at","plan_renews_at","cycle_minutes_used","webhook_url","created_at"],"title":"CustomerOut"},"CustomerProfileOut":{"properties":{"switch_vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Switch Vendor"},"expected_volume":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Volume"},"contact_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Role"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"referral_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Source"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"profile_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Profile Completed At"}},"type":"object","title":"CustomerProfileOut","description":"The account qualification answers (FEATURES-V7 §2). Every field is optional and free text — we\nvalidate LENGTH, never membership of a list, so an unanticipated answer is never lost.\n``profile_completed_at`` is stamped when the customer submits OR explicitly skips; the onboarding\nstep then stops asking (§3)."},"CustomerProfileUpdate":{"properties":{"switch_vendor":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Switch Vendor"},"expected_volume":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Expected Volume"},"contact_role":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Contact Role"},"region":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Region"},"referral_source":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Referral Source"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"},"skipped":{"type":"boolean","title":"Skipped","default":false}},"type":"object","title":"CustomerProfileUpdate","description":"PUT /customer/profile — a PARTIAL patch: only the keys present in the request body are written.\nSending ``null`` (or \"\") for a key clears that answer. ``skipped: true`` writes NOTHING and only\nstamps ``profile_completed_at`` — nothing here is ever required."},"CustomerUserInvite":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name"}},"type":"object","required":["email"],"title":"CustomerUserInvite","description":"POST /customer/users — owner invites a member: a temp password is generated, a branded welcome\nemail is sent, and the new user must change the password on first login (V3 forced-change flow)."},"CustomerUserInvited":{"properties":{"user":{"$ref":"#/components/schemas/CustomerUserOut"},"welcome_email":{"anyOf":[{"$ref":"#/components/schemas/WelcomeEmailStatus"},{"type":"null"}]}},"type":"object","required":["user"],"title":"CustomerUserInvited","description":"Invite response: the created user + the welcome-email outcome (never fails the invite)."},"CustomerUserList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerUserOut"},"type":"array","title":"Items"},"max_users":{"type":"integer","title":"Max Users","default":10}},"type":"object","required":["items"],"title":"CustomerUserList"},"CustomerUserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"must_change_password":{"type":"boolean","title":"Must Change Password","default":false},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"last_login_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login Ip"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","name","role","is_active","last_login_at","created_at"],"title":"CustomerUserOut","description":"One web login of a customer account (V4 §2)."},"CustomerUserUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"CustomerUserUpdate","description":"PATCH /customer/users/{id} — deactivate/reactivate + rename (owners only)."},"DashboardPlan":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"ports":{"type":"integer","title":"Ports"},"included_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Included Minutes"},"renews_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Renews At"}},"type":"object","required":["code","name","ports","included_minutes","renews_at"],"title":"DashboardPlan"},"DataLocationOut":{"properties":{"data_region":{"type":"string","title":"Data Region","default":"ca"},"media_region":{"type":"string","title":"Media Region","default":"ca"},"default_region":{"type":"string","title":"Default Region","default":"ca"},"regions":{"items":{"$ref":"#/components/schemas/DataRegionOut"},"type":"array","title":"Regions","default":[]}},"type":"object","title":"DataLocationOut","description":"GET/PUT /customer/data-location (docs/SCALING.md §8): where the account's media is stored\n(``data_region``) and which region's relay carries its calls (``media_region``); ``regions`` lists\nevery region with what is available there. Call records, transcripts and analyses stay in the\nplatform database in Canada whatever the choice."},"DataLocationUpdate":{"properties":{"data_region":{"anyOf":[{"type":"string","pattern":"^(ca|us)$"},{"type":"null"}],"title":"Data Region"},"media_region":{"anyOf":[{"type":"string","pattern":"^(ca|us)$"},{"type":"null"}],"title":"Media Region"}},"type":"object","title":"DataLocationUpdate"},"DataRegionOut":{"properties":{"code":{"type":"string","title":"Code"},"label":{"type":"string","title":"Label"},"detail":{"type":"string","title":"Detail"},"storage_available":{"type":"boolean","title":"Storage Available"},"media_available":{"type":"boolean","title":"Media Available"}},"type":"object","required":["code","label","detail","storage_available","media_available"],"title":"DataRegionOut"},"DestinationCreate":{"properties":{"host":{"type":"string","maxLength":255,"title":"Host"},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port","default":5060},"transport":{"type":"string","enum":["udp","tcp","tls"],"title":"Transport","default":"udp"},"is_default":{"type":"boolean","title":"Is Default","default":false},"label":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Label"},"kind":{"type":"string","enum":["sip","voice_ai"],"title":"Kind","default":"sip"},"provider":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Provider"},"agent_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Agent Id"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"tech_prefix":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Tech Prefix"},"monitor_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monitor Enabled"},"processing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing"},"sample_rate":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Sample Rate"},"sample_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Mode"},"transfer_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Mode"},"auth_username":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Auth Username","description":"Digest username the proxy answers this destination's 401/407 challenge with: a voice agent, or a SIP carrier or PBX that wants digest on top of the IP whitelist. Write-only."},"auth_password":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Auth Password","description":"Digest password, sent with auth_username. Write-only: stored sealed, never returned."},"auth_realm":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Auth Realm","description":"Optional realm. Empty = answer whatever realm the destination challenges with."},"webhook_secret":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Webhook Secret"},"provider_api_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Provider Api Key"}},"type":"object","required":["host"],"title":"DestinationCreate"},"DestinationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"transport":{"type":"string","title":"Transport"},"is_default":{"type":"boolean","title":"Is Default"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"kind":{"type":"string","title":"Kind"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"tech_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tech Prefix"},"has_credential":{"type":"boolean","title":"Has Credential","description":"A digest credential is stored on this destination (any kind).","default":false},"needs_credential":{"type":"boolean","title":"Needs Credential","description":"A voice agent whose provider challenges the INVITE, with no credential stored yet.","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"has_webhook_secret":{"type":"boolean","title":"Has Webhook Secret","default":false},"has_provider_key":{"type":"boolean","title":"Has Provider Key","default":false},"needs_webhook":{"type":"boolean","title":"Needs Webhook","default":false},"webhook_last_event_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Webhook Last Event At"},"webhook_last_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Last Status"},"webhook_last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Last Error"},"monitor_enabled":{"type":"boolean","title":"Monitor Enabled","default":false},"processing":{"type":"string","title":"Processing","default":"full"},"sample_rate":{"type":"integer","title":"Sample Rate","default":1},"sample_mode":{"type":"string","title":"Sample Mode","default":"analyse"},"transfer_mode":{"type":"string","title":"Transfer Mode","default":"platform"},"monitor_supported":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monitor Supported"},"monitor_status":{"type":"string","title":"Monitor Status","default":"unknown"},"monitor_last_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Monitor Last Check At"},"monitor_last_change_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Monitor Last Change At"},"monitor_rtt_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monitor Rtt Ms"},"monitor_last_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monitor Last Code"},"monitor_last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monitor Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","host","port","transport","is_default","label","kind","provider","agent_id","config","tech_prefix","created_at"],"title":"DestinationOut"},"DestinationUpdate":{"properties":{"host":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Host"},"port":{"anyOf":[{"type":"integer","maximum":65535.0,"minimum":1.0},{"type":"null"}],"title":"Port"},"transport":{"anyOf":[{"type":"string","enum":["udp","tcp","tls"]},{"type":"null"}],"title":"Transport"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"label":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Label"},"kind":{"anyOf":[{"type":"string","enum":["sip","voice_ai"]},{"type":"null"}],"title":"Kind"},"provider":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Provider"},"agent_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Agent Id"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"tech_prefix":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Tech Prefix"},"monitor_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monitor Enabled"},"processing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing"},"sample_rate":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":1.0},{"type":"null"}],"title":"Sample Rate"},"sample_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Mode"},"transfer_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transfer Mode"},"auth_username":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Auth Username","description":"Digest username the proxy answers this destination's 401/407 challenge with: a voice agent, or a SIP carrier or PBX that wants digest on top of the IP whitelist. Write-only."},"auth_password":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Auth Password","description":"Digest password, sent with auth_username. Write-only: stored sealed, never returned."},"auth_realm":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Auth Realm","description":"Optional realm. Empty = answer whatever realm the destination challenges with."},"clear_credential":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Clear Credential","description":"Remove the stored digest credential (ignored when a new one is sent)."},"webhook_secret":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Webhook Secret"},"provider_api_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Provider Api Key"},"clear_webhook_secret":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Clear Webhook Secret"},"clear_provider_key":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Clear Provider Key"},"rotate_webhook_token":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rotate Webhook Token"}},"type":"object","title":"DestinationUpdate"},"DialerSessionIn":{"properties":{"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"}},"type":"object","title":"DialerSessionIn","description":"POST /customer/dialer/session — destination_id pins the route to test; None = route the call\nlike production traffic (routing rules by dialed number, then the default destination)."},"DialerSessionOut":{"properties":{"token":{"type":"string","title":"Token"},"ws_url":{"type":"string","title":"Ws Url"},"sip_domain":{"type":"string","title":"Sip Domain"},"expires_in":{"type":"integer","title":"Expires In"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination Label"}},"type":"object","required":["token","ws_url","sip_domain","expires_in"],"title":"DialerSessionOut"},"DtmfEventOut":{"properties":{"t":{"type":"number","title":"T"},"digit":{"type":"string","title":"Digit"},"channel":{"type":"string","title":"Channel","default":"caller"},"ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ms"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["t","digit"],"title":"DtmfEventOut","description":"One key pressed on a call (GitHub #9): seconds into the call, the digit (0-9, *, #, A-D), which\nside pressed it, how long it was held in ms (from the recording), and `source` \"agent\" when the\nvoice agent's session reported it live rather than the recording."},"EntityCount":{"properties":{"entity":{"type":"string","title":"Entity"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["entity","count"],"title":"EntityCount"},"GettingStarted":{"properties":{"password_changed":{"type":"boolean","title":"Password Changed"},"ai_keys_present":{"type":"boolean","title":"Ai Keys Present"},"ai_configured":{"type":"boolean","title":"Ai Configured"},"has_customer":{"type":"boolean","title":"Has Customer"},"has_call":{"type":"boolean","title":"Has Call"}},"type":"object","required":["password_changed","ai_keys_present","ai_configured","has_customer","has_call"],"title":"GettingStarted"},"GrowthChannel":{"properties":{"channel":{"type":"string","title":"Channel"},"signups":{"type":"integer","title":"Signups"},"activated":{"type":"integer","title":"Activated"},"paid":{"type":"integer","title":"Paid"}},"type":"object","required":["channel","signups","activated","paid"],"title":"GrowthChannel"},"GrowthCohort":{"properties":{"week":{"type":"string","title":"Week"},"signups":{"type":"integer","title":"Signups"},"activated":{"type":"integer","title":"Activated"},"paid":{"type":"integer","title":"Paid"},"active_now":{"type":"integer","title":"Active Now"}},"type":"object","required":["week","signups","activated","paid","active_now"],"title":"GrowthCohort"},"GrowthFunnelStep":{"properties":{"step":{"type":"string","title":"Step"},"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"},"pct":{"type":"number","title":"Pct"},"median_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Hours"}},"type":"object","required":["step","label","count","pct","median_hours"],"title":"GrowthFunnelStep"},"GrowthLead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"volume":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volume"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","created_at","name","email","source","status"],"title":"GrowthLead"},"GrowthLeads":{"properties":{"count":{"type":"integer","title":"Count"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"},"recent":{"items":{"$ref":"#/components/schemas/GrowthLead"},"type":"array","title":"Recent"}},"type":"object","required":["count","by_status","recent"],"title":"GrowthLeads","description":"Requests to talk from the website's setup-call form in the window (alembic 0057)."},"GrowthOut":{"properties":{"days":{"type":"integer","title":"Days"},"from":{"type":"string","format":"date-time","title":"From"},"to":{"type":"string","format":"date-time","title":"To"},"signups":{"type":"integer","title":"Signups"},"activated":{"type":"integer","title":"Activated"},"paid":{"type":"integer","title":"Paid"},"active_7d":{"type":"integer","title":"Active 7D"},"per_day":{"items":{"$ref":"#/components/schemas/GrowthPoint"},"type":"array","title":"Per Day"},"funnel":{"items":{"$ref":"#/components/schemas/GrowthFunnelStep"},"type":"array","title":"Funnel"},"sources":{"items":{"$ref":"#/components/schemas/GrowthSource"},"type":"array","title":"Sources"},"channels":{"items":{"$ref":"#/components/schemas/GrowthChannel"},"type":"array","title":"Channels"},"cohorts":{"items":{"$ref":"#/components/schemas/GrowthCohort"},"type":"array","title":"Cohorts"},"recent":{"items":{"$ref":"#/components/schemas/GrowthSignup"},"type":"array","title":"Recent"},"site":{"anyOf":[{"$ref":"#/components/schemas/GrowthSiteOut"},{"type":"null"}]},"top_pages":{"items":{"$ref":"#/components/schemas/GrowthUsage"},"type":"array","title":"Top Pages"},"top_features":{"items":{"$ref":"#/components/schemas/GrowthUsage"},"type":"array","title":"Top Features"},"leads":{"anyOf":[{"$ref":"#/components/schemas/GrowthLeads"},{"type":"null"}]}},"type":"object","required":["days","from","to","signups","activated","paid","active_7d","per_day","funnel","sources","channels","cohorts","recent","top_pages","top_features"],"title":"GrowthOut"},"GrowthPoint":{"properties":{"date":{"type":"string","title":"Date"},"signups":{"type":"integer","title":"Signups"},"activated":{"type":"integer","title":"Activated"},"paid":{"type":"integer","title":"Paid"}},"type":"object","required":["date","signups","activated","paid"],"title":"GrowthPoint"},"GrowthSignup":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"channel":{"type":"string","title":"Channel"},"source":{"type":"string","title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"reached":{"type":"string","title":"Reached"},"calls":{"type":"integer","title":"Calls"},"spend":{"type":"number","title":"Spend"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"}},"type":"object","required":["id","email","company","channel","source","created_at","reached","calls","spend","last_seen_at"],"title":"GrowthSignup"},"GrowthSiteOut":{"properties":{"since":{"type":"string","format":"date-time","title":"Since"},"collecting_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Collecting Since"},"visits":{"type":"integer","title":"Visits"},"visitors":{"type":"integer","title":"Visitors"},"ai_crawls":{"type":"integer","title":"Ai Crawls"},"search_crawls":{"type":"integer","title":"Search Crawls"},"per_day":{"items":{"$ref":"#/components/schemas/SitePoint"},"type":"array","title":"Per Day"},"by_source":{"items":{"$ref":"#/components/schemas/SiteSourceGroup"},"type":"array","title":"By Source"},"sources":{"items":{"$ref":"#/components/schemas/SiteSource"},"type":"array","title":"Sources"},"top_pages":{"items":{"$ref":"#/components/schemas/SitePage"},"type":"array","title":"Top Pages"},"landing_pages":{"items":{"$ref":"#/components/schemas/SitePage"},"type":"array","title":"Landing Pages"},"referrers":{"items":{"$ref":"#/components/schemas/SiteReferrer"},"type":"array","title":"Referrers"},"campaigns":{"items":{"$ref":"#/components/schemas/SiteCampaign"},"type":"array","title":"Campaigns"},"ai_crawlers":{"items":{"$ref":"#/components/schemas/SiteCrawler"},"type":"array","title":"Ai Crawlers"},"search_crawlers":{"items":{"$ref":"#/components/schemas/SiteCrawler"},"type":"array","title":"Search Crawlers"},"devices":{"additionalProperties":{"type":"integer"},"type":"object","title":"Devices"},"countries":{"items":{"$ref":"#/components/schemas/SiteCountry"},"type":"array","title":"Countries"}},"type":"object","required":["since","collecting_since","visits","visitors","ai_crawls","search_crawls","per_day","by_source","sources","top_pages","landing_pages","referrers","campaigns","ai_crawlers","search_crawlers","devices","countries"],"title":"GrowthSiteOut","description":"The public website's traffic in the window, from the web server's access log: human page\nviews and distinct daily visitors, where they came from, what they read, and the AI and search\ncrawlers that read the site (answer-engine and search reach)."},"GrowthSource":{"properties":{"source":{"type":"string","title":"Source"},"signups":{"type":"integer","title":"Signups"},"activated":{"type":"integer","title":"Activated"},"paid":{"type":"integer","title":"Paid"},"activated_pct":{"type":"number","title":"Activated Pct"},"paid_pct":{"type":"number","title":"Paid Pct"}},"type":"object","required":["source","signups","activated","paid","activated_pct","paid_pct"],"title":"GrowthSource"},"GrowthUsage":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"},"customers":{"type":"integer","title":"Customers"}},"type":"object","required":["name","count","customers"],"title":"GrowthUsage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthOut":{"properties":{"status":{"type":"string","title":"Status"},"db":{"type":"boolean","title":"Db"},"version":{"type":"string","title":"Version"}},"type":"object","required":["status","db","version"],"title":"HealthOut"},"HostedDemandCountry":{"properties":{"country":{"type":"string","title":"Country"},"name":{"type":"string","title":"Name"},"requests":{"type":"integer","title":"Requests"}},"type":"object","required":["country","name","requests"],"title":"HostedDemandCountry"},"HostedLegOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"purpose":{"type":"string","title":"Purpose"},"outcome":{"type":"string","title":"Outcome"},"from_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From User"},"src_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Src Ip"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"rtp_frames_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rtp Frames In"}},"type":"object","required":["id","purpose","outcome","started_at"],"title":"HostedLegOut"},"HostedNumberAdminOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"e164":{"type":"string","title":"E164"},"country":{"type":"string","title":"Country"},"country_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Name"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"test_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Test Started At"},"test_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Test Expires At"},"test_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Test Result"},"consecutive_misses":{"type":"integer","title":"Consecutive Misses","default":0},"uses":{"type":"integer","title":"Uses","default":0},"earned_total":{"type":"number","title":"Earned Total"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Inbound At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"pointing":{"anyOf":[{"$ref":"#/components/schemas/HostedPointingOut"},{"type":"null"}]},"legs":{"items":{"$ref":"#/components/schemas/HostedLegOut"},"type":"array","title":"Legs","default":[]},"owner_customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Customer Id"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"owner_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Company"}},"type":"object","required":["id","e164","country","kind","status","earned_total","created_at"],"title":"HostedNumberAdminOut"},"HostedNumberAdminUpdate":{"properties":{"status":{"type":"string","pattern":"^(suspended|pointing)$","title":"Status"}},"type":"object","required":["status"],"title":"HostedNumberAdminUpdate"},"HostedNumberCreate":{"properties":{"e164":{"type":"string","maxLength":24,"minLength":7,"title":"E164"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"kind":{"type":"string","pattern":"^(mobile|landline|toll_free)$","title":"Kind","default":"mobile"}},"type":"object","required":["e164","country"],"title":"HostedNumberCreate"},"HostedNumberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"e164":{"type":"string","title":"E164"},"country":{"type":"string","title":"Country"},"country_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Name"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"test_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Test Started At"},"test_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Test Expires At"},"test_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Test Result"},"consecutive_misses":{"type":"integer","title":"Consecutive Misses","default":0},"uses":{"type":"integer","title":"Uses","default":0},"earned_total":{"type":"number","title":"Earned Total"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Inbound At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"pointing":{"anyOf":[{"$ref":"#/components/schemas/HostedPointingOut"},{"type":"null"}]},"legs":{"items":{"$ref":"#/components/schemas/HostedLegOut"},"type":"array","title":"Legs","default":[]}},"type":"object","required":["id","e164","country","kind","status","earned_total","created_at"],"title":"HostedNumberOut"},"HostedNumberUpdate":{"properties":{"status":{"type":"string","pattern":"^(active|paused)$","title":"Status"}},"type":"object","required":["status"],"title":"HostedNumberUpdate"},"HostedNumbersOut":{"properties":{"numbers":{"items":{"$ref":"#/components/schemas/HostedNumberOut"},"type":"array","title":"Numbers"},"pointing":{"$ref":"#/components/schemas/HostedPointingOut"},"credit_per_use":{"type":"number","title":"Credit Per Use"},"max_numbers":{"type":"integer","title":"Max Numbers"},"test_window_minutes":{"type":"integer","title":"Test Window Minutes"},"earned_total":{"type":"number","title":"Earned Total"},"uses":{"type":"integer","title":"Uses"},"demand":{"items":{"$ref":"#/components/schemas/HostedDemandCountry"},"type":"array","title":"Demand","default":[]}},"type":"object","required":["numbers","pointing","credit_per_use","max_numbers","test_window_minutes","earned_total","uses"],"title":"HostedNumbersOut"},"HostedPointingOut":{"properties":{"sip_host":{"type":"string","title":"Sip Host"},"sip_port":{"type":"integer","title":"Sip Port"},"transports":{"items":{"type":"string"},"type":"array","title":"Transports"},"sip_uri":{"type":"string","title":"Sip Uri"},"source_ips":{"items":{"type":"string"},"type":"array","title":"Source Ips"},"codecs":{"items":{"type":"string"},"type":"array","title":"Codecs"},"request_uri_user":{"type":"string","title":"Request Uri User"},"note":{"type":"string","title":"Note"}},"type":"object","required":["sip_host","sip_port","transports","sip_uri","source_ips","codecs","request_uri_user","note"],"title":"HostedPointingOut"},"ImpersonateResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"customer":{"$ref":"#/components/schemas/SessionCustomer"}},"type":"object","required":["access_token","expires_in","customer"],"title":"ImpersonateResponse","description":"Result of POST /admin/customers/{id}/impersonate: a short-lived customer-scoped access token (no\nrefresh cookie) plus the target customer summary for the admin UI banner."},"InfraCostDayOut":{"properties":{"date":{"type":"string","title":"Date"},"total":{"type":"number","title":"Total"}},"type":"object","required":["date","total"],"title":"InfraCostDayOut"},"InfraCostOut":{"properties":{"available":{"type":"boolean","title":"Available"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"currency":{"type":"string","title":"Currency","default":"USD"},"scope":{"type":"string","title":"Scope","default":"account"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"month":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Month"},"month_to_date":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Month To Date"},"last_month":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Month"},"forecast_month":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Forecast Month"},"run_rate_day":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Run Rate Day"},"run_rate_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Run Rate Hour"},"by_service":{"items":{"$ref":"#/components/schemas/InfraCostServiceOut"},"type":"array","title":"By Service","default":[]},"by_product":{"items":{"$ref":"#/components/schemas/InfraCostProductOut"},"type":"array","title":"By Product","default":[]},"daily":{"items":{"$ref":"#/components/schemas/InfraCostDayOut"},"type":"array","title":"Daily","default":[]},"updated_at":{"type":"string","title":"Updated At"},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["available","updated_at"],"title":"InfraCostOut","description":"GET /admin/infra/costs: what the AWS infrastructure behind this deployment costs, from Cost\nExplorer (services/cloud_cost.py). `available: false` carries the reason and what to do."},"InfraCostProductOut":{"properties":{"product":{"type":"string","title":"Product"},"service":{"type":"string","title":"Service"},"usage_type":{"type":"string","title":"Usage Type"},"month_to_date":{"type":"number","title":"Month To Date"},"last_month":{"type":"number","title":"Last Month"}},"type":"object","required":["product","service","usage_type","month_to_date","last_month"],"title":"InfraCostProductOut","description":"One billing line: the product a person would name, the service and raw usage type behind it."},"InfraCostServiceOut":{"properties":{"service":{"type":"string","title":"Service"},"month_to_date":{"type":"number","title":"Month To Date"},"last_month":{"type":"number","title":"Last Month"}},"type":"object","required":["service","month_to_date","last_month"],"title":"InfraCostServiceOut"},"InspectCall":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"sub_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Customer"},"dest_host":{"type":"string","title":"Dest Host"},"dest_port":{"type":"integer","title":"Dest Port"},"dest_transport":{"type":"string","title":"Dest Transport"},"dest_kind":{"type":"string","title":"Dest Kind"},"dest_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Provider"},"routed_destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed Destination Label"},"route_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Prefix"},"media_node":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Node"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"elapsed_sec":{"type":"integer","title":"Elapsed Sec"},"max_call_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Call Seconds"},"remaining_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining Sec"},"src_ip":{"type":"string","title":"Src Ip"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"billsec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billsec"},"sip_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Code"},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Reason"},"hangup_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hangup By"},"q850_cause":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Q850 Cause"},"q850_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q850 Text"}},"type":"object","required":["id","status","ani","dialed","external_id","external_name","dest_host","dest_port","dest_transport","dest_kind","route_prefix","media_node","started_at","answered_at","elapsed_sec","max_call_seconds","remaining_sec","src_ip"],"title":"InspectCall","description":"The live-call shape plus what an ended call adds."},"InspectLeg":{"properties":{"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"packets":{"type":"integer","title":"Packets","default":0},"bytes":{"type":"integer","title":"Bytes","default":0},"errors":{"type":"integer","title":"Errors","default":0},"last_packet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Packet"},"ssrc":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ssrc"},"lost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lost"},"loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss Pct"},"jitter_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Jitter Ms"},"rtt_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rtt Ms"},"mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mos"}},"type":"object","title":"InspectLeg","description":"One media leg as the relay sees it right now. Counts are the relay's own; jitter, loss,\nround-trip time and MOS are what the far end reported in RTCP, null when it sends none."},"InspectMedia":{"properties":{"sampled_at":{"type":"string","format":"date-time","title":"Sampled At"},"legs":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/InspectLeg"},{"type":"null"}]},"type":"object","title":"Legs"}},"type":"object","required":["sampled_at","legs"],"title":"InspectMedia"},"InspectPipeline":{"properties":{"transcript_status":{"type":"string","title":"Transcript Status"},"analysis_status":{"type":"string","title":"Analysis Status"},"processing":{"type":"string","title":"Processing","default":"full"},"sampled":{"type":"boolean","title":"Sampled","default":true},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error"}},"type":"object","required":["transcript_status","analysis_status"],"title":"InspectPipeline"},"InspectQuality":{"properties":{"mos":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mos"},"jitter_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Jitter Ms"},"packet_loss_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packet Loss Pct"},"legs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Legs"}},"type":"object","title":"InspectQuality","description":"Post-call quality measured from the recording (alembic 0025), once the decode stage ran."},"InspectSignalling":{"properties":{"pdd_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pdd Ms"},"answer_delay_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answer Delay Ms"},"early_media":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Media"},"codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codec"}},"type":"object","title":"InspectSignalling"},"InspectVerdict":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"probability":{"type":"integer","title":"Probability"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"recommendation":{"type":"string","title":"Recommendation"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["probability","recommendation"],"title":"InspectVerdict"},"IntegrationsSettingsOut":{"properties":{"slack_client_id":{"type":"string","title":"Slack Client Id"},"slack_client_secret_set":{"type":"boolean","title":"Slack Client Secret Set"},"slack_redirect_uri":{"type":"string","title":"Slack Redirect Uri"},"slack_oauth_configured":{"type":"boolean","title":"Slack Oauth Configured"}},"type":"object","required":["slack_client_id","slack_client_secret_set","slack_redirect_uri","slack_oauth_configured"],"title":"IntegrationsSettingsOut","description":"GET /admin/integrations — the platform's Slack app (secret redacted to a boolean) and the\nredirect URI the app must list, derived from PUBLIC_BASE_URL."},"IntegrationsSettingsUpdate":{"properties":{"slack_client_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Slack Client Id"},"slack_client_secret":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Slack Client Secret"}},"type":"object","title":"IntegrationsSettingsUpdate","description":"PUT /admin/integrations — partial; the secret is write-only (empty keeps the stored value)."},"InvoiceList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvoiceOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"InvoiceList"},"InvoiceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"number":{"type":"string","title":"Number"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"currency":{"type":"string","title":"Currency"},"subtotal":{"type":"number","title":"Subtotal"},"tax_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Label"},"tax_rate":{"type":"number","title":"Tax Rate"},"tax_amount":{"type":"number","title":"Tax Amount"},"total":{"type":"number","title":"Total"},"lines":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Lines"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"type":"string","title":"Status"},"emailed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Emailed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","number","period_start","period_end","currency","subtotal","tax_rate","tax_amount","total","lines","status","created_at"],"title":"InvoiceOut","description":"One monthly usage invoice (statement of the month's charges + GST/HST for CA customers)."},"IpCreate":{"properties":{"cidr":{"type":"string","maxLength":64,"title":"Cidr"},"label":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Label"},"dial_prefix":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Dial Prefix"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["cidr"],"title":"IpCreate"},"IpOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cidr":{"type":"string","title":"Cidr"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"dial_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dial Prefix"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","cidr","label","destination_id","enabled","created_at"],"title":"IpOut"},"IpUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Label"},"dial_prefix":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Dial Prefix"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"IpUpdate","description":"PATCH /customer/ips/{id}: any of label, dial prefix, destination and enabled (the CIDR is fixed:\ndelete and add to move a range, so the cross-account overlap check always runs on a new range)."},"JobCounts":{"properties":{"queued":{"type":"integer","title":"Queued"},"running":{"type":"integer","title":"Running"},"failed":{"type":"integer","title":"Failed"},"dead":{"type":"integer","title":"Dead"}},"type":"object","required":["queued","running","failed","dead"],"title":"JobCounts"},"JobList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/JobOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"JobList"},"JobOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"type":"string","title":"Type"},"queue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"max_attempts":{"type":"integer","title":"Max Attempts"},"run_after":{"type":"string","format":"date-time","title":"Run After"},"locked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Locked At"},"locked_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locked By"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"customer_company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Company"},"stt_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stt Provider"},"stt_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stt Model"},"ai_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Provider"},"ai_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Model"},"analysis_probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Analysis Probability"}},"type":"object","required":["id","type","payload","status","attempts","max_attempts","run_after","locked_at","locked_by","last_error","created_at","updated_at"],"title":"JobOut"},"JourneyMilestone":{"properties":{"step":{"type":"string","title":"Step"},"label":{"type":"string","title":"Label"},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"}},"type":"object","required":["step","label","at"],"title":"JourneyMilestone"},"JourneyOut":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"channel":{"type":"string","title":"Channel"},"source":{"type":"string","title":"Source"},"attribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribution"},"signed_up_at":{"type":"string","format":"date-time","title":"Signed Up At"},"milestones":{"items":{"$ref":"#/components/schemas/JourneyMilestone"},"type":"array","title":"Milestones"},"events":{"items":{"$ref":"#/components/schemas/CustomerEventOut"},"type":"array","title":"Events"}},"type":"object","required":["customer_id","channel","source","attribution","signed_up_at","milestones","events"],"title":"JourneyOut"},"KeywordCount":{"properties":{"keyword":{"type":"string","title":"Keyword"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["keyword","count"],"title":"KeywordCount"},"LeadCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Company"},"platform":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Platform"},"volume":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Volume"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"},"page":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Page"},"attribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribution"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"}},"type":"object","required":["name","email"],"title":"LeadCreate","description":"The \"book a setup call\" form on the public website (POST /public/leads)."},"LeadOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"volume":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volume"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"attribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribution"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","email","company","platform","volume","message","page","attribution","status","created_at"],"title":"LeadOut"},"LeadUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"LeadUpdate"},"LedgerList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/LedgerOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"LedgerList"},"LedgerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"type":"string","title":"Type"},"amount":{"type":"number","title":"Amount"},"balance_after":{"type":"number","title":"Balance After"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"waived_amount":{"type":"number","title":"Waived Amount","default":0.0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","amount","balance_after","call_id","description","created_at"],"title":"LedgerOut"},"LiveByCustomer":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"active":{"type":"integer","title":"Active"}},"type":"object","required":["customer_id","company","active"],"title":"LiveByCustomer"},"LiveCall":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Name"},"sub_customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Customer"},"dest_host":{"type":"string","title":"Dest Host"},"dest_port":{"type":"integer","title":"Dest Port"},"dest_transport":{"type":"string","title":"Dest Transport"},"dest_kind":{"type":"string","title":"Dest Kind"},"dest_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Provider"},"routed_destination_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routed Destination Label"},"route_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Prefix"},"media_node":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Node"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"elapsed_sec":{"type":"integer","title":"Elapsed Sec"},"max_call_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Call Seconds"},"remaining_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining Sec"}},"type":"object","required":["id","status","ani","dialed","external_id","external_name","dest_host","dest_port","dest_transport","dest_kind","route_prefix","media_node","started_at","answered_at","elapsed_sec","max_call_seconds","remaining_sec"],"title":"LiveCall","description":"One in-progress call (status ringing/active) for the customer Live page. `elapsed_sec` is\nnow - (answered_at or started_at); `remaining_sec` is the credit countdown (max_call_seconds -\nelapsed) once answered, else null (an unanswered call is not yet billing)."},"LiveCallsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LiveCall"},"type":"array","title":"Items"},"active_count":{"type":"integer","title":"Active Count"},"ports":{"type":"integer","title":"Ports"},"ports_in_use":{"type":"integer","title":"Ports In Use"}},"type":"object","required":["items","active_count","ports","ports_in_use"],"title":"LiveCallsOut"},"LiveSummary":{"properties":{"active_total":{"type":"integer","title":"Active Total"},"ringing":{"type":"integer","title":"Ringing"},"answered":{"type":"integer","title":"Answered"},"by_customer":{"items":{"$ref":"#/components/schemas/LiveByCustomer"},"type":"array","title":"By Customer"}},"type":"object","required":["active_total","ringing","answered","by_customer"],"title":"LiveSummary"},"LocalSttModelOut":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"expected_mb":{"type":"integer","title":"Expected Mb"},"size_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Size Mb"},"state":{"type":"string","title":"State"},"progress":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress"},"configured":{"type":"boolean","title":"Configured","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"downloaded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downloaded At"}},"type":"object","required":["id","label","expected_mb","state"],"title":"LocalSttModelOut","description":"One faster-whisper size on this node (services/local_models.py)."},"LocalSttModelsOut":{"properties":{"dir":{"type":"string","title":"Dir"},"writable":{"type":"boolean","title":"Writable"},"runtime_available":{"type":"boolean","title":"Runtime Available"},"models":{"items":{"$ref":"#/components/schemas/LocalSttModelOut"},"type":"array","title":"Models"}},"type":"object","required":["dir","writable","runtime_available","models"],"title":"LocalSttModelsOut"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LowBalanceAlertOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"threshold":{"type":"number","title":"Threshold","default":50.0},"armed":{"type":"boolean","title":"Armed","default":false},"notified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Notified At"},"balance":{"type":"number","title":"Balance","default":0.0}},"type":"object","title":"LowBalanceAlertOut","description":"GET/PUT /customer/low-balance-alert: one notice (e-mail + notification channels) when the\nprepaid balance drops under ``threshold`` (US$). ``armed`` is true once the balance has been at or\nabove the threshold (the notice fires on the drop and clears it; a top-up arms the next one);\n``notified_at`` is when the last notice went out."},"LowBalanceAlertUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"threshold":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Threshold"}},"type":"object","title":"LowBalanceAlertUpdate"},"MediaTokenOut":{"properties":{"url":{"type":"string","title":"Url"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["url","expires_in"],"title":"MediaTokenOut","description":"A short-lived URL the portal's audio player loads directly (GET /calls/{id}/recording-token).\n\nA media element cannot send an Authorization header, so the credential rides in the URL. It is\nscoped to one call and one account; see app.services.media_token for why that is acceptable here."},"ModelInfo":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"input_per_mtok":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Per Mtok"},"output_per_mtok":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Per Mtok"},"per_minute":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Per Minute"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"list_input_per_mtok":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"List Input Per Mtok"},"list_output_per_mtok":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"List Output Per Mtok"},"list_per_minute":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"List Per Minute"},"overridden":{"type":"boolean","title":"Overridden","default":false},"discovered":{"type":"boolean","title":"Discovered","default":false},"released":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Released"}},"type":"object","required":["id","label"],"title":"ModelInfo"},"ModelRegistryOut":{"properties":{"ai":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ModelInfo"},"type":"array"},"type":"object","title":"Ai"},"stt":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ModelInfo"},"type":"array"},"type":"object","title":"Stt"},"current":{"$ref":"#/components/schemas/SettingsOut"}},"type":"object","required":["ai","stt","current"],"title":"ModelRegistryOut"},"NetworkInfoOut":{"properties":{"ingress_host":{"type":"string","title":"Ingress Host"},"ingress_port":{"type":"integer","title":"Ingress Port","default":5060},"transports":{"items":{"type":"string"},"type":"array","title":"Transports","default":["udp","tcp"]}},"type":"object","required":["ingress_host"],"title":"NetworkInfoOut","description":"GET /customer/network-info — where the customer must point their SIP traffic (FEATURES-V4 s1)."},"NodeSampleOut":{"properties":{"ts":{"type":"string","format":"date-time","title":"Ts"},"cpu_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Pct"},"mem_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mem Pct"},"mem_used_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mem Used Mb"},"mem_total_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mem Total Mb"},"disk_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Disk Pct"},"disk_used_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Used Mb"},"disk_total_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Total Mb"},"root_disk_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Root Disk Pct"},"recordings_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recordings Mb"},"load1":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Load1"},"load5":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Load5"},"load15":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Load15"}},"type":"object","required":["ts"],"title":"NodeSampleOut","description":"One utilization sample of a worker node (or the average of a bucket of them)."},"NodeStatsOut":{"properties":{"node_id":{"type":"string","title":"Node Id"},"cores":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cores"},"latest":{"anyOf":[{"$ref":"#/components/schemas/NodeSampleOut"},{"type":"null"}]},"series":{"items":{"$ref":"#/components/schemas/NodeSampleOut"},"type":"array","title":"Series"}},"type":"object","required":["node_id","series"],"title":"NodeStatsOut"},"NotificationChannelOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"enabled":{"type":"boolean","title":"Enabled"},"connected_via":{"type":"string","title":"Connected Via"},"status":{"type":"string","title":"Status"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sent At"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"channel_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Name"},"configuration_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Configuration Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","label","enabled","connected_via","status","created_at"],"title":"NotificationChannelOut","description":"A customer's connected delivery channel, without its secret."},"NotificationChannelUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Label"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"NotificationChannelUpdate"},"PasskeyEnrollLoginRequest":{"properties":{"enroll_token":{"type":"string","title":"Enroll Token"},"credential":{"additionalProperties":true,"type":"object","title":"Credential"},"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name"}},"type":"object","required":["enroll_token","credential"],"title":"PasskeyEnrollLoginRequest"},"PasskeyLoginRequest":{"properties":{"login_token":{"type":"string","title":"Login Token"},"assertion":{"additionalProperties":true,"type":"object","title":"Assertion"}},"type":"object","required":["login_token","assertion"],"title":"PasskeyLoginRequest"},"PasskeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"transports":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transports"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","name","created_at","last_used_at"],"title":"PasskeyOut"},"PasskeyRegisterBeginOut":{"properties":{"options":{"additionalProperties":true,"type":"object","title":"Options"},"state":{"type":"string","title":"State"}},"type":"object","required":["options","state"],"title":"PasskeyRegisterBeginOut","description":"WebAuthn creation options for navigator.credentials.create, plus a ``state`` token that binds the\nsingle-use challenge to this account and is echoed back to /register/complete."},"PasskeyRegisterComplete":{"properties":{"credential":{"additionalProperties":true,"type":"object","title":"Credential"},"state":{"type":"string","title":"State"},"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name"}},"type":"object","required":["credential","state"],"title":"PasskeyRegisterComplete"},"PasskeyRename":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"PasskeyRename"},"PaymentsPublicConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"publishable_key":{"type":"string","title":"Publishable Key"},"currency":{"type":"string","title":"Currency"},"preset_amounts":{"items":{"type":"integer"},"type":"array","title":"Preset Amounts","default":[25,50,100,250]},"min_custom_amount":{"type":"integer","title":"Min Custom Amount","default":10}},"type":"object","required":["enabled","publishable_key","currency"],"title":"PaymentsPublicConfig","description":"GET /customer/payments/config — what the customer Billing page may know: whether card payments\nare on, the publishable key and the currency. NEVER the secret key or webhook secret."},"PaymentsSettingsOut":{"properties":{"stripe_enabled":{"type":"boolean","title":"Stripe Enabled"},"stripe_publishable_key":{"type":"string","title":"Stripe Publishable Key"},"currency":{"type":"string","title":"Currency"},"stripe_secret_key_set":{"type":"boolean","title":"Stripe Secret Key Set"},"stripe_webhook_secret_set":{"type":"boolean","title":"Stripe Webhook Secret Set"}},"type":"object","required":["stripe_enabled","stripe_publishable_key","currency","stripe_secret_key_set","stripe_webhook_secret_set"],"title":"PaymentsSettingsOut","description":"GET /admin/payments — the `payments` group with the secrets redacted to booleans (SMTP\npassword_set pattern; services/settings.payments_settings_view)."},"PaymentsSettingsUpdate":{"properties":{"stripe_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stripe Enabled"},"stripe_publishable_key":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Publishable Key"},"stripe_secret_key":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Secret Key"},"stripe_webhook_secret":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Webhook Secret"},"currency":{"anyOf":[{"type":"string","maxLength":8,"minLength":3},{"type":"null"}],"title":"Currency"}},"type":"object","title":"PaymentsSettingsUpdate","description":"PUT /admin/payments — partial update. The secret fields are WRITE-ONLY: omitted, null or an\nempty string all keep the stored value (services/settings.update_group_settings); only a non-empty\nvalue replaces it. Secrets are never audited or returned."},"PilotExtend":{"properties":{"add_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Add Days"},"minutes_limit":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":1.0},{"type":"null"}],"title":"Minutes Limit"},"label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Label"}},"type":"object","title":"PilotExtend","description":"PATCH /admin/customers/{id}/pilot — extend the window and/or adjust the cap. Every field is\noptional; `minutes_limit: null` explicitly means \"unlimited\" (use exclude_unset to tell the two\napart), and the minute counter is never reset here."},"PilotStart":{"properties":{"days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Days"},"minutes_limit":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":1.0},{"type":"null"}],"title":"Minutes Limit"},"label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Label"}},"type":"object","required":["days"],"title":"PilotStart","description":"POST /admin/customers/{id}/pilot — start or REPLACE a pilot (resets the minute counter)."},"PilotStatus":{"properties":{"active":{"type":"boolean","title":"Active","default":false},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"days_left":{"type":"integer","title":"Days Left","default":0},"minutes_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minutes Limit"},"minutes_used":{"type":"number","title":"Minutes Used","default":0.0},"exhausted":{"type":"boolean","title":"Exhausted","default":false},"waived_total":{"type":"number","title":"Waived Total","default":0.0}},"type":"object","title":"PilotStatus","description":"The customer-visible pilot state. NEVER carries `label` — that is an internal admin note (V6 §6)."},"PlanChange":{"properties":{"plan_code":{"type":"string","maxLength":32,"minLength":1,"title":"Plan Code"}},"type":"object","required":["plan_code"],"title":"PlanChange"},"PlanCreate":{"properties":{"code":{"type":"string","maxLength":32,"minLength":1,"pattern":"^[a-z0-9_-]+$","title":"Code"},"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"monthly_fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Monthly Fee","default":"0"},"ports":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Ports"},"included_minutes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Included Minutes"},"per_minute_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Per Minute Rate"},"min_billable_seconds":{"type":"integer","maximum":600.0,"minimum":0.0,"title":"Min Billable Seconds","default":6},"active":{"type":"boolean","title":"Active","default":true},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["code","name","ports","per_minute_rate"],"title":"PlanCreate"},"PlanOut":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"monthly_fee":{"type":"number","title":"Monthly Fee"},"ports":{"type":"integer","title":"Ports"},"included_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Included Minutes"},"per_minute_rate":{"type":"number","title":"Per Minute Rate"},"min_billable_seconds":{"type":"integer","title":"Min Billable Seconds"},"active":{"type":"boolean","title":"Active"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["code","name","monthly_fee","ports","included_minutes","per_minute_rate","min_billable_seconds","active","description"],"title":"PlanOut"},"PlanUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Name"},"monthly_fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Monthly Fee"},"ports":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Ports"},"included_minutes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Included Minutes"},"clear_included_minutes":{"type":"boolean","title":"Clear Included Minutes","default":false},"per_minute_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Per Minute Rate"},"min_billable_seconds":{"anyOf":[{"type":"integer","maximum":600.0,"minimum":0.0},{"type":"null"}],"title":"Min Billable Seconds"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"PlanUpdate"},"ProviderKeyStatus":{"properties":{"key_present":{"type":"boolean","title":"Key Present"}},"type":"object","required":["key_present"],"title":"ProviderKeyStatus"},"ProviderPricesUpdate":{"properties":{"stt":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Stt"},"ai":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/AiPriceIn"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Ai"}},"type":"object","title":"ProviderPricesUpdate","description":"PUT /admin/models/prices: what WE pay per model. A value sets the operator's price, null\nremoves it (the list price applies again). Only the models named are touched."},"ProvidersOut":{"properties":{"openai":{"$ref":"#/components/schemas/ProviderKeyStatus"},"anthropic":{"$ref":"#/components/schemas/ProviderKeyStatus"},"openrouter":{"anyOf":[{"$ref":"#/components/schemas/ProviderKeyStatus"},{"type":"null"}]},"groq":{"anyOf":[{"$ref":"#/components/schemas/ProviderKeyStatus"},{"type":"null"}]}},"type":"object","required":["openai","anthropic"],"title":"ProvidersOut"},"PublicAiModeOut":{"properties":{"mode":{"type":"string","title":"Mode"},"analysis_fee_per_call":{"type":"number","title":"Analysis Fee Per Call"}},"type":"object","required":["mode","analysis_fee_per_call"],"title":"PublicAiModeOut","description":"GET /ai-modes (unauthenticated, like /plans): tier name and per-call analysis fee only."},"PublicShareAnalysis":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"probability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Probability"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"red_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Red Flags"},"tcpa_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tcpa Comment"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"recommendation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation"}},"type":"object","title":"PublicShareAnalysis"},"PublicShareCall":{"properties":{"dialed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialed"},"ani":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ani"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"}},"type":"object","title":"PublicShareCall"},"PublicSharePayload":{"properties":{"shared_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shared By"},"shared_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Shared At"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"call":{"$ref":"#/components/schemas/PublicShareCall"},"analysis":{"anyOf":[{"$ref":"#/components/schemas/PublicShareAnalysis"},{"type":"null"}]},"transcript":{"anyOf":[{"$ref":"#/components/schemas/PublicShareTranscript"},{"type":"null"}]},"has_recording":{"type":"boolean","title":"Has Recording","default":false}},"type":"object","required":["call"],"title":"PublicSharePayload","description":"The public, unauthenticated view of a shared call — an explicit allow-list (see\nservices/call_share.public_payload). No provider/model names, no cost/price/profit, no\nbalance/plan, no routing internals, no SIP log/pcap, no ids."},"PublicShareTranscript":{"properties":{"text":{"type":"string","title":"Text","default":""},"segments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Segments"}},"type":"object","title":"PublicShareTranscript"},"ReanalyzeRequest":{"properties":{"stt_provider":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Stt Provider"},"stt_model":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Stt Model"},"ai_provider":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Ai Provider"},"ai_model":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ai Model"},"redo_stt":{"type":"boolean","title":"Redo Stt","default":false}},"type":"object","title":"ReanalyzeRequest","description":"Optional body for POST /admin/calls/{id}/reanalyze. Any omitted field falls back to the global\nsettings for that run. A provider given without a model resolves to the provider's default model\n(validated against services/settings AI_MODELS / STT_MODELS). `redo_stt` forces re-transcription even\nwhen only the AI model changed (default: reuse the stored transcript when nothing STT changed)."},"RiskBucket":{"properties":{"bucket":{"type":"string","enum":["0-29","30-69","70-100"],"title":"Bucket"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["bucket","count"],"title":"RiskBucket"},"RoutingRuleCreate":{"properties":{"prefix":{"type":"string","maxLength":15,"minLength":1,"title":"Prefix"},"destination_id":{"type":"string","format":"uuid","title":"Destination Id"},"enabled":{"type":"boolean","title":"Enabled","default":true},"priority":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Priority","default":100},"label":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Label"}},"type":"object","required":["prefix","destination_id"],"title":"RoutingRuleCreate"},"RoutingRuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"destination_id":{"type":"string","format":"uuid","title":"Destination Id"},"enabled":{"type":"boolean","title":"Enabled"},"priority":{"type":"integer","title":"Priority"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","prefix","destination_id","enabled","priority","label","created_at","updated_at"],"title":"RoutingRuleOut"},"RoutingRuleUpdate":{"properties":{"prefix":{"anyOf":[{"type":"string","maxLength":15,"minLength":1},{"type":"null"}],"title":"Prefix"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"priority":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Priority"},"label":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Label"}},"type":"object","title":"RoutingRuleUpdate"},"SessionCustomer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"role":{"type":"string","title":"Role"},"must_change_password":{"type":"boolean","title":"Must Change Password","default":false},"dialer_enabled":{"type":"boolean","title":"Dialer Enabled"},"ai_mode":{"type":"string","title":"Ai Mode","default":"power"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","email","company","role","status"],"title":"SessionCustomer","description":"Account summary returned with a session (login / refresh)."},"SettingsOut":{"properties":{"ai_provider":{"type":"string","title":"Ai Provider"},"ai_model":{"type":"string","title":"Ai Model"},"stt_provider":{"type":"string","title":"Stt Provider"},"stt_model":{"type":"string","title":"Stt Model"},"min_analysis_seconds":{"type":"integer","title":"Min Analysis Seconds"},"recording_retention_days":{"type":"integer","title":"Recording Retention Days"},"prompt_version":{"type":"string","title":"Prompt Version"},"payg_default_ports":{"type":"integer","title":"Payg Default Ports"},"capture_headers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Capture Headers"}},"type":"object","required":["ai_provider","ai_model","stt_provider","stt_model","min_analysis_seconds","recording_retention_days","prompt_version","payg_default_ports"],"title":"SettingsOut"},"SettingsUpdate":{"properties":{"ai_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Provider"},"ai_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Model"},"stt_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stt Provider"},"stt_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stt Model"},"min_analysis_seconds":{"anyOf":[{"type":"integer","maximum":3600.0,"minimum":0.0},{"type":"null"}],"title":"Min Analysis Seconds"},"recording_retention_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Recording Retention Days"},"payg_default_ports":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Payg Default Ports"},"capture_headers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Capture Headers"}},"type":"object","title":"SettingsUpdate"},"ShareCreate":{"properties":{"expires_in_hours":{"anyOf":[{"type":"integer","maximum":8760.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Hours"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"}},"type":"object","title":"ShareCreate","description":"Create a public link for a call. The password is NOT accepted from the client — the server\ngenerates it (FEATURES-V5 §1). ``expires_in_hours`` null = never (UI presets: 24h / 7d / 30d)."},"ShareMetaOut":{"properties":{"exists":{"type":"boolean","title":"Exists"},"requires_password":{"type":"boolean","title":"Requires Password","default":true},"revoked":{"type":"boolean","title":"Revoked","default":false},"expired":{"type":"boolean","title":"Expired","default":false},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"}},"type":"object","required":["exists"],"title":"ShareMetaOut","description":"What the unlock page may know BEFORE the password: whether the link is real and who shared it."},"ShareUnlockOut":{"properties":{"view_token":{"type":"string","title":"View Token"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["view_token","expires_in"],"title":"ShareUnlockOut"},"ShareUnlockRequest":{"properties":{"password":{"type":"string","maxLength":64,"minLength":1,"title":"Password"}},"type":"object","required":["password"],"title":"ShareUnlockRequest"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":72,"minLength":12,"title":"Password"},"company":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company"},"full_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Full Name"},"attribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribution"},"accept_terms":{"type":"boolean","title":"Accept Terms","default":false}},"type":"object","required":["email","password"],"title":"SignupRequest"},"SignupResponse":{"properties":{"customer":{"$ref":"#/components/schemas/CustomerOut"},"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["customer","access_token","expires_in"],"title":"SignupResponse"},"SipLogMessage":{"properties":{"time_stamp":{"type":"string","format":"date-time","title":"Time Stamp"},"direction":{"type":"string","title":"Direction"},"method":{"type":"string","title":"Method"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"fromip":{"type":"string","title":"Fromip"},"toip":{"type":"string","title":"Toip"},"fromtag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fromtag"},"totag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Totag"},"first_line":{"type":"string","title":"First Line"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"}},"type":"object","required":["time_stamp","direction","method","fromip","toip","first_line"],"title":"SipLogMessage","description":"One traced SIP message of a call (sip_trace row rendered for the ladder/log viewer)."},"SipLogOut":{"properties":{"call_id":{"type":"string","format":"uuid","title":"Call Id"},"sip_call_id":{"type":"string","title":"Sip Call Id"},"messages":{"items":{"$ref":"#/components/schemas/SipLogMessage"},"type":"array","title":"Messages"},"text":{"type":"string","title":"Text"}},"type":"object","required":["call_id","sip_call_id","messages","text"],"title":"SipLogOut","description":"GET /calls/{id}/sip-log — the message flow as structured rows plus a preformatted text\nrendering (timestamped, direction arrows) for the copy/download button."},"SiteCampaign":{"properties":{"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"visits":{"type":"integer","title":"Visits"},"visitors":{"type":"integer","title":"Visitors"}},"type":"object","required":["utm_source","utm_medium","utm_campaign","visits","visitors"],"title":"SiteCampaign"},"SiteCountry":{"properties":{"country":{"type":"string","title":"Country"},"visits":{"type":"integer","title":"Visits"}},"type":"object","required":["country","visits"],"title":"SiteCountry"},"SiteCrawler":{"properties":{"name":{"type":"string","title":"Name"},"hits":{"type":"integer","title":"Hits"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"top_pages":{"items":{"type":"string"},"type":"array","title":"Top Pages"}},"type":"object","required":["name","hits","last_seen_at","top_pages"],"title":"SiteCrawler"},"SitePage":{"properties":{"path":{"type":"string","title":"Path"},"visits":{"type":"integer","title":"Visits"},"visitors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visitors"}},"type":"object","required":["path","visits"],"title":"SitePage"},"SitePoint":{"properties":{"date":{"type":"string","title":"Date"},"visits":{"type":"integer","title":"Visits"},"visitors":{"type":"integer","title":"Visitors"},"ai_crawls":{"type":"integer","title":"Ai Crawls"},"search_crawls":{"type":"integer","title":"Search Crawls"}},"type":"object","required":["date","visits","visitors","ai_crawls","search_crawls"],"title":"SitePoint"},"SiteReferrer":{"properties":{"host":{"type":"string","title":"Host"},"visits":{"type":"integer","title":"Visits"}},"type":"object","required":["host","visits"],"title":"SiteReferrer"},"SiteSource":{"properties":{"source":{"type":"string","title":"Source"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"visits":{"type":"integer","title":"Visits"},"visitors":{"type":"integer","title":"Visitors"}},"type":"object","required":["source","name","visits","visitors"],"title":"SiteSource"},"SiteSourceGroup":{"properties":{"source":{"type":"string","title":"Source"},"visits":{"type":"integer","title":"Visits"},"visitors":{"type":"integer","title":"Visitors"}},"type":"object","required":["source","visits","visitors"],"title":"SiteSourceGroup"},"SlackConnectOut":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"SlackConnectOut"},"SlackIntegrationOut":{"properties":{"oauth_available":{"type":"boolean","title":"Oauth Available"},"webhook_available":{"type":"boolean","title":"Webhook Available","default":true},"channels":{"type":"integer","title":"Channels"},"max_channels":{"type":"integer","title":"Max Channels"}},"type":"object","required":["oauth_available","channels","max_channels"],"title":"SlackIntegrationOut","description":"GET /customer/integrations/slack: which connect flows this deployment offers."},"SlackWebhookConnectIn":{"properties":{"url":{"type":"string","maxLength":512,"minLength":20,"title":"Url"},"label":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Label"}},"type":"object","required":["url"],"title":"SlackWebhookConnectIn"},"SmtpSettingsOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"security":{"type":"string","title":"Security"},"username":{"type":"string","title":"Username"},"from_email":{"type":"string","title":"From Email"},"from_name":{"type":"string","title":"From Name"},"password_set":{"type":"boolean","title":"Password Set"}},"type":"object","required":["enabled","host","port","security","username","from_email","from_name","password_set"],"title":"SmtpSettingsOut","description":"GET /admin/smtp — the stored SMTP config with the password redacted to a boolean."},"SmtpSettingsUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"host":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Host"},"port":{"anyOf":[{"type":"integer","maximum":65535.0,"minimum":1.0},{"type":"null"}],"title":"Port"},"security":{"anyOf":[{"type":"string","enum":["none","starttls","tls"]},{"type":"null"}],"title":"Security"},"username":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Username"},"password":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Password"},"from_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"From Email"},"from_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"From Name"}},"type":"object","title":"SmtpSettingsUpdate","description":"PUT /admin/smtp — every field optional (partial update). ``password`` is write-only: omit/null keeps\nthe stored one, a value replaces it, an empty string clears it."},"SmtpTestOut":{"properties":{"sent":{"type":"boolean","title":"Sent"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latency_ms":{"type":"integer","title":"Latency Ms"}},"type":"object","required":["sent","latency_ms"],"title":"SmtpTestOut"},"SmtpTestRequest":{"properties":{"to":{"type":"string","format":"email","title":"To"}},"type":"object","required":["to"],"title":"SmtpTestRequest"},"SpendPerDay":{"properties":{"date":{"type":"string","title":"Date"},"spend":{"type":"number","title":"Spend"}},"type":"object","required":["date","spend"],"title":"SpendPerDay"},"StatsOut":{"properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"},"calls":{"type":"integer","title":"Calls"},"answered_calls":{"type":"integer","title":"Answered Calls"},"minutes":{"type":"number","title":"Minutes"},"spend":{"type":"number","title":"Spend"},"by_category":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Category"},"by_recommendation":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Recommendation"},"avg_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Probability"}},"type":"object","required":["calls","answered_calls","minutes","spend","by_category","by_recommendation","avg_probability"],"title":"StatsOut"},"StorageRunSummary":{"properties":{"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"offloaded":{"type":"integer","title":"Offloaded","default":0},"deleted_recordings":{"type":"integer","title":"Deleted Recordings","default":0},"deleted_pcaps":{"type":"integer","title":"Deleted Pcaps","default":0},"deleted_siplog_rows":{"type":"integer","title":"Deleted Siplog Rows","default":0},"errors":{"type":"integer","title":"Errors","default":0}},"type":"object","title":"StorageRunSummary","description":"Outcome of one offload/retention maintenance run (worker log + GET /admin/storage/status)."},"StorageSettingsOut":{"properties":{"offload_enabled":{"type":"boolean","title":"Offload Enabled"},"offload_after_hours":{"type":"integer","title":"Offload After Hours"},"retention_recordings_days":{"type":"integer","title":"Retention Recordings Days"},"retention_pcaps_days":{"type":"integer","title":"Retention Pcaps Days"},"retention_siplog_days":{"type":"integer","title":"Retention Siplog Days"}},"type":"object","required":["offload_enabled","offload_after_hours","retention_recordings_days","retention_pcaps_days","retention_siplog_days"],"title":"StorageSettingsOut","description":"The `storage` settings group (V4 §3): WAV/pcap offload to S3 + retention (0 = keep forever)."},"StorageSettingsUpdate":{"properties":{"offload_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Offload Enabled"},"offload_after_hours":{"anyOf":[{"type":"integer","maximum":8760.0,"minimum":1.0},{"type":"null"}],"title":"Offload After Hours"},"retention_recordings_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Retention Recordings Days"},"retention_pcaps_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Retention Pcaps Days"},"retention_siplog_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Retention Siplog Days"}},"type":"object","title":"StorageSettingsUpdate"},"StorageStatusOut":{"properties":{"backend":{"type":"string","title":"Backend"},"disk_total_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Total Bytes"},"disk_used_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Used Bytes"},"disk_free_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Free Bytes"},"settings":{"$ref":"#/components/schemas/StorageSettingsOut"},"last_run":{"anyOf":[{"$ref":"#/components/schemas/StorageRunSummary"},{"type":"null"}]}},"type":"object","required":["backend","settings"],"title":"StorageStatusOut","description":"GET /admin/storage/status — current backend + disk usage + knobs + last run summary."},"SystemStatsOut":{"properties":{"hours":{"type":"integer","title":"Hours"},"step_sec":{"type":"integer","title":"Step Sec"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"nodes":{"items":{"$ref":"#/components/schemas/NodeStatsOut"},"type":"array","title":"Nodes"}},"type":"object","required":["hours","step_sec","generated_at","nodes"],"title":"SystemStatsOut","description":"GET /admin/system/stats: CPU, memory, disk and load per worker node over the window."},"TaxIdOut":{"properties":{"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"}},"type":"object","title":"TaxIdOut"},"TaxIdUpdate":{"properties":{"tax_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tax Id"}},"type":"object","title":"TaxIdUpdate","description":"PUT /customer/tax-id — the account's Tax ID / VAT number, free text (we validate length,\nnever format: registries differ by country). ``null`` or an empty string clears it."},"TermsAccept":{"properties":{"version":{"type":"string","maxLength":16,"minLength":1,"title":"Version"}},"type":"object","required":["version"],"title":"TermsAccept","description":"POST /customer/terms/accept: the version shown to the person accepting (must be the one in force)."},"TermsAccepted":{"properties":{"terms_version":{"type":"string","title":"Terms Version"},"terms_accepted_at":{"type":"string","format":"date-time","title":"Terms Accepted At"}},"type":"object","required":["terms_version","terms_accepted_at"],"title":"TermsAccepted"},"TestAnalysisOut":{"properties":{"analysis":{"$ref":"#/components/schemas/TestAnalysisResult"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"latency_ms":{"type":"integer","title":"Latency Ms"},"cost":{"type":"number","title":"Cost"}},"type":"object","required":["analysis","provider","model","latency_ms","cost"],"title":"TestAnalysisOut"},"TestAnalysisRequest":{"properties":{"transcript":{"anyOf":[{"type":"string","maxLength":60000,"minLength":1},{"type":"null"}],"title":"Transcript"}},"type":"object","title":"TestAnalysisRequest"},"TestAnalysisResult":{"properties":{"title":{"type":"string","title":"Title"},"probability":{"type":"integer","title":"Probability"},"category":{"type":"string","title":"Category"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"red_flags":{"items":{"type":"string"},"type":"array","title":"Red Flags"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"tcpa_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tcpa Comment"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"recommendation":{"type":"string","title":"Recommendation"}},"type":"object","required":["title","probability","category","entity","red_flags","language","tcpa_comment","summary","recommendation"],"title":"TestAnalysisResult"},"TestCallCreate":{"properties":{"number":{"type":"string","maxLength":32,"minLength":2,"pattern":"^\\+?[0-9*#]{2,32}$","title":"Number"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"caller_id":{"anyOf":[{"type":"string","maxLength":32,"pattern":"^\\+?[0-9]{3,20}$"},{"type":"null"}],"title":"Caller Id"},"seconds":{"type":"integer","maximum":600.0,"minimum":5.0,"title":"Seconds","default":30},"speech":{"type":"string","maxLength":32,"title":"Speech","default":"route_test"},"agent_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Destination Id"},"instruction":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Instruction"}},"type":"object","required":["number"],"title":"TestCallCreate","description":"POST /customer/test-calls. ``number``: digits to dial (a leading + is allowed). ``speech``:\nwhat the caller side plays after the automated-test-call announcement every call opens with,\n\"route_test\" (a neutral announcement) or \"scam_sample\" (a known card-services scam script, to\ncheck that a verdict comes back block; only to one of the account's verified numbers).\n``caller_id``: one of the account's verified numbers; default the platform's own number."},"TestCallOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"number":{"type":"string","title":"Number"},"caller_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"},"seconds":{"type":"integer","title":"Seconds"},"speech":{"type":"string","title":"Speech"},"sip_call_id":{"type":"string","title":"Sip Call Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"agent_destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Destination Id"},"instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instruction"},"agent_sip_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Sip Call Id"},"agent_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Call Id"},"answered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Answered"},"sip_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Code"},"sip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Reason"},"talk_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Talk Seconds"},"ended_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended By"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"purpose":{"type":"string","title":"Purpose","default":"test"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"confirmed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmed By"},"confirm_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm Url"},"confirm_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirm Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","number","seconds","speech","sip_call_id","created_at","updated_at"],"title":"TestCallOut"},"TicketCreate":{"properties":{"kind":{"type":"string","enum":["question","bug","feature","analysis","billing"],"title":"Kind","default":"question"},"subject":{"type":"string","maxLength":255,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":20000,"minLength":1,"title":"Body"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"}},"type":"object","required":["subject","body"],"title":"TicketCreate","description":"POST /support/tickets. ``call_id`` links the ticket to one of the account's calls (an\nanalysis dispute: \"this verdict is wrong\")."},"TicketDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ticket_no":{"type":"integer","title":"Ticket No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"kind":{"type":"string","title":"Kind"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"status":{"type":"string","title":"Status"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"message_count":{"type":"integer","title":"Message Count","default":0},"messages":{"items":{"$ref":"#/components/schemas/TicketMessageOut"},"type":"array","title":"Messages","default":[]},"call":{"anyOf":[{"$ref":"#/components/schemas/CallOut"},{"type":"null"}]}},"type":"object","required":["id","ticket_no","customer_id","kind","subject","body","call_id","status","created_by","closed_at","created_at","updated_at"],"title":"TicketDetail"},"TicketList":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/TicketOut"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"TicketList"},"TicketMessageCreate":{"properties":{"body":{"type":"string","maxLength":20000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"TicketMessageCreate"},"TicketMessageOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"author_kind":{"type":"string","title":"Author Kind"},"author_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Label"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","author_kind","author_label","body","created_at"],"title":"TicketMessageOut"},"TicketOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ticket_no":{"type":"integer","title":"Ticket No"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"kind":{"type":"string","title":"Kind"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"status":{"type":"string","title":"Status"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"message_count":{"type":"integer","title":"Message Count","default":0}},"type":"object","required":["id","ticket_no","customer_id","kind","subject","body","call_id","status","created_by","closed_at","created_at","updated_at"],"title":"TicketOut"},"TicketStatusUpdate":{"properties":{"status":{"type":"string","enum":["open","answered","closed"],"title":"Status"}},"type":"object","required":["status"],"title":"TicketStatusUpdate","description":"PATCH: a customer may close or reopen; an admin may set any status."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"customer":{"anyOf":[{"$ref":"#/components/schemas/SessionCustomer"},{"type":"null"}]}},"type":"object","required":["access_token","expires_in"],"title":"TokenResponse"},"TopCustomer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"email":{"type":"string","title":"Email"},"calls":{"type":"integer","title":"Calls"},"minutes":{"type":"number","title":"Minutes"},"spend":{"type":"number","title":"Spend"}},"type":"object","required":["id","company","email","calls","minutes","spend"],"title":"TopCustomer"},"TopupRequest":{"properties":{"amount":{"anyOf":[{"type":"number","exclusiveMaximum":1000000.0,"exclusiveMinimum":-1000000.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"description":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Description"}},"type":"object","required":["amount"],"title":"TopupRequest"},"TranscriptMeta":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"audio_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Audio Seconds"},"cost":{"type":"number","title":"Cost"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","language","audio_seconds","cost","created_at"],"title":"TranscriptMeta","description":"V3 §2a — the STT run that produced the call's transcript (provider/model + cost/audio), surfaced\non the call detail's \"Model run\" panel. `text`/`segments` stay on the dedicated transcript endpoint;\nthe provider `cost` is internal (the frontend shows it to admins only)."},"TranscriptOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"text":{"type":"string","title":"Text"},"segments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Segments"},"audio_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Audio Seconds"},"cost":{"type":"number","title":"Cost"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","language","text","segments","audio_seconds","cost","created_at"],"title":"TranscriptOut"},"TransferCheckIn":{"properties":{"call_id":{"type":"string","maxLength":255,"minLength":1,"title":"Call Id"},"call_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Uuid"},"target":{"type":"string","maxLength":128,"title":"Target"}},"type":"object","required":["call_id","target"],"title":"TransferCheckIn","description":"POST /internal/sip/transfer: the proxy asks whether the agent may transfer this call to\n``target`` (the user part of the REFER's Refer-To). The answer carries the Refer-To the caller\nshould receive: always a number at the platform's own ingress, never the agent's URI."},"TransferCheckOut":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"refer_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refer To"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","required":["allowed"],"title":"TransferCheckOut"},"TransferQueued":{"properties":{"status":{"type":"string","title":"Status"},"target":{"type":"string","title":"Target"},"mode":{"type":"string","title":"Mode"}},"type":"object","required":["status","target","mode"],"title":"TransferQueued"},"TransferRequest":{"properties":{"target":{"type":"string","maxLength":64,"minLength":2,"title":"Target"}},"type":"object","required":["target"],"title":"TransferRequest","description":"POST /calls/{id}/transfer: ask the voice agent's provider to transfer a live agent call to a\nnumber. The transfer then runs exactly as one the agent asked for itself."},"UsageReport":{"properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"},"rows":{"items":{"$ref":"#/components/schemas/UsageRow"},"type":"array","title":"Rows"},"totals":{"additionalProperties":{"type":"number"},"type":"object","title":"Totals"}},"type":"object","required":["rows","totals"],"title":"UsageReport"},"UsageRow":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"plan_code":{"type":"string","title":"Plan Code"},"calls":{"type":"integer","title":"Calls"},"minutes":{"type":"number","title":"Minutes"},"revenue":{"type":"number","title":"Revenue"},"provider_cost":{"type":"number","title":"Provider Cost"},"margin":{"type":"number","title":"Margin"},"waived":{"type":"number","title":"Waived","default":0.0}},"type":"object","required":["customer_id","email","company","plan_code","calls","minutes","revenue","provider_cost","margin"],"title":"UsageRow"},"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"},"VerifiedNumberCode":{"properties":{"code":{"type":"string","maxLength":12,"minLength":4,"title":"Code"}},"type":"object","required":["code"],"title":"VerifiedNumberCode"},"VerifiedNumberCreate":{"properties":{"e164":{"type":"string","maxLength":24,"minLength":7,"title":"E164"},"label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Label"},"destination_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Destination Id"}},"type":"object","required":["e164"],"title":"VerifiedNumberCreate","description":"POST /customer/verified-numbers: the number to verify (international format) and, optionally,\nthe destination the verification call goes out through (default: the account's default)."},"VerifiedNumberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"e164":{"type":"string","title":"E164"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"code_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Code Expires At"},"attempts_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempts Left"},"calls_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Calls Left"},"test_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Test Call Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","e164","source","status","created_at"],"title":"VerifiedNumberOut"},"VoiceProviderOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"default_host":{"type":"string","title":"Default Host"},"default_port":{"type":"integer","title":"Default Port"},"default_transport":{"type":"string","title":"Default Transport"},"codecs":{"items":{"type":"string"},"type":"array","title":"Codecs"},"expects_challenge":{"type":"boolean","title":"Expects Challenge"},"answers_options":{"type":"boolean","title":"Answers Options"},"agent_id_label":{"type":"string","title":"Agent Id Label"},"agent_id_hint":{"type":"string","title":"Agent Id Hint"},"agent_id_placeholder":{"type":"string","title":"Agent Id Placeholder"},"uri_example":{"type":"string","title":"Uri Example"},"notes":{"type":"string","title":"Notes","default":""},"hosted_webhook":{"type":"boolean","title":"Hosted Webhook","default":false},"webhook_events":{"items":{"type":"string"},"type":"array","title":"Webhook Events"},"default_model":{"type":"string","title":"Default Model","default":""},"voices":{"items":{"type":"string"},"type":"array","title":"Voices"},"media_srtp":{"type":"boolean","title":"Media Srtp","default":false}},"type":"object","required":["id","name","default_host","default_port","default_transport","codecs","expects_challenge","answers_options","agent_id_label","agent_id_hint","agent_id_placeholder","uri_example"],"title":"VoiceProviderOut","description":"GET /customer/voice-providers: a supported voice-agent provider and how it is reached."},"WebhookOut":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"secret_set":{"type":"boolean","title":"Secret Set"}},"type":"object","required":["url","secret_set"],"title":"WebhookOut"},"WebhookTestOut":{"properties":{"delivered":{"type":"boolean","title":"Delivered"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latency_ms":{"type":"integer","title":"Latency Ms"}},"type":"object","required":["delivered","latency_ms"],"title":"WebhookTestOut","description":"Result of POST /customer/webhook/test (one signed `webhook.test` event)."},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url"},"secret":{"anyOf":[{"type":"string","maxLength":256,"minLength":8},{"type":"null"}],"title":"Secret"}},"type":"object","title":"WebhookUpdate"},"WelcomeEmailStatus":{"properties":{"sent":{"type":"boolean","title":"Sent","default":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"skipped_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skipped Reason"}},"type":"object","title":"WelcomeEmailStatus","description":"Outcome of the optional welcome email sent on admin customer-create (FEATURES-V3 §7). Delivery\nnever fails the create: on error the customer still exists and the admin sees ``sent:false`` plus the\ntemporary password. ``skipped_reason`` is set when nothing was attempted (``disabled`` when the admin\nturned the email off, ``smtp_not_configured`` when no global SMTP is set up)."}}}}